CloudStorage: listFolders

Retrieves a list of all the items in a specified folder from the specified cloud storage provider.

Request

HTTP request

GET /v2.1/accounts/{accountId}/users/{userId}/cloud_storage/{serviceId}/folders

Parameters

Parameter NameValueDescription
Path Parameters
accountIdstring

The external account number (int) or account ID GUID.

serviceIdstring

The ID of the service to access.

Valid values are the service name ("Box") or the numerical serviceId ("4136").

userIdstring

The user ID of the user being accessed. Generally this is the user ID of the authenticated user, but if the authenticated user is an Administrator on the account, this can be another user the Admin user is accessing. Note: For Envelopes:listStatusChanges (GET /v2.1/accounts/{accountId}/envelopes), the user_id query parameter is not implemented and should not be used.

Optional Query Parameters
cloud_storage_folder_pathstring

A comma separated list of folder IDs included in the request.

countstring

An optional value that sets how many items are included in the response.

The default setting for this is 25.

orderstring

An optional value that sets the direction order used to sort the item list.

Valid values are:

  • asc = ascending sort order
  • desc = descending sort order

order_bystring

An optional value that sets the file attribute used to sort the item list.

Valid values are:

  • modified
  • name

search_textstring

start_positionstring

Indicates the starting point of the first item included in the response set. It uses a 0-based index. The default setting for this is 0.

Responses

CodeDescriptionReference
200

Successful response.

CloudStorage
400

Error encountered.

errorDetails

SDK Method

CloudStorage::listFolders

Definitions

errorDetails

This object describes errors that occur. It is only valid for responses, and ignored in requests.

errorCodestring

A code associated with the error condition.

messagestring

A brief message describing the error condition.

externalDocServiceErrorDetails

authenticationUrlstring

Reserved: TBD

errorCodestring

A code associated with the error condition.

messagestring

externalFile

datestring

idstring

A unique ID for the Salesforce object.

imgstring

namestring

sizestring

Reserved: TBD

supportedstring

typestring

Type of user:

  • type_owner
  • type_participant

uristring

URI containing the user ID.

CloudStorage

Cloud storage

endPositionstring

The last position in the result set.

errorDetailsexternalDocServiceErrorDetails

Object that describes errors that occur. Only valid for responses; ignored in requests.

idstring

A unique ID for the Salesforce object.

items[externalFile]

namestring

nextUristring

The URI for the next chunk of records based on the search request. It is null if this is the last set of results for the search.

previousUristring

The URI for the prior chunk of records based on the search request. It is null if this is the first set of results for the search.

resultSetSizestring

The number of results returned in this response.

startPositionstring

Starting position of the current result set.

totalSetSizestring

The total number of items in the search's result set. It will always be greater than or equal to the value of the resultSetSize field.

Examples

Generic JSON Response

Response
{
  "name": "sample string 1",
  "id": "sample string 2",
  "previousUri": "sample string 3",
  "nextUri": "sample string 4",
  "totalSetSize": "sample string 5",
  "resultSetSize": "sample string 6",
  "startPosition": "sample string 7",
  "endPosition": "sample string 8",
  "items": [
    {
      "name": "sample string 1",
      "id": "sample string 2",
      "date": "sample string 3",
      "img": "sample string 4",
      "type": "sample string 5",
      "uri": "sample string 6",
      "size": "sample string 7",
      "supported": "sample string 8"
    }
  ],
  "errorDetails": {
    "errorCode": "sample string 1",
    "message": "sample string 2",
    "authenticationUrl": "sample string 3"
  }
}
Generic XML Response

Response
<externalFolder xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.docusign.com/restapi">
  <endPosition>sample string 8</endPosition>
  <errorDetails>
    <authenticationUrl>sample string 3</authenticationUrl>
    <errorCode>sample string 1</errorCode>
    <message>sample string 2</message>
  </errorDetails>
  <id>sample string 2</id>
  <items>
    <externalFile>
      <date>sample string 3</date>
      <id>sample string 2</id>
      <img>sample string 4</img>
      <name>sample string 1</name>
      <size>sample string 7</size>
      <supported>sample string 8</supported>
      <type>sample string 5</type>
      <uri>sample string 6</uri>
    </externalFile>
  </items>
  <name>sample string 1</name>
  <nextUri>sample string 4</nextUri>
  <previousUri>sample string 3</previousUri>
  <resultSetSize>sample string 6</resultSetSize>
  <startPosition>sample string 7</startPosition>
  <totalSetSize>sample string 5</totalSetSize>
</externalFolder> 
}} />