University of St Andrews Components API

System components and their hierarchy.

OpenAPI Specification

university-of-st-andrews-components-api-openapi.yml Raw ↑
openapi: 3.0.3
info:
  title: University of St Andrews Service Status Components API
  description: JSON API for the University of St Andrews service status page, hosted on the Sorry (Sorry App) status platform. Exposes overall page status, system components, and notices (incidents and maintenance). The API is read-only and public. Fair-use rate limiting applies at 10 requests per second, and collections paginate at a maximum of 25 records per page. Paths and schemas in this document were derived from the published API documentation at https://status.st-andrews.ac.uk/api and verified against live responses.
  version: v1
  contact:
    name: University of St Andrews
    url: https://status.st-andrews.ac.uk/
servers:
- url: https://status.st-andrews.ac.uk/api/v1
  description: Production v1 endpoint
tags:
- name: Components
  description: System components and their hierarchy.
paths:
  /components:
    get:
      operationId: listComponents
      summary: List components
      description: Returns a paginated list of system components. Supports filtering by parent so that top-level components or the children of a given component can be retrieved.
      tags:
      - Components
      parameters:
      - name: filter[parent_id_null]
        in: query
        description: When true, retrieve only top-level components (those with no parent).
        required: false
        schema:
          type: boolean
      - name: filter[parent_id_eq]
        in: query
        description: Retrieve the child components of the component with this ID.
        required: false
        schema:
          type: integer
      - name: page
        in: query
        description: Page number for pagination.
        required: false
        schema:
          type: integer
          minimum: 1
      responses:
        '200':
          description: A paginated list of components.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ComponentsResponse'
components:
  schemas:
    Link:
      type: object
      properties:
        href:
          type: string
        count:
          type: integer
    Component:
      type: object
      properties:
        id:
          type: integer
        state:
          type: string
          enum:
          - operational
          - degraded
          - under_maintenance
        name:
          type: string
        description:
          type: string
        parent_id:
          type: integer
          nullable: true
        position:
          type: integer
        links:
          type: object
          properties:
            children:
              $ref: '#/components/schemas/Link'
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
    ComponentsResponse:
      type: object
      properties:
        components:
          type: array
          items:
            $ref: '#/components/schemas/Component'
        meta:
          $ref: '#/components/schemas/Meta'
    Meta:
      type: object
      properties:
        count:
          type: integer
          description: Number of records on the current page (maximum 25).
        total_count:
          type: integer
          description: Total number of records across all pages.
        next_page:
          type: string
          nullable: true
          description: URL of the next page, if any.