changeRoomGroupIcon
RoomGroupWrapper changeRoomGroupIcon(id, IconRequest)
POST /api/2.0/files/group/{id}/icon
Change room group icon
Replaces the icon of one of the caller's own room groups and returns the whole group, its name and its rooms left as they were. Send the identifier of one of the built-in covers offered by GET api/2.0/files/rooms/covers; an empty string strips the icon, after which the group comes back with an empty icon, and any other value - including a word that merely reads like one, such as none - is rejected as an invalid request. An uploaded image cannot be used here, unlike the logo of a room. Leaving icon out of the body or sending it as null is accepted and changes nothing, whereas a request that carries no body at all, or a body that is not JSON, is refused. Setting the icon the group already has is accepted as well, so retrying the call is safe. Any role may re-icon its own group, and a group belonging to another account is answered as missing rather than refused, exactly as reading it would be.
Parameters
| Name | In | Type | Description | Notes |
|---|---|---|---|---|
| id | path | Integer (int32) | The room group to re-icon, identified by the value GET api/2.0/files/group reports for it. A group of another account cannot be addressed and reads as missing. | [required] [example: 42] |
| IconRequest | body | IconRequest | The icon to give the group. A body that leaves the icon out is accepted and changes nothing. | [optional] |
Responses
| Status code | Description | Type | Response headers |
|---|---|---|---|
| 200 | The room group with the new icon | RoomGroupWrapper | X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset |
| 400 | The request body cannot be read, or the icon is neither a built-in cover nor an empty string | - | - |
| 404 | The group does not exist or belongs to another account | - | - |
| 401 | Unauthorized | ErrorApiResponse | - |
| 429 | Too Many Requests. | ErrorApiResponse | Retry-After |
| 500 | Internal Server Error. | ErrorApiResponse | - |
| 502 | Bad Gateway. Returned by the reverse proxy, response body may be HTML and not JSON. | - | - |
| 503 | Service Unavailable. Returned by the reverse proxy, response body may be HTML and not JSON. | - | - |
Return type
Authorization
Basic, OAuth2 (scopes: read, write), ApiKeyBearer, asc_auth_key, Bearer, OpenId
HTTP request headers
- Content-Type: application/json
- Accept: application/json