开始释放为运行时会话保留的代理和工具沙盒容量,然后立即返回,状态为停止中。这不会删除会话、消息或执行记录。在发布进行期间重复请求会返回相同的已接受省/市/自治区,而不会启动另一次发布。返回 404,当工作区没有用于会话的预留或释放运行时。Retry-After 指示何时再次列出运行时会话。发布在背景继续。
POST /API/v1/项目/{id}/工作区/{workspace_id}/运行时会话/{session_id}/停止
curl \
--request POST 'https://agentengine.mongodb.com/api/v1/projects/{id}/workspaces/{workspace_id}/runtime-sessions/{session_id}/stop' \
--header "Authorization: $API_KEY"
响应示例 (406)
操作不可用
{
"detail": "This operation is not available in API version 2026-09-20-preview.",
"error": 406,
"errorCode": "OPERATION_NOT_IN_API_VERSION",
"parameters": [
"Accept"
],
"reason": "Not Acceptable"
}
{
"detail": "This operation supports text/event-stream, which the Accept header excludes. Remove unsupported media-type parameters or accept this type with a positive q value.",
"error": 406,
"errorCode": "UNACCEPTABLE_MEDIA_TYPE",
"parameters": [
"Accept"
],
"reason": "Not Acceptable"
}
{
"detail": "The requested API version is not supported. Supported versions: 2026-09-20-preview.",
"error": 406,
"errorCode": "UNSUPPORTED_API_VERSION",
"parameters": [
"Accept"
],
"reason": "Not Acceptable"
}
响应示例 (406)
{
"detail": "This operation is not available in API version 2026-09-20-preview.",
"error": 406,
"errorCode": "OPERATION_NOT_IN_API_VERSION",
"parameters": [
"Accept"
],
"reason": "Not Acceptable"
}
响应示例 (202)
# Headers
Retry-After: string
# Payload
{
"session_id": "string",
"status": "string"
}
响应示例 (202)
# Headers
Retry-After: string
# Payload
{
"session_id": "string",
"status": "string"
}
响应示例 (400)
{
"code": "string",
"error": "string",
"success": true
}
响应示例 (400)
{
"code": "string",
"error": "string",
"success": true
}
响应示例 (401)
{
"code": "string",
"error": "string",
"success": true
}
响应示例 (401)
{
"code": "string",
"error": "string",
"success": true
}
响应示例 (403)
{
"code": "string",
"error": "string",
"success": true
}
响应示例 (403)
{
"code": "string",
"error": "string",
"success": true
}
响应示例 (404)
{
"code": "string",
"error": "string",
"success": true
}
响应示例 (404)
{
"code": "string",
"error": "string",
"success": true
}
响应示例 (425)
{
"code": "string",
"error": "string",
"success": true
}
响应示例 (425)
{
"code": "string",
"error": "string",
"success": true
}
响应示例 (500)
{
"code": "string",
"error": "string",
"success": true
}
响应示例 (500)
{
"code": "string",
"error": "string",
"success": true
}
响应示例 (502)
{
"code": "string",
"error": "string",
"success": true
}
响应示例 (502)
{
"code": "string",
"error": "string",
"success": true
}