Chilkat Online Tools

C# / DocuSign Rooms API - v2 / Gets room folders accessible to the calling user.

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;

Chilkat.JsonObject queryParams = new Chilkat.JsonObject();
queryParams.UpdateInt("startPosition",0);
queryParams.UpdateInt("count",100);

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

Chilkat.HttpResponse resp = http.QuickRequestParams("GET","https://domain.com/v2/accounts/{{accountId}}/rooms/{{roomId}}/room_folders",queryParams);
if (http.LastMethodSuccess == false) {
    Debug.WriteLine(http.LastErrorText);
    return;
}

Debug.WriteLine(Convert.ToString(resp.StatusCode));
Debug.WriteLine(resp.BodyStr);

Curl Command

curl -G -d "startPosition=0"
	-d "count=100"
	-H "Accept: text/plain, application/json, text/json"
	-H "Authorization: Bearer {{accessToken}}"
https://domain.com/v2/accounts/{{accountId}}/rooms/{{roomId}}/room_folders

Postman Collection Item JSON

{
  "name": "Gets room folders accessible to the calling user.",
  "request": {
    "method": "GET",
    "header": [
      {
        "key": "Accept",
        "value": "text/plain, application/json, text/json"
      },
      {
        "key": "Authorization",
        "value": "Bearer {{accessToken}}"
      }
    ],
    "url": {
      "raw": "{{baseUrl}}/v2/accounts/{{accountId}}/rooms/{{roomId}}/room_folders?startPosition=0&count=100",
      "host": [
        "{{baseUrl}}"
      ],
      "path": [
        "v2",
        "accounts",
        "{{accountId}}",
        "rooms",
        "{{roomId}}",
        "room_folders"
      ],
      "query": [
        {
          "key": "startPosition",
          "value": "0"
        },
        {
          "key": "count",
          "value": "100"
        }
      ],
      "variable": [
        {
          "key": "roomId",
          "value": "{{roomId}}"
        },
        {
          "key": "accountId",
          "value": "{{accountId}}"
        }
      ]
    }
  },
  "response": [
  ]
}