phpAx / DocuSign Rooms API - v2 / Gets room folders accessible to the calling user.
Back to Collection Items
<?php
// This example assumes the Chilkat API to have been previously unlocked.
// See Global Unlock Sample for sample code.
// For versions of Chilkat < 10.0.0, use new COM('Chilkat_9_5_0.Chilkat.Http')
$http = new COM("Chilkat.Http");
// For versions of Chilkat < 10.0.0, use new COM('Chilkat_9_5_0.Chilkat.JsonObject')
$queryParams = new COM("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');
// resp is a Chilkat.HttpResponse
$resp = $http->QuickRequestParams('GET','https://domain.com/v2/accounts/{{accountId}}/rooms/{{roomId}}/room_folders',$queryParams);
if ($http->LastMethodSuccess == 0) {
print $http->LastErrorText . "\n";
exit;
}
print $resp->StatusCode . "\n";
print $resp->BodyStr . "\n";
?>
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": [
]
}