REST API: Desktop
Generated from the daemon’s OpenAPI document. Conventions, sign-in, the CSRF header and the WebSocket are on API.
GET /api/desktop
Section titled “GET /api/desktop”Responses
- 200:
application/json: DesktopState
Any failure answers with problem details (application/problem+json) and a stable code from the error reference.
PUT /api/desktop/appearance
Section titled “PUT /api/desktop/appearance”Saves the accent color and the wallpaper of the signed-in user, for every device. GET /api/desktop returns them.
Request body: application/json: Appearance
Responses
- 204
Any failure answers with problem details (application/problem+json) and a stable code from the error reference.
GET /api/desktop/devices
Section titled “GET /api/desktop/devices”Responses
- 200:
application/json: DeviceLayout[]
Any failure answers with problem details (application/problem+json) and a stable code from the error reference.
GET /api/desktop/items
Section titled “GET /api/desktop/items”Responses
- 200:
application/json: DesktopItem[]
Any failure answers with problem details (application/problem+json) and a stable code from the error reference.
POST /api/desktop/items
Section titled “POST /api/desktop/items”Creates an item. The answer is 201 with the item, its URL as Location and its version as ETag.
Request body: application/json: NewDesktopItem
Responses
- 201:
application/json: DesktopItem
Any failure answers with problem details (application/problem+json) and a stable code from the error reference.
PATCH /api/desktop/items/{id}
Section titled “PATCH /api/desktop/items/{id}”Changes one item; fields left out stay. Send the item’s version from GET /api/desktop/items or the ETag of its last change as If-Match: “n”. If the item changed in between (for example on another device), the answer is 412 with desktop.item.conflict and the current version in params.version. Without If-Match the change is unconditional. The new version comes back as ETag.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id |
path | integer (int64) | yes | |
If-Match |
header | string | no |
Request body: application/json: DesktopItemChange
Responses
- 200:
application/json: DesktopItem
Any failure answers with problem details (application/problem+json) and a stable code from the error reference.
DELETE /api/desktop/items/{id}
Section titled “DELETE /api/desktop/items/{id}”Deletes one item. Deleting an item that does not exist (any more) also answers 204.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id |
path | integer (int64) | yes |
Responses
- 204
Any failure answers with problem details (application/problem+json) and a stable code from the error reference.
PUT /api/desktop/layout
Section titled “PUT /api/desktop/layout”Saves this device’s layout. Send the version from GET /api/desktop or the ETag of the last save as If-Match: “n”. If another tab saved in between, the answer is 412 with desktop.layout.conflict and the current version in params.version. Without If-Match the save is unconditional. The new version comes back as ETag.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
If-Match |
header | string | no |
Request body: application/json: JsonElement
Responses
- 204
Any failure answers with problem details (application/problem+json) and a stable code from the error reference.
POST /api/desktop/layout/copy
Section titled “POST /api/desktop/layout/copy”Request body: application/json: CopyLayoutRequest
Responses
- 200:
application/json: SavedLayout
Any failure answers with problem details (application/problem+json) and a stable code from the error reference.
PUT /api/desktop/preferences/{appId}
Section titled “PUT /api/desktop/preferences/{appId}”Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
appId |
path | string | yes |
Request body: application/json: WindowPreferenceRequest
Responses
- 204
Any failure answers with problem details (application/problem+json) and a stable code from the error reference.