Creates a new Deployment, binding an Agent and configuring the trigger method. The request body carries the Agent reference, schedule, and initial events; the response returns the complete Deployment object.
Prerequisites
Endpoint and authentication configured. For details, see API overview and authentication.
Endpoint
POST /deployments
Request bodynamestring (必选)Deployment name, max 256 charactersdescription string (可选)Description of the deployment purposeagent object (必选)Associated Agentenvironment_id string (可选)Associated Environment IDschedule object (可选)Scheduled trigger configuration; omit for manual triggerinitial_events array<object> (必选)List of initial events sent to the Agent on trigger, 1-50 itemsresources array<object> (可选)List of mounted file resourcesvault_ids array<string> (可选)Associated Vault ID listmetadata object (可选)Business custom key-value pairs | Request example |
Response fieldsidstringDeployment IDtype stringFixed value deploymentname stringDeployment namedescription stringDescription of the deployment purposeagent object—environment_id string—schedule object—initial_events array<object>—resources array<object>—vault_ids array<string>—metadata object—status string—paused_reason object | nullPause reason, returned only when the status is pausedarchived_at string | null—created_at string—updated_at string—request_id stringUnique identifier of this request, include it when troubleshooting | Response |
Error codes
| HTTP status | Error code | Description |
|---|---|---|
| 400 | InvalidParameter | Required parameter missing or invalid. |
| 401 | InvalidApiKey | Invalid API-key provided. |