Get Deployment Information API
This deployment API allows you to look up information from a deployment including the service domain URLS.
First, you’ll need to get the deployment id
. You can get it in two ways.
Option 1: Use Flightcontrol deploy hook
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 fetch the deployment’s status using this deploymentId
value with the Get Deployment Information API.
Option 2: Use GitHub Actions to get the deployment id
In GitHub Actions, you can extract the deployment id from the deployment
or deployment_status
events. We have a guide for this.
API Definition
The Get Deployment Information API requires authentication, and you will need to create an API Key if you do not already have one.
Full Endpoint URL https://api.flightcontrol.dev/v1/deployments/{deploymentId}
Method | Path |
---|---|
GET | /v1/deployments/{deploymentId} |
Headers | |
---|---|
Authorization | Bearer: [API key] |
Path Parameters
Parameter | Type | Description |
---|---|---|
deploymentId | string | This the ID of the deployment you wish to get information on. |
Response Conditions
Success
HTTP/1.1 200 OK
{
"deploymentId": "clcpcxekt000lc9ojqtgtc26y",
"projectId": "cluagwibz000ka6p9uzas7p26",
"environmentId": "clcpcxekw000mc9oj8cjfwd2f",
"environmentGivenId": "production",
"isPreviewEnvironment": false,
"createdAt": "2023-01-09 22:10:02.381",
"repoUrl": "https://github.com/flightcontrolhq/demo-web-api",
"gitCommit": "01e573f2198f120f66b08621fde0256874d0c24d",
"gitBranch": "main",
"status": "INPROGRESS",
"serviceDeployments": [
{
"service": {
"serviceId": "clgf3ruk903rsld01exure1i0",
"serviceGivenId": "web-api",
"serviceName": "Web API",
"serviceDomain": "https://api.mydomain.com",
"type": "web"
},
serviceDeploymentId: "cm1sd9pca00000wrtdjead4c4",
"status": "BUILDING",
"error": null
}
]
}
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 |