Deployments API
Create deployment windows, auto-pause checks during releases, and track deployment history.
Deployments let you track release windows and optionally auto-pause checks during deployments to avoid false alerts. When a deployment is active with autoPause enabled, associated checks are paused automatically and resumed when the deployment ends.
Create Deployment
POST /deploymentsRequest Body
| Field | Type | Required | Description |
|---|---|---|---|
projectId | number | Yes | Project this deployment belongs to |
name | string | No | Deployment name (max 255 characters) |
version | string | No | Version identifier, e.g., v2.4.1 (max 255 characters) |
author | string | No | Person or system that initiated the deploy (max 255 characters) |
link | string | No | URL to the deployment details (e.g., CI/CD run URL, max 2,048 characters) |
startedAt | ISO string | No | When the deployment started (default: now) |
endedAt | ISO string | No | When the deployment ended (omit for an active deployment) |
autoPause | boolean | No | Automatically pause associated checks during the deployment (default: false) |
checkIds | number[] | No | Checks to pause when autoPause is enabled |
scheduledStartAt | ISO string | No | Schedule a future deployment start time |
scheduledEndAt | ISO string | No | Schedule a future deployment end time |
To schedule a deployment in advance, set scheduledStartAt and scheduledEndAt. The deployment will transition from SCHEDULED to ACTIVE at the start time, and to ENDED at the end time. Checks listed in checkIds are paused and resumed automatically when autoPause is enabled.
Example
curl -X POST https://api.ionhour.com/api/deployments \
-H "Authorization: Bearer ionh_your_key" \
-H "Content-Type: application/json" \
-d '{
"projectId": 1,
"name": "Backend Release",
"version": "v2.4.1",
"author": "deploy-bot",
"link": "https://github.com/acme/api/actions/runs/123456",
"autoPause": true,
"checkIds": [10, 11, 12]
}'Response
Returns the created deployment with its status.
Deployment Status
| Status | Description |
|---|---|
SCHEDULED | Deployment is scheduled for a future time |
ACTIVE | Deployment is currently in progress |
ENDED | Deployment has been completed |
When autoPause is enabled, all checks in checkIds are paused immediately when the deployment starts. Make sure the list only includes checks that should be silenced during the release.
End Deployment
PUT /deployments/:id/endMarks a deployment as ended. If autoPause was enabled, all paused checks are automatically resumed.
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
endedAt | ISO string | No | When the deployment ended (default: now) |
Example
curl -X PUT https://api.ionhour.com/api/deployments/1/end \
-H "Authorization: Bearer ionh_your_key" \
-H "Content-Type: application/json" \
-d '{"endedAt": "2025-03-10T15:30:00Z"}'Or end immediately with no body:
curl -X PUT https://api.ionhour.com/api/deployments/1/end \
-H "Authorization: Bearer ionh_your_key"List Deployments
GET /deploymentsReturns a list of deployments for a project, with optional filtering by date range or check.
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
projectId | number | Yes | Filter by project |
start | ISO string | No | Filter deployments starting after this date |
end | ISO string | No | Filter deployments starting before this date |
checkId | number | No | Filter to deployments that include this check |
Example
curl -H "Authorization: Bearer ionh_your_key" \
"https://api.ionhour.com/api/deployments?projectId=1&start=2025-03-01T00:00:00Z"Response
[
{
"id": 1,
"projectId": 1,
"name": "Backend Release",
"version": "v2.4.1",
"author": "deploy-bot",
"link": "https://github.com/acme/api/actions/runs/123456",
"status": "ENDED",
"startedAt": "2025-03-10T14:00:00Z",
"endedAt": "2025-03-10T15:30:00Z",
"autoPause": true,
"checkIds": [10, 11, 12]
}
]