Skip to main content

Maintenance object

id
integer
Unique numeric identifier.
title
string
Maintenance title.
description
string | null
Optional description.
start_date_time
integer
UTC Unix timestamp (seconds) for the first occurrence. Truncated to minute start.
rrule
string
iCalendar RRULE string that defines the recurrence schedule. Use FREQ=DAILY;COUNT=1 for a one-time window.
duration_seconds
integer
Length of each maintenance window in seconds.
status
string
ACTIVE or INACTIVE. Inactive maintenances are not applied.
monitors
array
Monitors affected during this maintenance.
created_at
string
ISO 8601 creation timestamp.
updated_at
string
ISO 8601 last-updated timestamp.

List maintenances

status
string
Filter by status. ACTIVE or INACTIVE.
monitor_tag
string
Return only maintenances that include this monitor tag.
GET /api/v4/maintenances
Response 200
{
  "maintenances": [
    {
      "id": 1,
      "title": "Weekly Database Backup",
      "description": "Automated backup window — expect brief slowdowns.",
      "start_date_time": 1737010800,
      "rrule": "FREQ=WEEKLY;BYDAY=SU",
      "duration_seconds": 3600,
      "status": "ACTIVE",
      "monitors": [
        { "monitor_tag": "database", "impact": "DEGRADED" }
      ],
      "created_at": "2026-01-01T00:00:00.000Z",
      "updated_at": "2026-01-01T00:00:00.000Z"
    }
  ]
}
curl -X GET https://your-kener-instance.com/api/v4/maintenances \
  -H "Authorization: Bearer kener_..."

Get a maintenance

GET /api/v4/maintenances/{maintenance_id}
Path parameters
maintenance_id
integer
required
Numeric ID of the maintenance.
Response 200
{
  "maintenance": {
    "id": 1,
    "title": "Weekly Database Backup",
    "description": null,
    "start_date_time": 1737010800,
    "rrule": "FREQ=WEEKLY;BYDAY=SU",
    "duration_seconds": 3600,
    "status": "ACTIVE",
    "monitors": [
      { "monitor_tag": "database", "impact": "MAINTENANCE" }
    ],
    "created_at": "2026-01-01T00:00:00.000Z",
    "updated_at": "2026-01-01T00:00:00.000Z"
  }
}
curl -X GET https://your-kener-instance.com/api/v4/maintenances/1 \
  -H "Authorization: Bearer kener_..."

Create a maintenance

POST /api/v4/maintenances
title
string
required
Maintenance title.
start_date_time
integer
required
UTC Unix timestamp (seconds) for the first window. Truncated to minute start.
rrule
string
required
A valid iCalendar RRULE string (without DTSTART). For a one-time window use FREQ=DAILY;COUNT=1.
duration_seconds
integer
required
Length of each window in seconds. Must be greater than 0.
description
string | null
Optional description.
monitors
array
Monitors to link to this maintenance.
Response 201
{
  "maintenance": {
    "id": 2,
    "title": "Nightly Deploy",
    "description": null,
    "start_date_time": 1737082800,
    "rrule": "FREQ=DAILY;BYHOUR=2;BYMINUTE=0",
    "duration_seconds": 1800,
    "status": "ACTIVE",
    "monitors": [
      { "monitor_tag": "api-gateway", "impact": "MAINTENANCE" }
    ],
    "created_at": "2026-01-15T00:00:00.000Z",
    "updated_at": "2026-01-15T00:00:00.000Z"
  }
}
curl -X POST https://your-kener-instance.com/api/v4/maintenances \
  -H "Authorization: Bearer kener_..." \
  -H "Content-Type: application/json" \
  -d '{
    "title": "Nightly Deploy",
    "start_date_time": 1737082800,
    "rrule": "FREQ=DAILY;BYHOUR=2;BYMINUTE=0",
    "duration_seconds": 1800,
    "monitors": [
      { "monitor_tag": "api-gateway", "impact": "MAINTENANCE" }
    ]
  }'
The rrule value must be a valid iCalendar RRULE property value — do not include the RRULE: prefix or DTSTART. Examples: FREQ=WEEKLY;BYDAY=SA,SU, FREQ=MONTHLY;BYMONTHDAY=1.

Update a maintenance

Performs a partial update. Updating rrule, start_date_time, or duration_seconds regenerates future scheduled events automatically. Updating monitors replaces the entire monitor list.
PATCH /api/v4/maintenances/{maintenance_id}
Path parameters
maintenance_id
integer
required
Numeric ID of the maintenance.
title
string
New title.
description
string | null
New description.
start_date_time
integer
New start timestamp (UTC seconds).
rrule
string
New RRULE string.
duration_seconds
integer
New window duration in seconds. Must be greater than 0.
status
string
ACTIVE or INACTIVE.
monitors
array
Replacement monitor list. Replaces all existing monitor associations.
Response 200
{
  "maintenance": {
    "id": 1,
    "title": "Weekly Database Backup",
    "description": "Updated window duration.",
    "start_date_time": 1737010800,
    "rrule": "FREQ=WEEKLY;BYDAY=SU",
    "duration_seconds": 7200,
    "status": "ACTIVE",
    "monitors": [
      { "monitor_tag": "database", "impact": "MAINTENANCE" }
    ],
    "created_at": "2026-01-01T00:00:00.000Z",
    "updated_at": "2026-01-15T14:00:00.000Z"
  }
}
curl -X PATCH https://your-kener-instance.com/api/v4/maintenances/1 \
  -H "Authorization: Bearer kener_..." \
  -H "Content-Type: application/json" \
  -d '{
    "duration_seconds": 7200,
    "status": "INACTIVE"
  }'

Delete a maintenance

Permanently deletes a maintenance, all its scheduled events, and all monitor associations.
DELETE /api/v4/maintenances/{maintenance_id}
Path parameters
maintenance_id
integer
required
Numeric ID of the maintenance to delete.
Response 200
{
  "message": "Maintenance with id '1' deleted successfully"
}
curl -X DELETE https://your-kener-instance.com/api/v4/maintenances/1 \
  -H "Authorization: Bearer kener_..."

Maintenance event object

Each maintenance generates one or more events — one per scheduled occurrence.
id
integer
Unique numeric identifier for the event.
maintenance_id
integer
ID of the parent maintenance.
start_date_time
integer
UTC Unix timestamp (seconds) when this event starts.
end_date_time
integer
UTC Unix timestamp (seconds) when this event ends.
status
string
Current status of the event. One of SCHEDULED, READY, ONGOING, COMPLETED, CANCELLED. READY means the event starts within the next few minutes and the system is preparing to activate it.
created_at
string
ISO 8601 creation timestamp.
updated_at
string
ISO 8601 last-updated timestamp.

List events for a maintenance

Returns paginated events for a specific maintenance.
GET /api/v4/maintenances/{maintenance_id}/events
Path parameters
maintenance_id
integer
required
Numeric ID of the maintenance.
Query parameters
page
integer
Page number (1-indexed). Defaults to 1.
limit
integer
Results per page. Defaults to 20, maximum 100.
Response 200
{
  "events": [
    {
      "id": 5,
      "maintenance_id": 1,
      "start_date_time": 1737010800,
      "end_date_time": 1737014400,
      "status": "SCHEDULED",
      "created_at": "2026-01-01T00:00:00.000Z",
      "updated_at": "2026-01-01T00:00:00.000Z"
    }
  ],
  "page": 1,
  "limit": 20
}
curl -X GET https://your-kener-instance.com/api/v4/maintenances/1/events \
  -H "Authorization: Bearer kener_..."

Get a maintenance event

GET /api/v4/maintenances/{maintenance_id}/events/{event_id}
Path parameters
maintenance_id
integer
required
Numeric ID of the maintenance.
event_id
integer
required
Numeric ID of the event.
Response 200
{
  "event": {
    "id": 5,
    "maintenance_id": 1,
    "start_date_time": 1737010800,
    "end_date_time": 1737014400,
    "status": "SCHEDULED",
    "created_at": "2026-01-01T00:00:00.000Z",
    "updated_at": "2026-01-01T00:00:00.000Z"
  }
}
curl -X GET https://your-kener-instance.com/api/v4/maintenances/1/events/5 \
  -H "Authorization: Bearer kener_..."

Update a maintenance event

Overrides the start and end times of a specific event. Both fields are required.
PATCH /api/v4/maintenances/{maintenance_id}/events/{event_id}
Path parameters
maintenance_id
integer
required
Numeric ID of the maintenance.
event_id
integer
required
Numeric ID of the event to update.
start_date_time
integer
required
New start timestamp (UTC seconds).
end_date_time
integer
required
New end timestamp (UTC seconds). Must be after start_date_time.
Response 200
{
  "event": {
    "id": 5,
    "maintenance_id": 1,
    "start_date_time": 1737012000,
    "end_date_time": 1737015600,
    "status": "SCHEDULED",
    "created_at": "2026-01-01T00:00:00.000Z",
    "updated_at": "2026-01-15T15:00:00.000Z"
  }
}
curl -X PATCH https://your-kener-instance.com/api/v4/maintenances/1/events/5 \
  -H "Authorization: Bearer kener_..." \
  -H "Content-Type: application/json" \
  -d '{
    "start_date_time": 1737012000,
    "end_date_time": 1737015600
  }'

Delete a maintenance event

Deletes a specific event. The parent maintenance and its other events are unaffected.
DELETE /api/v4/maintenances/{maintenance_id}/events/{event_id}
Path parameters
maintenance_id
integer
required
Numeric ID of the maintenance.
event_id
integer
required
Numeric ID of the event to delete.
Response 200
{
  "message": "Event with id '5' deleted successfully"
}
curl -X DELETE https://your-kener-instance.com/api/v4/maintenances/1/events/5 \
  -H "Authorization: Bearer kener_..."

List all maintenance events (global)

Returns a paginated, cross-maintenance list of events with full maintenance details embedded. Useful for building maintenance calendars or feed integrations.
GET /api/v4/maintenances/events
Query parameters
page
integer
Page number (1-indexed). Defaults to 1.
limit
integer
Results per page. Defaults to 20, maximum 100.
event_start_date_time
integer
Return events starting at or after this UTC Unix timestamp. Defaults to the current time.
event_status
string
Filter by event status: SCHEDULED, ONGOING, COMPLETED, CANCELLED, or READY.
monitors
string
Comma-separated monitor tags. Return events from maintenances linked to any of these monitors.
maintenance_id
integer
Filter to events from a specific maintenance.
Response 200
{
  "events": [
    {
      "maintenance_id": 1,
      "event_id": 5,
      "event_start_date_time": 1737010800,
      "event_end_date_time": 1737014400,
      "event_status": "SCHEDULED",
      "maintenance_title": "Weekly Database Backup",
      "maintenance_description": null,
      "maintenance_status": "ACTIVE",
      "maintenance_rrule": "FREQ=WEEKLY;BYDAY=SU",
      "maintenance_duration_seconds": 3600,
      "monitors": [
        { "monitor_tag": "database", "impact": "MAINTENANCE" }
      ]
    }
  ],
  "page": 1,
  "limit": 20,
  "total": 1
}
curl -X GET "https://your-kener-instance.com/api/v4/maintenances/events?event_status=SCHEDULED" \
  -H "Authorization: Bearer kener_..."

Build docs developers (and LLMs) love