Skip to content

Downtime API

Eduardo Campillo edited this page May 15, 2026 · 4 revisions

Downtime API

The Downtime API provides access to automatically detected downtime events for production lines monitored by Cerrion. Each downtime event includes relevant metadata, such as time intervals, line/ROI identifiers, and downtime durations. Not all downtime events are guaranteed to have a corresponding video.

Endpoint

GET /api/v1/downtime

Base URL

https://YOUR-PROJECT.cerrion.com

Authentication

All requests must include a valid Bearer token in the Authorization header. See API Authentication for details on requesting, using, and rotating your token.

Example:

-H "Authorization: Bearer <your_token>"

Request

Parameters

Name Type Required Description
since string Yes ISO 8601 UTC timestamp. Returns events detected at or after this time.
update_at string No ISO 8601 UTC timestamp. Returns events updated at or after this time

Example Request

curl -i 'https://<your_project>.cerrion.com/api/v1/downtime?since=2025-05-22T00:00:00Z' \
  -H 'Authorization: Bearer <your_token>'

Response

A successful response returns an array of downtime events (JSON).

Example Response

[
  {
    "event_id": "98d2a7eb-afa3-496a-b9ea-a14cd49cc7c0",
    "line_name": "L21",
    "roi_name": "L21_3",
    "roi_title": "Stanice 3",
    "roi_api_name": "L21_3",
    "detected_at": "2025-08-29T14:32:37+00:00",
    "updated_at": "2025-08-29T14:32:59+00:00",
    "downtime_seconds": 8.2,
    "downtime_reason": [
      {
        "label_name": "operator_resolving_anomaly",
        "duration_seconds": 8.2
      }
    ]
  }
]

Fields

Field Type Description
event_id string Unique identifier for the downtime event.
line_name string Name of the production line.
roi_name string Technical name of the region of interest (ROI) where the downtime was detected.
roi_title string Human-readable title of the ROI.
roi_api_name string API-friendly ROI identifier; may be empty.
detected_at string (ISO 8601) Timestamp when the downtime started.
updated_at string (ISO 8601) Timestamp when the downtime event was last updated.
downtime_seconds float Total duration of the downtime event in seconds.
downtime_reason array Breakdown of the downtime by reason labels for this event.

Downtime Reason object

Field Type Description
label_name string Reason label identifier.
duration_seconds float Portion of the downtime in seconds for this label.

Changelog

  • 2025-08-29 – Updated response format: added roi_title, roi_api_name, and downtime_reason; clarified presence of updated_at.
  • 2025-05-26 – Initial documentation.

Clone this wiki locally