Перейти к содержимому

Update Theme

PATCH
/v1/themes/{theme_id}
curl --request PATCH \
--url https://api.cloud.agentums.ru/v1/themes/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0 \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "icon": "example", "is_hidden": true, "name": "example" }'

Переименовать тему, сменить значок или спрятать её целиком.

is_hidden каскадит: вслед за темой в зону «Скрытые» уходят все её папки и все файлы в них — и так же возвращаются обратно. Это единственная операция здесь с последствиями за пределами самой темы.

theme_id
required
Theme Id
string format: uuid
Media typeapplication/json
ThemeUpdate
object
icon
Any of:
string
<= 32 characters
is_hidden
Any of:
boolean
name
Any of:
string
>= 1 characters <= 200 characters
Examplegenerated
{
"icon": "example",
"is_hidden": true,
"name": "example"
}

Successful Response

Media typeapplication/json
ThemeOut
object
created_at
required
Created At
string format: date-time
folder_count
Folder Count
integer
0
icon
Icon
string
""
id
required
Id
string format: uuid
is_hidden
Is Hidden
boolean
name
required
Name
string
Example
{
"folder_count": 0,
"icon": "",
"is_hidden": false
}

Validation Error

Media typeapplication/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationError
object
ctx
Context
object
input
Input
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
Examplegenerated
{
"detail": [
{
"ctx": {},
"input": "example",
"loc": [
"example"
],
"msg": "example",
"type": "example"
}
]
}