Ionhour Docs

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 /deployments

Request Body

FieldTypeRequiredDescription
projectIdnumberYesProject this deployment belongs to
namestringNoDeployment name (max 255 characters)
versionstringNoVersion identifier, e.g., v2.4.1 (max 255 characters)
authorstringNoPerson or system that initiated the deploy (max 255 characters)
linkstringNoURL to the deployment details (e.g., CI/CD run URL, max 2,048 characters)
startedAtISO stringNoWhen the deployment started (default: now)
endedAtISO stringNoWhen the deployment ended (omit for an active deployment)
autoPausebooleanNoAutomatically pause associated checks during the deployment (default: false)
checkIdsnumber[]NoChecks to pause when autoPause is enabled
scheduledStartAtISO stringNoSchedule a future deployment start time
scheduledEndAtISO stringNoSchedule 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

StatusDescription
SCHEDULEDDeployment is scheduled for a future time
ACTIVEDeployment is currently in progress
ENDEDDeployment 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/end

Marks a deployment as ended. If autoPause was enabled, all paused checks are automatically resumed.

Request Body

FieldTypeRequiredDescription
endedAtISO stringNoWhen 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 /deployments

Returns a list of deployments for a project, with optional filtering by date range or check.

Query Parameters

ParameterTypeRequiredDescription
projectIdnumberYesFilter by project
startISO stringNoFilter deployments starting after this date
endISO stringNoFilter deployments starting before this date
checkIdnumberNoFilter 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]
  }
]