Deployments
Create, finalize, and resolve deployments to publish and serve project artifacts.
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.
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.
The commit SHA
^[0-9a-f]{40}$The branch name
The pull request number
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.
^[0-9a-f]{40}$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.
Deployment created
Invalid parameters
Unauthorized
Server error
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"
}
]
}Retrieve a single deployment by its ID.
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.
The deployment ID
Deployment details
SHA256 hash
^[A-Fa-f0-9]{64}$Invalid parameters
Unauthorized
Not found
Server error
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"
}Mark a deployment as ready once all of its files have been uploaded. Argos assigns the deployment's aliases and starts serving it.
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.
The deployment ID
Deployment finalized
SHA256 hash
^[A-Fa-f0-9]{64}$Invalid parameters
Unauthorized
Not found
Server error
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 or URL to the deployment it currently serves. This endpoint is public and does not require authentication.
A deployment domain or URL
Deployment domain resolved
Invalid parameters
Not found
Server error
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, most recent first. Use environment to keep only the production ones — the deployments that answer "what is live right now?".
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.
Number of items per page (max 100)
Page number
Restrict to one environment.
List of deployments
Invalid parameters
Unauthorized
Not found
Server error
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"
}
]
}Retrieve the domain the project's production deployments are served on.
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.
The production deployment domain
A project's production deployment domain.
The project's production deployment domain, null when deployments are disabled or no domain is set.
Invalid parameters
Unauthorized
Not found
Server error
GET /v2/projects/{owner}/{project}/domain HTTP/1.1
Host: api.argos-ci.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"domain": null
}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.
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.
The full domain to serve production deployments on, under the Argos deployments domain — e.g. acme-web.argos-ci.live.
acme-web.argos-ci.liveThe updated production deployment domain
A project's production deployment domain.
The project's production deployment domain, null when deployments are disabled or no domain is set.
Invalid parameters
Unauthorized
Forbidden
Not found
Server error
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?