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

Create Collection

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

Создать папку. parent_id вкладывает её в другую, theme_id относит к теме.

is_hidden=true заводит папку сразу в зоне «Скрытые»: её содержимое не попадёт ни в списки, ни в поиск, ни в ответы, пока зона не разблокирована по PIN.

Media typeapplication/json
CollectionCreate
object
icon
Icon
string
"" <= 32 characters
is_hidden
Is Hidden
boolean
name
required
Name
string
>= 1 characters <= 200 characters
parent_id
Any of:
string format: uuid
theme_id
Any of:
string format: uuid

Successful Response

Media typeapplication/json
CollectionOut
object
created_at
required
Created At
string format: date-time
has_note
Has Note
boolean
icon
Icon
string
""
id
required
Id
string format: uuid
is_hidden
Is Hidden
boolean
name
required
Name
string
name_mode
Any of:
string
object_count
Object Count
integer
0
parent_id
Any of:
string format: uuid
theme_id
Any of:
string format: uuid
Example
{
"has_note": false,
"icon": "",
"is_hidden": false,
"object_count": 0
}

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"
}
]
}