Create Feed
POST
/v1/calendar/feeds
const url = 'https://api.cloud.agentums.ru/v1/calendar/feeds';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"name":"","ttl_days":365}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}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 —
ограничить срок жизни ссылки, которую нельзя защитить ничем другим. Утекла — отзывайте.
Authorizations
Заголовок раздела «Authorizations»Request Bodyrequired
Заголовок раздела «Request Bodyrequired»Media typeapplication/json
FeedCreate
object
name
Name
string
ttl_days
Ttl Days
integer
Responses
Заголовок раздела «Responses»Successful Response
Media typeapplication/json
FeedOut
object
Example
{ "access_count": 0, "url": "", "webcal_url": ""}Validation Error
Media typeapplication/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationErrorobject
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" } ]}