跳到主要内容

getFolderInfo

FolderWrapper getFolderInfo(folderId)

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

Get folder information

Returns one folder as an object - its title, its parent, the moments it was created and last changed, the access the caller has to it, the number of items that are new for them, and the room settings when the folder is a room - without listing anything inside it. Use it to resolve a folder identifier into something displayable, and GET api/2.0/files/{folderId} when the contents are what is wanted; unlike that operation, this one leaves the new-item marks of the folder alone. Any member who can read the folder may call it, and an anonymous caller only through an external link that grants access, everybody else being refused; a folder that does not exist is answered as not found. The call is read-only. The chain of parents above the folder is not part of the answer and is read with GET api/2.0/files/folder/{folderId}/path.

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 folder itself - its title, its parent, the moments it was created and changed, the access the caller has to it, how many items in it are new for them, and the room settings when the folder is a room; nothing about the items it holdsFolderWrapperX-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset
401An anonymous caller has no external link that grants access to the folder--
403The caller may not read this folder--
404The folder does not exist--
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​

FolderWrapper

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]

Return type: ThirdPartyFolderWrapper

Authorization​

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

HTTP request headers​

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