Skip to content

List Deployments

GET/agents/{agent_id}/deployments

List deployments for an agent, newest first.

Path ParametersExpand Collapse
agent_id: string
Query ParametersExpand Collapse
limit: optional number

Limit

minimum1
order_by: optional string

Field to order by

order_direction: optional string

Order direction (asc or desc)

page_number: optional number

Page number

minimum1
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.

List Deployments

curl http://localhost:5003/agents/$AGENT_ID/deployments \
    -H "Authorization: Bearer $AGENTEX_SDK_API_KEY"
[
  {
    "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"
  }
]