Skip to main content

getFolders

FileEntryBaseArrayWrapper getFolders(folderId)

GET /api/2.0/files/{folderId}/subfolders

Get subfolders

Lists the folders that sit directly inside the folder named in the path, ordered by title, without their own contents and without the files that lie beside them. The whole list arrives at once - there are no paging or filtering parameters here - so for a large folder, or when the files are wanted as well, use GET api/2.0/files/{folderId}, which pages and filters. A folder that holds no subfolders answers with an empty list. The caller needs read access to the folder, and only the subfolders they may see are listed, so a member of a room can get fewer entries than its manager; a caller without access is answered with 403, and a folder that does not exist, or one that has been deleted for good, is answered as not found. The call is read-only and leaves the new-item marks of the folder alone.

Parameters​

NameInTypeDescriptionNotes
folderIdpathInteger (int32)The folder the operation acts on. Take the identifier from a listing such as GET api/2.0/files/@root or GET api/2.0/files/{folderId}: a folder stored in the portal is numbered, while a folder in a connected third-party account is named by an opaque string.[required] [example: 1]

Responses​

Status codeDescriptionTypeResponse headers
200The direct subfolders of the folder, ordered by titleFileEntryBaseArrayWrapperX-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset
403The caller may not read this folder--
404The folder does not exist--
401UnauthorizedErrorApiResponse-
429Too Many Requests.ErrorApiResponseRetry-After
500Internal Server Error.ErrorApiResponse-
400Bad Request.ErrorApiResponse-
502Bad Gateway. Returned by the reverse proxy, response body may be HTML and not JSON.--
503Service Unavailable. Returned by the reverse proxy, response body may be HTML and not JSON.--

Return type​

FileEntryBaseArrayWrapper

Third-party storage​

For a file or folder in a connected third-party storage the identifier is a string such as sbox-42, and the call differs in these parts only:

NameInTypeDescriptionNotes
folderIdpathStringThe folder the operation acts on. Take the identifier from a listing such as `GET api/2.0/files/@root` or `GET api/2.0/files/{folderId}`: a folder stored in the portal is numbered, while a folder in a connected third-party account is named by an opaque string.[required] [example: sbox-42]

Authorization​

Basic, OAuth2 (scopes: read, write), ApiKeyBearer, asc_auth_key, Bearer, OpenId

HTTP request headers​

  • Content-Type: Not defined
  • Accept: application/json