{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$id": "https://api.ilert.com/schemas/Service",
  "title": "Service",
  "type": "object",
  "properties": {
    "id": {
      "type": "number"
    },
    "name": {
      "type": "string"
    },
    "alias": {
      "type": "string"
    },
    "status": {
      "$ref": "#/components/schemas/ServiceStatus"
    },
    "description": {
      "type": "string"
    },
    "oneOpenIncidentOnly": {
      "type": "boolean"
    },
    "showUptimeHistory": {
      "type": "boolean"
    },
    "teams": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/TeamRel"
      }
    },
    "subscribed": {
      "type": "boolean",
      "readOnly": true
    },
    "uptime": {
      "$ref": "#/components/schemas/ServiceUptime"
    },
    "incidents": {
      "type": "array",
      "description": "Note that this only contains the latest 10 unresolved incidents, use /api/incidents?service=x if more or specific results are needed",
      "readOnly": true,
      "items": {
        "$ref": "#/components/schemas/IncidentNoIncludes"
      }
    }
  }
}