Chilkat Online Tools

TCL / DocuSign Admin API / Get list of users in a DSGroup

Back to Collection Items

load ./chilkat.dll

# This example assumes the Chilkat API to have been previously unlocked.
# See Global Unlock Sample for sample code.

set http [new_CkHttp]

set queryParams [new_CkJsonObject]

CkJsonObject_UpdateString $queryParams "page" "{{page}}"
CkJsonObject_UpdateString $queryParams "page_size" "{{page_size}}"

CkHttp_SetRequestHeader $http "Content-Type" "application/json"
# Adds the "Authorization: Bearer {{accessToken}}" header.
CkHttp_put_AuthToken $http "{{accessToken}}"
CkHttp_SetRequestHeader $http "Accept" "application/json"

# resp is a CkHttpResponse
set resp [CkHttp_QuickRequestParams $http "GET" "https://{{hostenv}}/Management/v2.1/organizations/{{organizationId}}/accounts/{{accountId}}/dsgroups/{{dsGroupId}}/users" $queryParams]
if {[CkHttp_get_LastMethodSuccess $http] == 0} then {
    puts [CkHttp_lastErrorText $http]
    delete_CkHttp $http
    delete_CkJsonObject $queryParams
    exit
}

puts [CkHttpResponse_get_StatusCode $resp]
puts [CkHttpResponse_bodyStr $resp]
delete_CkHttpResponse $resp


delete_CkHttp $http
delete_CkJsonObject $queryParams

Curl Command

curl -G -d "page=%7B%7Bpage%7D%7D"
	-d "page_size=%7B%7Bpage_size%7D%7D"
	-H "Accept: application/json"
	-H "Content-Type: application/json"
	-H "Authorization: Bearer {{accessToken}}"
https://{{hostenv}}/Management/v2.1/organizations/{{organizationId}}/accounts/{{accountId}}/dsgroups/{{dsGroupId}}/users

Postman Collection Item JSON

{
  "name": "Get list of users in a DSGroup",
  "request": {
    "method": "GET",
    "header": [
      {
        "key": "Accept",
        "value": "application/json"
      },
      {
        "key": "Content-Type",
        "value": "application/json"
      },
      {
        "key": "Authorization",
        "value": "Bearer {{accessToken}}"
      }
    ],
    "url": {
      "raw": "https://{{hostenv}}/Management/v2.1/organizations/{{organizationId}}/accounts/{{accountId}}/dsgroups/{{dsGroupId}}/users?page={{page}}&page_size={{page_size}}",
      "protocol": "https",
      "host": [
        "{{hostenv}}"
      ],
      "path": [
        "Management",
        "v2.1",
        "organizations",
        "{{organizationId}}",
        "accounts",
        "{{accountId}}",
        "dsgroups",
        "{{dsGroupId}}",
        "users"
      ],
      "query": [
        {
          "key": "page",
          "value": "{{page}}"
        },
        {
          "key": "page_size",
          "value": "{{page_size}}"
        }
      ],
      "variable": [
        {
          "key": "organizationId",
          "value": "{{organizationId}}"
        },
        {
          "key": "accountId",
          "value": "{{accountId}}"
        },
        {
          "key": "dsGroupId",
          "value": "{{dsGroupId}}"
        }
      ]
    },
    "description": "Required scopes: user_read"
  },
  "response": [
  ]
}