Get a deployment
import requests
url = "https://platform.ankra.app/api/v1/org/deployments/{deployment_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://platform.ankra.app/api/v1/org/deployments/{deployment_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request GET \
--url https://platform.ankra.app/api/v1/org/deployments/{deployment_id} \
--header 'Authorization: Bearer <token>'{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"environment": "<string>",
"environment_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"repository_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"repository": "<string>",
"pipeline_run_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"pipeline_step_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"step_attempt": 2,
"release_name": "<string>",
"artifact_repository": "<string>",
"artifact_digest": "<string>",
"artifact_tag": "<string>",
"signature_key_id": "<string>",
"commit_sha": "<string>",
"state": "pending",
"target_count": 1,
"succeeded_count": 1,
"failed_count": 1,
"error_class": "<string>",
"error_message": "<string>",
"requested_by": "<string>",
"started_at": "2023-11-07T05:31:56Z",
"finished_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"targets": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"deployment_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"host_target_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"host_target_name": "<string>",
"status": "pending",
"attempt": 2,
"timeout_seconds": 2,
"claimed_at": "2023-11-07T05:31:56Z",
"heartbeat_at": "2023-11-07T05:31:56Z",
"times_out_at": "2023-11-07T05:31:56Z",
"finished_at": "2023-11-07T05:31:56Z",
"previous_digest": "<string>",
"running_digest": "<string>",
"result": {},
"error_class": "<string>",
"error_message": "<string>",
"log_artifact_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
],
"targets_truncated": true
}Deploy Targets
Get a deployment
One deployment with the outcome on each host target it went to. Requires pipelines.read.
GET
/
api
/
v1
/
org
/
deployments
/
{deployment_id}
Get a deployment
import requests
url = "https://platform.ankra.app/api/v1/org/deployments/{deployment_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://platform.ankra.app/api/v1/org/deployments/{deployment_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request GET \
--url https://platform.ankra.app/api/v1/org/deployments/{deployment_id} \
--header 'Authorization: Bearer <token>'{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"environment": "<string>",
"environment_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"repository_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"repository": "<string>",
"pipeline_run_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"pipeline_step_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"step_attempt": 2,
"release_name": "<string>",
"artifact_repository": "<string>",
"artifact_digest": "<string>",
"artifact_tag": "<string>",
"signature_key_id": "<string>",
"commit_sha": "<string>",
"state": "pending",
"target_count": 1,
"succeeded_count": 1,
"failed_count": 1,
"error_class": "<string>",
"error_message": "<string>",
"requested_by": "<string>",
"started_at": "2023-11-07T05:31:56Z",
"finished_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"targets": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"deployment_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"host_target_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"host_target_name": "<string>",
"status": "pending",
"attempt": 2,
"timeout_seconds": 2,
"claimed_at": "2023-11-07T05:31:56Z",
"heartbeat_at": "2023-11-07T05:31:56Z",
"times_out_at": "2023-11-07T05:31:56Z",
"finished_at": "2023-11-07T05:31:56Z",
"previous_digest": "<string>",
"running_digest": "<string>",
"result": {},
"error_class": "<string>",
"error_message": "<string>",
"log_artifact_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
],
"targets_truncated": true
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Response
The deployment and its targets.
One release of a published artefact digest to the host targets of an environment.
The name of the environment the release was deployed to.
Pattern:
^[a-z0-9][a-z0-9-]{0,62}$The pipeline repository as owner/name; null when it is no longer connected.
Required range:
x >= 1Pattern:
^sha256:[a-f0-9]{64}$Available options:
pending, running, succeeded, failed, cancelled, timed_out Required range:
x >= 0Required range:
x >= 0Required range:
x >= 0Show child attributes
Show child attributes
True when targets stopped at its 1000-row cap; target_count still carries the total.