Getting started
Get a deployment
Read the status, source revision and diagnosis for a deployment in this project.
GET
/api/customer/v1/projects/{projectId}/deployments/{deploymentId}Path parameters
| Name | Value |
|---|---|
projectId | Required resource ID from an earlier API response. |
deploymentId | Required resource ID from an earlier API response. |
Example request
Set HCODE_BASE_URL and HCODE_API_KEY as shown in Getting started. Replace resource variables with your own IDs.
curl --request GET "$HCODE_BASE_URL/api/customer/v1/projects/${PROJECT_ID}/deployments/${DEPLOYMENT_ID}" \
--header "Authorization: Bearer $HCODE_API_KEY" Response
The JSON shape is defined in the response schema.
Response schema
{
"type": "object",
"properties": {
"deployment": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"projectId": {
"type": "string"
},
"status": {
"type": "string"
},
"trigger": {
"type": "string"
},
"commitSha": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"commitMessage": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"branch": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"startedAt": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"finishedAt": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"createdAt": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"durationSeconds": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
]
}
},
"required": [
"id",
"status"
],
"additionalProperties": true
}
},
"required": [
"deployment"
],
"additionalProperties": true
}See errors and retries for failure responses.