跳到主要内容

createRoomLogo

FolderWrapper createRoomLogo(id, LogoRequest)

POST /api/2.0/files/rooms/{id}/logo

Set the room logo

Turns an image already uploaded to the portal into the logo of a room and returns the room with the addresses of the four logo sizes. This is the second half of a two-step flow: upload the picture with POST api/2.0/files/logos first and pass the path it returns as tmpFile, because the image itself is never sent here. The temporary file belongs to the account that uploaded it and is consumed by this call, so it cannot be reused for a second room and a path somebody else uploaded is refused. x, y, width and height crop the picture; sending a position without a size is rejected as an invalid request, while a size without a position is accepted. An empty tmpFile leaves the room as it is. A logo replaces the cover in the interface without erasing it, and removing the logo brings the cover back. The caller must be a manager of the room, an archived room is refused, and an unknown room is answered with 404.

Parameters​

NameInTypeDescriptionNotes
idpathInteger (int32)The room the logo is set on.[required] [example: 1]
LogoRequestbodyLogoRequestThe uploaded picture and the piece of it to use.[required]

Responses​

Status codeDescriptionTypeResponse headers
200The room with the addresses of its new logoFolderWrapperX-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset
400The request body cannot be read or has no tmpFile, x or y is outside 0-1280, width or height is missing or outside 1-1280, the crop position lies outside the uploaded picture, or a third-party identifier refers to a storage account that is not connected--
402The logo does not fit into the portal storage quota--
403The caller may not edit this room, the room is archived, or tmpFile is not a picture the caller uploaded--
404No room with this ID exists, tmpFile names no uploaded picture or one already used, or the id is neither a 32-bit number nor a third-party identifier of a known storage type--
500width or height is larger than 2147483647, or a 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 the logo is set on.[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