Toggle Mcp
PATCH
/v1/deployments/{deployment_id}/mcp/{server_id}
const url = 'https://api.cloud.agentums.ru/v1/deployments/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/mcp/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0';const options = { method: 'PATCH', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"enabled":true}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PATCH \ --url https://api.cloud.agentums.ru/v1/deployments/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/mcp/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0 \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "enabled": true }'Включить или выключить подключение, не теряя его настройку.
Authorizations
Заголовок раздела «Authorizations»Parameters
Заголовок раздела «Parameters»Path Parameters
Заголовок раздела «Path Parameters»deployment_id
required
Deployment Id
string format: uuid
server_id
required
Server Id
string format: uuid
Request Bodyrequired
Заголовок раздела «Request Bodyrequired»Media typeapplication/json
McpServerPatch
Включить или выключить подключение. Больше менять нечего: адрес и секрет заводят заново.
object
enabled
required
Enabled
boolean
Examplegenerated
{ "enabled": true}Responses
Заголовок раздела «Responses»Successful Response
Media typeapplication/json
McpServerOut
Подключение, заведённое этому развёртыванию.
Ни адреса заголовков, ни самих заголовков здесь нет. Наружу уходит только подсказка
вида Authorization: …abcd: заголовок чужого сервера — это, как правило, ключ человека
к постороннему продукту, и отдавать его обратно незачем — он уже у того, кто его ввёл.
object
catalog_code
Catalog Code
string
consent_scope
Consent Scope
object
key
additional properties
any
consent_status
Consent Status
string
enabled
Enabled
boolean
header_hint
Header Hint
string
id
required
Id
string format: uuid
key
required
Key
string
pause_reason
Pause Reason
string
title
required
Title
string
tool_include
Tool Include
Array<string>
transport
required
Transport
string
url
required
Url
string
Example
{ "catalog_code": "", "consent_status": "required", "enabled": true, "header_hint": "", "pause_reason": ""}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" } ]}