For the complete documentation index, see llms.txt. This page is also available as Markdown.

Deployments

Create, finalize, and resolve deployments to publish and serve project artifacts.

Create a deployment

post

Create a deployment and receive signed upload URLs for the files Argos doesn't already store. Files already present (matched by content hash) are reused and omitted from uploadFiles. The environment is inferred from the branch when omitted.

Authorizations
AuthorizationstringRequired

Authenticate as a project with a project token.

Send it as a bearer token in the Authorization header:

Authorization: Bearer <project-token>

You can find your project token in your Argos project settings. Project tokens are used by CI and the SDK to create builds and deployments.

Body
commitstringRequired

The commit SHA

Pattern: ^[0-9a-f]{40}$
branchstring · min: 1Required

The branch name

prNumberinteger · min: 1 · max: 9007199254740991 · nullableOptional

The pull request number

prHeadCommitstring · nullableOptional

The head commit of the pull request. When commit is a merge commit built for the pull request, such as the test-merge commit GitHub Actions checks out, the deployment status is reported on this commit, where the pull request shows it.

Pattern: ^[0-9a-f]{40}$
environmentstring · enumOptional

The deployment environment. When omitted, it is inferred from branch: branches matching the configured production-branch glob are treated as production; all others default to preview.

Possible values:
Responses
201

Deployment created

application/json
deploymentIdstringRequired
post/deployments
POST /v2/deployments HTTP/1.1
Host: api.argos-ci.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 162

{
  "commit": "text",
  "branch": "text",
  "prNumber": 1,
  "prHeadCommit": "text",
  "environment": "preview",
  "files": [
    {
      "path": "text",
      "hash": "text",
      "size": 1,
      "contentType": "text"
    }
  ]
}
{
  "deploymentId": "text",
  "uploadFiles": [
    {
      "path": "text",
      "hash": "text",
      "uploadUrl": "https://example.com"
    }
  ]
}

Get a deployment

get

Retrieve a single deployment by its ID.

Authorizations
AuthorizationstringRequired

Authenticate as a project with a project token.

Send it as a bearer token in the Authorization header:

Authorization: Bearer <project-token>

You can find your project token in your Argos project settings. Project tokens are used by CI and the SDK to create builds and deployments.

Path parameters
deploymentIdstringRequired

The deployment ID

Responses
200

Deployment details

application/json
idstringRequired
statusstring · enumRequiredPossible values:
environmentstring · enumRequiredPossible values:
branchstring · min: 1Required
commitShastringRequired

SHA256 hash

Pattern: ^[A-Fa-f0-9]{64}$
urlstring · uriRequired
createdAtstringRequired
get/deployments/{deploymentId}
GET /v2/deployments/{deploymentId} HTTP/1.1
Host: api.argos-ci.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "id": "text",
  "status": "pending",
  "environment": "preview",
  "branch": "text",
  "commitSha": "text",
  "url": "https://example.com",
  "createdAt": "text"
}

Finalize a deployment

post

Mark a deployment as ready once all of its files have been uploaded. Argos assigns the deployment's aliases and starts serving it.

Authorizations
AuthorizationstringRequired

Authenticate as a project with a project token.

Send it as a bearer token in the Authorization header:

Authorization: Bearer <project-token>

You can find your project token in your Argos project settings. Project tokens are used by CI and the SDK to create builds and deployments.

Path parameters
deploymentIdstringRequired

The deployment ID

Responses
200

Deployment finalized

application/json
idstringRequired
statusstring · enumRequiredPossible values:
environmentstring · enumRequiredPossible values:
branchstring · min: 1Required
commitShastringRequired

SHA256 hash

Pattern: ^[A-Fa-f0-9]{64}$
urlstring · uriRequired
createdAtstringRequired
post/deployments/{deploymentId}/finalize
POST /v2/deployments/{deploymentId}/finalize HTTP/1.1
Host: api.argos-ci.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "id": "text",
  "status": "pending",
  "environment": "preview",
  "branch": "text",
  "commitSha": "text",
  "url": "https://example.com",
  "createdAt": "text"
}

Resolve a deployment domain

get

Resolve a deployment domain or URL to the deployment it currently serves. This endpoint is public and does not require authentication.

Path parameters
domainstringRequired

A deployment domain or URL

Responses
200

Deployment domain resolved

application/json
deploymentIdstringRequired
projectIdstringRequired
environmentstring · enumRequiredPossible values:
visibilitystring · enumRequiredPossible values:
get/deployments/resolve/{domain}
GET /v2/deployments/resolve/{domain} HTTP/1.1
Host: api.argos-ci.com
Accept: */*
{
  "deploymentId": "text",
  "projectId": "text",
  "environment": "preview",
  "visibility": "private"
}

List a project's deployments

get

List a project's deployments, most recent first. Use environment to keep only the production ones — the deployments that answer "what is live right now?".

Authorizations
AuthorizationstringRequired

Authenticate as a project with a project token.

Send it as a bearer token in the Authorization header:

Authorization: Bearer <project-token>

You can find your project token in your Argos project settings. Project tokens are used by CI and the SDK to create builds and deployments.

Path parameters
ownerstring · min: 1Required
projectstring · min: 1Required
Query parameters
perPagestringOptional

Number of items per page (max 100)

pagestringOptional

Page number

environmentstring · enumOptional

Restrict to one environment.

Possible values:
Responses
200

List of deployments

application/json
get/projects/{owner}/{project}/deployments
GET /v2/projects/{owner}/{project}/deployments HTTP/1.1
Host: api.argos-ci.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "pageInfo": {
    "total": 1,
    "page": 1,
    "perPage": 1
  },
  "results": [
    {
      "id": "text",
      "status": "pending",
      "environment": "preview",
      "branch": "text",
      "commitSha": "text",
      "url": "https://example.com",
      "createdAt": "text"
    }
  ]
}

Get a project's deployment domain

get

Retrieve the domain the project's production deployments are served on.

Authorizations
AuthorizationstringRequired

Authenticate as a project with a project token.

Send it as a bearer token in the Authorization header:

Authorization: Bearer <project-token>

You can find your project token in your Argos project settings. Project tokens are used by CI and the SDK to create builds and deployments.

Path parameters
ownerstring · min: 1Required
projectstring · min: 1Required
Responses
200

The production deployment domain

application/json

A project's production deployment domain.

domainstring · nullableRequired

The project's production deployment domain, null when deployments are disabled or no domain is set.

get/projects/{owner}/{project}/domain
GET /v2/projects/{owner}/{project}/domain HTTP/1.1
Host: api.argos-ci.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "domain": null
}

Set a project's deployment domain

put

Set the domain the project's production deployments are served on. Requires administrator access to the project. Only domains under the Argos deployments domain are accepted, and reserved slugs are refused.

Authorizations
AuthorizationstringRequired

Authenticate as a user with a personal access token.

Send it as a bearer token in the Authorization header:

Authorization: Bearer <personal-access-token>

Personal access tokens act on behalf of the user that created them and are required by endpoints that perform user actions, such as reviewing builds and posting comments.

Path parameters
ownerstring · min: 1Required
projectstring · min: 1Required
Body
domainstring · min: 1Required

The full domain to serve production deployments on, under the Argos deployments domain — e.g. acme-web.argos-ci.live.

Example: acme-web.argos-ci.live
Responses
200

The updated production deployment domain

application/json

A project's production deployment domain.

domainstring · nullableRequired

The project's production deployment domain, null when deployments are disabled or no domain is set.

put/projects/{owner}/{project}/domain
PUT /v2/projects/{owner}/{project}/domain HTTP/1.1
Host: api.argos-ci.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 35

{
  "domain": "acme-web.argos-ci.live"
}
{
  "domain": null
}

Last updated

Was this helpful?