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

Create Feed

POST
/v1/calendar/feeds
curl --request POST \
--url https://api.cloud.agentums.ru/v1/calendar/feeds \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "name": "", "ttl_days": 365 }'

Выдать ссылку-подписку для календарного приложения (Яндекс, Apple, Outlook).

Ссылка публична по построению: календарные клиенты не умеют слать заголовок авторизации, поэтому право доступа несёт токен в самом URL. Отсюда и ttl_days — ограничить срок жизни ссылки, которую нельзя защитить ничем другим. Утекла — отзывайте.

Media typeapplication/json
FeedCreate
object
name
Name
string
""
ttl_days
Ttl Days
integer
default: 365 >= 1 <= 1095

Successful Response

Media typeapplication/json
FeedOut
object
access_count
Access Count
integer
0
created_at
required
Created At
string format: date-time
expires_at
Any of:
string format: date-time
id
required
Id
string format: uuid
last_access_at
Any of:
string format: date-time
name
required
Name
string
url
Url
string
""
webcal_url
Webcal Url
string
""
Example
{
"access_count": 0,
"url": "",
"webcal_url": ""
}

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