Skip to main content

addRoomTags

FolderWrapper addRoomTags(id, BatchTagsRequestDto)

PUT /api/2.0/files/rooms/{id}/tags

Attach tags to a room

Attaches the named tags to a room and returns the room with its whole tag set. Tags are portal-wide labels shared by every room, and a name that the catalogue does not hold yet is created there by this call, so attaching is also the short way of adding a tag to the portal. Names already attached to the room are kept as they are, and repeating the call changes nothing, which makes it safe to retry. An empty list is accepted and does nothing, while a blank or overlong name is rejected as an invalid request. The caller must be a manager of the room or an administrator of the portal, and a room in the Archive section is refused with 403. A tag has no identifier of its own and is addressed by name, so GET api/2.0/files/tags is what shows which names already exist. Use DELETE api/2.0/files/rooms/{id}/tags to detach them again, which leaves the tags themselves in the catalogue.

Parameters​

NameInTypeDescriptionNotes
idpathInteger (int32)The room whose tags are changed, named by the identifier that GET api/2.0/files/rooms reports for it.[required] [example: 1]
BatchTagsRequestDtobodyBatchTagsRequestDtoThe names to attach or to detach.[optional]

Responses​

Status codeDescriptionTypeResponse headers
200The room with its tag set after the changeFolderWrapperX-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset
400The request body cannot be read or has no names, a name is null, blank or longer than 255 characters, or a third-party identifier refers to a storage account that is not connected--
403The caller may not edit this room, or the room is archived--
404The room does not exist, or the id is neither a 32-bit number nor a third-party identifier of a known storage type--
500A third-party identifier carries a storage account number beyond the 32-bit range--
401UnauthorizedErrorApiResponse-
429Too Many Requests.ErrorApiResponseRetry-After
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
idpathStringThe room whose tags are changed, named by the identifier that `GET api/2.0/files/rooms` reports for it.[required] [example: sbox-42]

Return type: ThirdPartyFolderWrapper

Authorization​

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

HTTP request headers​

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