Skip to content

Create Deployment

POST/agents/{agent_id}/deployments

Create a new deployment record in PENDING status.

Path ParametersExpand Collapse
agent_id: string
Body ParametersJSONExpand Collapse
docker_image: string

Full Docker image URI.

helm_release_name: optional string

Helm release name.

registration_metadata: optional map[unknown]

Git/build metadata (commit_hash, branch_name, author_name, author_email, build_timestamp).

sgp_deploy_id: optional string

SGP deployment ID.

ReturnsExpand Collapse
id: string

The unique identifier of the deployment.

agent_id: string

The agent this deployment belongs to.

docker_image: string

Full Docker image URI.

is_production: boolean

Whether this is the production deployment.

status: "Pending" or "Ready" or "Failed"

Current deployment status.

One of the following:
"Pending"
"Ready"
"Failed"
acp_url: optional string

ACP URL set when agent registers.

created_at: optional string

When the deployment was created.

formatdate-time
expires_at: optional string

When marked for cleanup.

formatdate-time
helm_release_name: optional string

Helm release name for cleanup.

When promoted to production.

formatdate-time
registration_metadata: optional map[unknown]

Git/build metadata from the agent pod.

sgp_deploy_id: optional string

Correlates to SGP’s agentex_deploys.id.

Create Deployment

curl http://localhost:5003/agents/$AGENT_ID/deployments \
    -H 'Content-Type: application/json' \
    -H "Authorization: Bearer $AGENTEX_SDK_API_KEY" \
    -d '{
          "docker_image": "docker_image"
        }'
{
  "id": "id",
  "agent_id": "agent_id",
  "docker_image": "docker_image",
  "is_production": true,
  "status": "Pending",
  "acp_url": "acp_url",
  "created_at": "2019-12-27T18:11:19.117Z",
  "expires_at": "2019-12-27T18:11:19.117Z",
  "helm_release_name": "helm_release_name",
  "promoted_at": "2019-12-27T18:11:19.117Z",
  "registration_metadata": {
    "foo": "bar"
  },
  "sgp_deploy_id": "sgp_deploy_id"
}
Returns Examples
{
  "id": "id",
  "agent_id": "agent_id",
  "docker_image": "docker_image",
  "is_production": true,
  "status": "Pending",
  "acp_url": "acp_url",
  "created_at": "2019-12-27T18:11:19.117Z",
  "expires_at": "2019-12-27T18:11:19.117Z",
  "helm_release_name": "helm_release_name",
  "promoted_at": "2019-12-27T18:11:19.117Z",
  "registration_metadata": {
    "foo": "bar"
  },
  "sgp_deploy_id": "sgp_deploy_id"
}