Statuspal API API Reference

Welcome to the Statuspal API reference. Currently only supports fetching of status page's status and pushing of custom metrics data points.

Example call:

curl https://statuspal.io/api/v1/hello -H 'Accept: application/json' -H 'Content-Type: application/json'
API Endpoint
https://statuspal.io/api/v1
Contact: contact@statuspal.io
Request Content-Types: json
Response Content-Types: json
Schemes: https
Version: 1.0.0

Authentication

api_key

type
apiKey
name
Authorization
in
header

Test

Test endpoints

Says hello

GET /hello
200 OK

A hello message

type
object
Response Example (200 OK)
{
  "message": "hello"
}

Status

Status endpoints

Get the status of a status page

GET /status_pages/{statusPageSubdomain}/status
statusPageSubdomain: string
in path

The subdomain of your status page (subdomain.statuspal.io)

A status page's status

Response Example (200 OK)
{
  "status_page": {
    "name": "Monitoring service",
    "current_incident_type": "string"
  },
  "services": [
    {
      "name": "Monitoring service",
      "id": "integer",
      "parent_id": "integer",
      "current_incident_type": "string",
      "children": [
        {
          "name": "Monitoring service",
          "id": "integer",
          "parent_id": "integer",
          "current_incident_type": "string"
        }
      ]
    }
  ],
  "incidents": [
    {
      "title": "We are having issues with the DB connection",
      "inserted_at": "string (date-time)",
      "updated_at": "string (date-time)",
      "starts_at": "string (date-time)",
      "ends_at": "string (date-time)",
      "type": "string",
      "services": [
        {
          "name": "API"
        }
      ],
      "current_status": {
        "description": "We are investigating."
      }
    }
  ],
  "maintenances": [
    {
      "title": "We are having issues with the DB connection",
      "inserted_at": "string (date-time)",
      "updated_at": "string (date-time)",
      "starts_at": "string (date-time)",
      "ends_at": "string (date-time)",
      "type": "string",
      "services": [
        {
          "name": "API"
        }
      ],
      "current_status": {
        "description": "We are investigating."
      }
    }
  ]
}

Get the status of a service

GET /status_pages/{statusPageSubdomain}/services/{serviceId}/status
statusPageSubdomain: string
in path

The subdomain of your status page (subdomain.statuspal.io)

serviceId: integer
in path

The ID of a service

200 OK

A service's status

Response Example (200 OK)
{
  "service": {
    "name": "Monitoring service",
    "id": "integer",
    "parent_id": "integer",
    "current_incident_type": "string",
    "children": [
      {
        "name": "Monitoring service",
        "id": "integer",
        "parent_id": "integer",
        "current_incident_type": "string"
      }
    ]
  },
  "incidents": [
    {
      "title": "We are having issues with the DB connection",
      "inserted_at": "string (date-time)",
      "updated_at": "string (date-time)",
      "starts_at": "string (date-time)",
      "ends_at": "string (date-time)",
      "type": "string",
      "services": [
        {
          "name": "API"
        }
      ],
      "current_status": {
        "description": "We are investigating."
      }
    }
  ],
  "maintenances": [
    {
      "title": "We are having issues with the DB connection",
      "inserted_at": "string (date-time)",
      "updated_at": "string (date-time)",
      "starts_at": "string (date-time)",
      "ends_at": "string (date-time)",
      "type": "string",
      "services": [
        {
          "name": "API"
        }
      ],
      "current_status": {
        "description": "We are investigating."
      }
    }
  ]
}

Metrics

Metrics endpoints

Adds a metric data point to a custom metric

POST /status_pages/{statusPageSubdomain}/metrics/{metricId}/entries
body: object
in body

(no description)

statusPageSubdomain: string
in path

The subdomain of your status page (subdomain.statuspal.io)

metricId: integer
in path

The ID of a custom metric

The metric data point was created

Response Example (200 OK)
{
  "entry": {
    "time": "integer",
    "value": "number (double)"
  }
}

Schema Definitions

MetricEntry: object

time: integer

Unix timestamp

value: number (double)
Example
{
  "time": "integer",
  "value": "number (double)"
}

MetricEntryResponse: object

entry: MetricEntry
Example
{
  "entry": {
    "time": "integer",
    "value": "number (double)"
  }
}

Incident: object

An incident, either major, minor or a scheduled maintenance

title: string
inserted_at: string (date-time)
updated_at: string (date-time)
starts_at: string (date-time)
ends_at: string (date-time)
type: IncidentType
services: object[]
object
name: string
current_status: object
description: string
Example
{
  "title": "We are having issues with the DB connection",
  "inserted_at": "string (date-time)",
  "updated_at": "string (date-time)",
  "starts_at": "string (date-time)",
  "ends_at": "string (date-time)",
  "type": "string",
  "services": [
    {
      "name": "API"
    }
  ],
  "current_status": {
    "description": "We are investigating."
  }
}

ServiceStatus: object

service: Service
incidents: Incident
Incident
maintenances: Incident
Incident
Example
{
  "service": {
    "name": "Monitoring service",
    "id": "integer",
    "parent_id": "integer",
    "current_incident_type": "string",
    "children": [
      {
        "name": "Monitoring service",
        "id": "integer",
        "parent_id": "integer",
        "current_incident_type": "string"
      }
    ]
  },
  "incidents": [
    {
      "title": "We are having issues with the DB connection",
      "inserted_at": "string (date-time)",
      "updated_at": "string (date-time)",
      "starts_at": "string (date-time)",
      "ends_at": "string (date-time)",
      "type": "string",
      "services": [
        {
          "name": "API"
        }
      ],
      "current_status": {
        "description": "We are investigating."
      }
    }
  ],
  "maintenances": [
    {
      "title": "We are having issues with the DB connection",
      "inserted_at": "string (date-time)",
      "updated_at": "string (date-time)",
      "starts_at": "string (date-time)",
      "ends_at": "string (date-time)",
      "type": "string",
      "services": [
        {
          "name": "API"
        }
      ],
      "current_status": {
        "description": "We are investigating."
      }
    }
  ]
}

Service: object

Represents the status of a service

name: string
id: integer
parent_id: integer
current_incident_type: IncidentType
children: ChildService

Nested ServiceStatus children

ChildService
Example
{
  "name": "Monitoring service",
  "id": "integer",
  "parent_id": "integer",
  "current_incident_type": "string",
  "children": [
    {
      "name": "Monitoring service",
      "id": "integer",
      "parent_id": "integer",
      "current_incident_type": "string"
    }
  ]
}

ChildService: object

Represents the status of a service

name: string
id: integer
parent_id: integer
current_incident_type: IncidentType
Example
{
  "name": "Monitoring service",
  "id": "integer",
  "parent_id": "integer",
  "current_incident_type": "string"
}

IncidentType: string

The type of the (current) incident:

  • major - A minor incident is currently taking place.
  • minor - A major incident is currently taking place.
  • scheduled - A scheduled maintenance is currently taking place.
  • null - No incident is taking place.
string major, minor, scheduled, null

StatusPageStatus: object

Represents the status of a status page

status_page: object
name: string
current_incident_type: IncidentType
services: Service
Service
incidents: Incident
Incident
maintenances: Incident
Incident
Example
{
  "status_page": {
    "name": "Monitoring service",
    "current_incident_type": "string"
  },
  "services": [
    {
      "name": "Monitoring service",
      "id": "integer",
      "parent_id": "integer",
      "current_incident_type": "string",
      "children": [
        {
          "name": "Monitoring service",
          "id": "integer",
          "parent_id": "integer",
          "current_incident_type": "string"
        }
      ]
    }
  ],
  "incidents": [
    {
      "title": "We are having issues with the DB connection",
      "inserted_at": "string (date-time)",
      "updated_at": "string (date-time)",
      "starts_at": "string (date-time)",
      "ends_at": "string (date-time)",
      "type": "string",
      "services": [
        {
          "name": "API"
        }
      ],
      "current_status": {
        "description": "We are investigating."
      }
    }
  ],
  "maintenances": [
    {
      "title": "We are having issues with the DB connection",
      "inserted_at": "string (date-time)",
      "updated_at": "string (date-time)",
      "starts_at": "string (date-time)",
      "ends_at": "string (date-time)",
      "type": "string",
      "services": [
        {
          "name": "API"
        }
      ],
      "current_status": {
        "description": "We are investigating."
      }
    }
  ]
}