Chilkat Online Tools

C# / DocuSign Admin API / Retrieve list of user's permission profiles for each account's product

Back to Collection Items

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

Chilkat.Http http = new Chilkat.Http();
bool success;

http.SetRequestHeader("Content-Type","application/json");
// Adds the "Authorization: Bearer {{accessToken}}" header.
http.AuthToken = "{{accessToken}}";
http.SetRequestHeader("Accept","application/json");

Chilkat.StringBuilder sbResponseBody = new Chilkat.StringBuilder();
success = http.QuickGetSb("https://{{hostenv}}/Management/v2.1/organizations/{{organizationId}}/accounts/{{accountId}}/products/users/{{userId}}/permission_profiles",sbResponseBody);
if (success == false) {
    Debug.WriteLine(http.LastErrorText);
    return;
}

Debug.WriteLine("Response status code = " + Convert.ToString(http.LastStatus));
Debug.WriteLine(sbResponseBody.GetAsString());

Curl Command

curl -X GET
	-H "Accept: application/json"
	-H "Content-Type: application/json"
	-H "Authorization: Bearer {{accessToken}}"
https://{{hostenv}}/Management/v2.1/organizations/{{organizationId}}/accounts/{{accountId}}/products/users/{{userId}}/permission_profiles

Postman Collection Item JSON

{
  "name": "Retrieve list of user's permission profiles for each account's product",
  "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}}/products/users/{{userId}}/permission_profiles",
      "protocol": "https",
      "host": [
        "{{hostenv}}"
      ],
      "path": [
        "Management",
        "v2.1",
        "organizations",
        "{{organizationId}}",
        "accounts",
        "{{accountId}}",
        "products",
        "users",
        "{{userId}}",
        "permission_profiles"
      ],
      "variable": [
        {
          "key": "organizationId",
          "value": "{{organizationId}}"
        },
        {
          "key": "accountId",
          "value": "{{accountId}}"
        },
        {
          "key": "userId",
          "value": "{{userId}}"
        }
      ]
    },
    "description": "Required scopes: user_read"
  },
  "response": [
  ]
}