Get Deployment Information API
After triggering a deployment using the Deploy Hooks API, you will receive a unique deploymentId
value in the HTTPS response message.
{"success": true, "deploymentId": "clgf4cwx5074nr81fy1srp947"}
You can poll the deployment's status using this deploymentId
value with the Get Deployment Information API.
The Get Deployment Information API requires authentication, and you will need to create an API Key if you do not already have one.
API Definition
Method | Path |
---|---|
GET | /api/deployments/{deploymentId} |
Headers | |
---|---|
Authorization | [API key] |
Path Parameters
Parameter | Type | Description |
---|---|---|
deploymentId | string | This the ID of the deployment you wish to get information on. |
Full Endpoint URL https://app.flightcontrol.dev/api/deployments/{deploymentId}
Response Example
Below is an example response for a deployment that is currently in progress.
{
"deploymentId": "clcpcxekt000lc9ojqtgtc26y",
"createdAt": "2023-01-09 22:10:02.381",
"environmentGivenId": "production",
"environmentId": "clcpcxekw000mc9oj8cjfwd2f",
"repoUrl": "https://github.com/flightcontrolhq/demo-web-api",
"gitCommit": "01e573f2198f120f66b08621fde0256874d0c24d",
"gitBranch": "main",
"status": "INPROGRESS",
"serviceDeployments": [
{
"service": {
"serviceGivenId": "clgf3ruk903rsld01exure1i0",
"serviceName": "web-api",
"type": "fargate"
},
"status": "BUILDING",
"error": null
}
]
}
Response Conditions
Success
Errors
Statuses
The statuses of the deployment and service deployment will go through the various "In Progress" stages and will eventually settle on one of the "Finished" values.
These are the possible values for each general stage:
In Progress
Value | Notes |
---|---|
PENDING | Indicates that this deployment is awaiting the previous deployment |
INPROGRESS | Indicates preparation of the deployment and service for build |
BUILDING | Indicates the build phase of a deployment or service deployment |
DEPLOYING | Indicates the deploy phase of a deployment or service deployment |
PENDING_DEPENDENCY | Indicates that the service deployment is waiting for another service to complete its build/deployment before continuing its progress |
PROVISIONING | Indicates that Flightcontrol is provisioning the AWS resources needed for the service deployment |
Finished
Value | Notes |
---|---|
SUCCESS | Indicates a complete & healthy deployment or service deployment |
NO_CHANGE | Indicates that there is no change in the deployment- this is a success case when using watch paths for a service, and this will also occur if there were no changes to an RDS service |
CANCELLED | Indicates that the deployment or service deployment was cancelled, this can happen when other services in the deployment error or if the user cancels a deployment |
ERROR | Indicates a general error state |
BUILD_ERROR | Indicates an error during the build phase |
DEPLOY_ERROR | Indicates an error during the deploy phase |