Deployment Events

Deployment Events Schema

When a Deployment Event is sent to our platform from an integration, it is transformed into a standardized format in line with the schema documented on this page. In all cases, the raw Event data—from both known and unknown Event types—is also stored in our database for possible use in the future.

Deployment Event States

Deployment Events represent the different states of your infrastructure as a deployment occurs. Irrespective of source, all supported Events received from our integrations are transformed into one of these states before being processed by our platform or used to calculate Insights metrics.

Event Description
SuccessDeployment of new change has completed successfully.
FailureDeployment of new change has failed.
StartedDeployment of new change has started.
ProgressingDeployment of new change is in progress.
BlockedDeployment of new change is blocked. The cause of the blocked deployment is dependent on the source infrastructure. (For example, the deployment mechanism may have features that allow deployments to wait for approval.)

For deriving Insights about your deployment processes, we currently use just two events—Success and Failure—which record the completion status of a deployment process. However, we still collect other events for use in workflow triggers and other future uses.

Deployment Event Object Schema

Beyond receiving Events from our integrations, you can also send Events to our platform via our API. This section documents the schemas for the expected format of Deployment Events sent to our platform.

For more information about integrating your development lifecycle with the CTO.ai platform directly through our API, head over to our Collect Events via API page.

Deployment Event Schema

Deployment Events represent the different stages of your infrastructure as a deployment occurs. This is the general structure of a JSON object representing a Deployment Event:

{
   "branch": "",
   "commit": "",
   "environment": "",
   "event_action": "{started|progressing|blocked|success|failure}",
   "event_name": "deployment",
   "finished_at": "",
   "id": 12345,
   "image": "",
   "meta": "",
   "repo": "",
   "started_at": "",
   "team_id": "",
   "vcs": "[name of vcs provider]"
}
event_name
stringrequired
For deployment events, this value must always be deployment.
event_action
stringrequired
This should be one of the Deployment Lifecycle States defined on the Event Types page.
Accepted Values
The value of this field should be one of the following:
  • started
  • progressing
  • blocked
  • success
  • failure
vcs
stringrequired
The name of the Verson Control System (VCS) provider that originated the deployment.
repo
stringrequired
The name of the repository that triggered the deployment.
branch
stringrequired
The name of the branch that triggered the deployment.
commit
stringrequired
The SHA hash of the commit that triggered the deployment.
environment
stringrequired
A string that uniquely represents the environment that the deployment is targeting.
team_id
stringrequired
The ID of the Team on the CTO.ai platform to associate with this event.
id
integer
Optionally provide an ID for this deployment event.
started_at
string
A datetime string in ISO 8601 format that indicates when the Deployment Lifecycle entered the current state.
finished_at
string
A datetime string in ISO 8601 format that indicates when the Deployment Lifecycle exited the current state.
image
string
Optionally provide an identifier for the container image that is associated with the current deployment.
meta
object
Optionally provide a JSON object that contains additional metadata about the event.
origin_type
string
Optionally provide a string that indicates the type of origin that triggered the deployment.
user
string
Optionally provide the identifier (from the VCS provider) of the user that triggered the deployment.