Crescendo Lab ドキュメント
日本語
無料で始める

Deployments API リファレンス

Platform API v1 の Deployments:各操作のパス、パラメーター、リクエストとレスポンスのフィールド、スコープ、冪等性、エラーをコントラクトから掲載します。

最終更新

API コントラクト(Agent Lab Platform API 1.0.0-alpha.1)から生成しています。説明文はコントラクトの英語の原文のままです。

What answers each channel entry point. An application deploys itself as an entry's responder, optionally with a deployed configuration: an agent configuration it publishes for the entry, which the platform runs on every event of the entry. Without one, the entry's events are delivered to the application (sdk-event/v1).

The workspace's channel deployments#

GET /v1/workspaces/{workspaceId}/deployments

Every channel entry point of the workspace and what answers it, active and disabled: an application (responder: "application"), or an assistant the console deployed (responder: "agent"). Of a deployed configuration only its agentRef, revision and time are answered. Any member may read it.

スコープ実行主体認証Idempotency-Key
channels:readmemberinstallationToken—

パラメーター

名前場所型必須説明
workspaceIdpathstringはいThe workspace, by id. It must be the installation's.
Agentlab-On-Behalf-OfheaderstringはいThe account id of the member the installation acts for: a current member of the workspace whose sign-in to the application there is still live, neither revoked nor expired. When the member's sign-in expires, the application acts for them again once they sign in again.
cursorquerystringいいえThe nextCursor of the previous page. Opaque.
limitqueryintegerいいえItems per page. 既定値: 50.

レスポンス

ステータスボディ説明
200application/json: DeploymentPageA page of deployments.
400application/json: ErrorThe request itself is wrong, such as a cursor this list did not answer (recovery: none).
401application/json: ErrorNo token, or a token the platform does not honor.
403application/json: ErrorRefused: SCOPE_NOT_GRANTED (configure); WORKSPACE_NOT_INSTALLED, the path names a workspace other than the installation's (configure); MEMBER_REQUIRED, no single Agentlab-On-Behalf-Of (none); MEMBER_NOT_AUTHORIZED, the named account is not a current member who signed in to the application here, or the member may not read or do this (authorize); SERVER_TO_SERVER_ONLY, sent from a browser (none); PRODUCT_ACCESS_DENIED, the workspace's plan does not include it (configure).
404application/json: ErrorNo such operation or resource.
429application/json: ErrorRate limited (recovery: retry).
503application/json: ErrorTry again later (recovery: retry).

Answer a channel entry point with this application#

POST /v1/workspaces/{workspaceId}/deployments

Makes the calling installation's application the responder of one entry point: a Slack workspace (entryKind: "slack", entryRef its team id), one Slack channel ("slack_channel", entryRef teamId/channelId) or a LINE official account ("line", entryRef its destination id), held by a channel connection of this workspace. The acting member must be one who may manage the workspace (MEMBER_NOT_AUTHORIZED). An entry point something already answers is ENTRY_ALREADY_DEPLOYED; one the workspace does not hold is not found.

With agent, the entry gets a deployed configuration as its revision 1: the platform runs every event of the entry with it, for the acting member, and the application's server need not be up. It is checked as POST …/runs checks a run's configuration, for the acting member, and every problem is answered at once (RUN_CONFIGURATION_INVALID); its MCP connections must be organization-shared ones, because its answers reach everyone in the channel. Without agent, the entry's events are delivered to the application as sdk-event/v1 (which needs channels:respond), and it answers them itself or with a run's replyTo.

Send Idempotency-Key: without one, a retried request may answer ENTRY_ALREADY_DEPLOYED.

スコープ実行主体認証Idempotency-Key
deployments:writememberinstallationToken対応

パラメーター

名前場所型必須説明
workspaceIdpathstringはいThe workspace, by id. It must be the installation's.
Agentlab-On-Behalf-OfheaderstringはいThe account id of the member the installation acts for: a current member of the workspace whose sign-in to the application there is still live, neither revoked nor expired. When the member's sign-in expires, the application acts for them again once they sign in again.
Idempotency-KeyheaderstringいいえMakes a creating call safe to retry. The same key and body within 24 hours answer the first answer again; the same key with a different body is 409.

リクエストボディ

application/json: DeploymentCreate

フィールド型必須説明
entryKindstringはいslack, slack_channel or line; values may be added later.
entryRefstringはいThe entry point in the channel's own terms, as createDeployment describes.
agentAgentConfigいいえ—

レスポンス

ステータスボディ説明
201application/json: DeploymentThe deployment.
400application/json: ErrorThe request itself is wrong, such as a cursor this list did not answer (recovery: none).
401application/json: ErrorNo token, or a token the platform does not honor.
403application/json: ErrorRefused: SCOPE_NOT_GRANTED (configure); WORKSPACE_NOT_INSTALLED, the path names a workspace other than the installation's (configure); MEMBER_REQUIRED, no single Agentlab-On-Behalf-Of (none); MEMBER_NOT_AUTHORIZED, the named account is not a current member who signed in to the application here, or the member may not read or do this (authorize); SERVER_TO_SERVER_ONLY, sent from a browser (none); PRODUCT_ACCESS_DENIED, the workspace's plan does not include it (configure).
404application/json: ErrorNo such operation or resource.
409application/json: ErrorNothing changed: REVISION_CONFLICT, the entry's deployed configuration is no longer the revision named, read the deployment again (none); ENTRY_ALREADY_DEPLOYED, something already answers the entry point (none); or the Idempotency-Key conflict IdempotencyConflict describes.
413application/json: ErrorThe body is larger than the operation accepts (PAYLOAD_TOO_LARGE, recovery: none).
422application/json: ErrorRUN_CONFIGURATION_INVALID: the body or its configuration has problems, each in problems with its field (none); nothing was stored.
429application/json: ErrorRate limited (recovery: retry).
503application/json: ErrorTry again later (recovery: retry).

Publish a deployed configuration for an entry point#

PUT /v1/workspaces/{workspaceId}/deployments/{deploymentId}/agent

Replaces the deployed configuration of an active entry point this application answers with agent, as its next revision, when the entry still holds expectedRevision (0 for an entry with none yet); otherwise REVISION_CONFLICT and nothing changes. The replacement is atomic: an event is answered by the configuration deployed when it arrived, never by a mix, and a run already started keeps the configuration it started with. The configuration is immutable once deployed; publishing again is another revision. It is checked as createDeployment checks one, for the acting member, who must be one who may manage the workspace; its runs then act for that member. An entry of another application, a disabled one or another workspace's is not found.

スコープ実行主体認証Idempotency-Key
deployments:writememberinstallationToken—

パラメーター

名前場所型必須説明
workspaceIdpathstringはいThe workspace, by id. It must be the installation's.
Agentlab-On-Behalf-OfheaderstringはいThe account id of the member the installation acts for: a current member of the workspace whose sign-in to the application there is still live, neither revoked nor expired. When the member's sign-in expires, the application acts for them again once they sign in again.
deploymentIdpathstringはいThe deployment, by id.

リクエストボディ

application/json: DeployedAgentReplace

フィールド型必須説明
agentAgentConfigはい—
expectedRevisionintegerはいThe revision this replaces, as the deployment answered it; 0 for the first.

レスポンス

ステータスボディ説明
200application/json: DeploymentThe deployment with its new revision.
400application/json: ErrorThe request itself is wrong, such as a cursor this list did not answer (recovery: none).
401application/json: ErrorNo token, or a token the platform does not honor.
403application/json: ErrorRefused: SCOPE_NOT_GRANTED (configure); WORKSPACE_NOT_INSTALLED, the path names a workspace other than the installation's (configure); MEMBER_REQUIRED, no single Agentlab-On-Behalf-Of (none); MEMBER_NOT_AUTHORIZED, the named account is not a current member who signed in to the application here, or the member may not read or do this (authorize); SERVER_TO_SERVER_ONLY, sent from a browser (none); PRODUCT_ACCESS_DENIED, the workspace's plan does not include it (configure).
404application/json: ErrorNo such operation or resource.
409application/json: ErrorNothing changed: REVISION_CONFLICT, the entry's deployed configuration is no longer the revision named, read the deployment again (none); ENTRY_ALREADY_DEPLOYED, something already answers the entry point (none); or the Idempotency-Key conflict IdempotencyConflict describes.
413application/json: ErrorThe body is larger than the operation accepts (PAYLOAD_TOO_LARGE, recovery: none).
422application/json: ErrorRUN_CONFIGURATION_INVALID: the body or its configuration has problems, each in problems with its field (none); nothing was stored.
429application/json: ErrorRate limited (recovery: retry).
503application/json: ErrorTry again later (recovery: retry).