跳到主要内容

getFolderPath

FileEntryBaseArrayWrapper getFolderPath(folderId)

GET /api/2.0/files/folder/{folderId}/path

Get the folder path

Returns the chain of folders that leads to the folder named in the path, ordered from the section root down to the folder itself, which is the last entry. It is what a breadcrumb trail is built from, and it also tells a client which section - a room, the personal section, the archive - a bare folder identifier belongs to. Only the folders the caller may see are part of the chain, so a member who was given access to a folder deep inside a room gets a shorter path than the room manager does. The caller needs read access to the folder and is otherwise answered with 403, while a folder that does not exist is answered as not found. The call is read-only and takes no paging parameters. To go the other way, from a folder down into its contents, call GET api/2.0/files/{folderId}.

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 chain of folders leading to the folder, the section root firstFileEntryBaseArrayWrapperX-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