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 ID of the user to access. Generally this is the ID of the current authenticated user, but if the authenticated user is an Administrator on the account, userId can represent another user whom the Administrator is accessing.

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

(Optional) The order in which to sort the results.

Valid values are:

  • asc: Ascending order.
  • desc: Descending order.

order_bystring

(Optional) The file attribute to use to sort the results.

Valid values are:

  • modified
  • name

search_textstring

Use this parameter to search for specific text.

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

The 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

This object contains information about a file or folder in cloud storage.

datestring

The UTC date and time that the file or folder was last modified.

idstring

The storage provider's id for the file or folder.

imgstring

The file extension for a file.

Note: If the item is a folder, this value is null.

namestring

The full name of a file.

sizestring

The size of the file. The file size limit varies based on the cloud storage provider.

supportedstring

When set to true, DocuSign supports the file type for upload.

typestring

The type of cloud storage item. Valid values are:

  • file
  • folder

uristring

The URI for the file or folder.

CloudStorage

Cloud storage

endPositionstring

The last index position in the result set.

errorDetailsexternalDocServiceErrorDetails

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

idstring

A unique ID for the Salesforce object.

items[externalFile]

A list of objects that contain information about a file or folder in cloud storage.

namestring

The name of the cloud storage item.

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 in this response. Because you can filter which entries are included in the response, this value is always less than or equal to the totalSetSize.

startPositionstring

The starting index position of the current result set.

totalSetSizestring

The total number of items in the result set. This value is always greater than or equal to the value of resultSetSize.

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> 
}} />