跳到主要内容

getFolderMetadata

EntryMetadataWrapper getFolderMetadata(folderId)

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

Get folder metadata

Returns the metadata of a folder or a room: the templates assigned to it, directly or inherited from a cascading folder above it, each with its fields, and the custom text fields set on it. The caller needs read access to the folder: a member of the portal, or an anonymous caller through an external link that grants access to the folder or to a folder above it, with the link key in the Request-Token header or in the share query parameter. The call is read-only. A field carries its value inside it; a field the folder holds no value for comes without a value. The custom fields are name and value pairs and are not part of any template. A folder without metadata is answered with empty lists, not with an error. Whether a template cascades from this folder to its content is not reported here. A request with neither a session nor a link key is answered with 401; a folder the caller cannot read with 403, a folder that does not exist with 404.

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
200Folder metadataEntryMetadataWrapperX-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset
401The caller has neither a session nor an external link key--
403You don't have enough permission to perform the operation--
404Folder not found--
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​

EntryMetadataWrapper

Authorization​

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

HTTP request headers​

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