Publish Solution To Catalog
POST
/v1/catalog/publish/solution
const url = 'https://api.cloud.agentums.ru/v1/catalog/publish/solution';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"category":"","changelog":"","contact":"","icon":"wrench","repo_url":"","summary":"example","title":"example","url":"example"}'};
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/catalog/publish/solution \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "category": "", "changelog": "", "contact": "", "icon": "wrench", "repo_url": "", "summary": "example", "title": "example", "url": "example" }'Подать в каталог готовое решение — свой сервис, построенный на нашем API.
Отдельный маршрут, а не поле в предыдущем: у решения нет исполняемого тела, оно крутится не у нас, и вместо роли здесь ссылки. Карточка получится витриной со ссылкой «Открыть», а не кнопкой «Установить», — никакого чужого кода это к нам не приносит.
Authorizations
Заголовок раздела «Authorizations»Request Bodyrequired
Заголовок раздела «Request Bodyrequired»Media typeapplication/json
CatalogSolutionIn
Готовое решение — чужой сервис на нашем API. Устанавливать там нечего, поэтому вместо роли здесь ссылки, а вместо кнопки «Установить» на карточке будет «Открыть».
object
category
Category
string
changelog
Changelog
string
contact
Contact
string
icon
Icon
string
repo_url
Repo Url
string
summary
required
Summary
string
title
required
Title
string
url
required
Url
string
Responses
Заголовок раздела «Responses»Successful Response
Media typeapplication/json
CatalogPublishOut
object
listing_id
required
Listing Id
string
state
required
State
string
version
required
Version
integer
Examplegenerated
{ "listing_id": "example", "state": "example", "version": 1}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" } ]}