ilert Services API

The Services API from ilert — 3 operation(s) for services.

OpenAPI Specification

ilert-services-api-openapi.yml Raw ↑
openapi: 3.0.1
info:
  title: ilert REST Alert Actions Services API
  description: "# Introduction\nThe ilert API is a [RESTful](https://en.wikipedia.org/wiki/Representational_state_transfer) API and provides programmatic access to entities in ilert and lets you easily integrate ilert with 3rd party tools. If you are looking to develop an inbound integration (e.g. for a monitoring tool), please use our [Events API](#tag/events). \n\nThe API supports the JSON content type for requests and responses. The response content type is requested via the HTTP Accept header (`application/json`). All resources are accessible via https and are located at `api.ilert.com/api`. \n\n You may download ilert's latest [OpenAPI.json {...} here](https://api.ilert.com/api-docs/openapi.json).\n\n If you are looking for a classic Swagger-UI view you may also open [this link](https://api.ilert.com/api-docs/swagger-ui). \n\n ## Authentication\nThe REST API accepts bearer API tokens. Each user may create API keys using the ilert web application. Note: Make sure to send the `Bearer ` prefix e.g. `Bearer APIKEY` when sending api key requests. By default, access to all resources (using any method) requires the client to be authenticated.\n\n ## Team Context\n When using API tokens, the currently selected team context of the user will not be taken into account, i.e. list results will always return all entities to which the user has a view permission. When using basic auth credentials the currently selected team context of the user will be used to filter resource results. The context may be overwritten for API key calls using the `team-context` HTTP header. Specifying `0` for ALL teams, `-1` for MY teams or a specific team id e.g. `team-context=901` to fetch results for a certain team.  \n\n ## Errors\nilert uses HTTP response codes to indicate success or failure of an API request. Codes in the 2xx range indicate success, codes in the 4xx range indicate a client error (e.g. a missing required parameter) and codes in the 5xx range indicate an error with ilert's servers. In case of an error, the response body contains the following information:\n\n Attribute     | Description \n ------------- | ------------- \n status  | the corresponsing HTTP status code  \n message  | a human readable description of the error \n code  | error code, used to identify error type  \n\n ## API Versioning\nChanges to our API are always backwards-compatible. To get more information about our API versioning and historical changes, please <a href='https://docs.ilert.com/rest-api/api-version-history' target='_blank'>take a look here</a>."
  version: v2.2026.5-r.3
  x-logo:
    url: ./ilert-logo-spaced.png
    backgroundColor: '#fafafa'
    altText: ilert documentation logo
servers:
- url: /api
security:
- apiKey: []
tags:
- name: Services
paths:
  /services:
    get:
      tags:
      - Services
      summary: Get services.
      parameters:
      - name: start-index
        in: query
        description: an integer specifying the starting point (beginning with 0) when paging through a list of entities
        schema:
          type: integer
          format: int32
          default: 0
      - name: max-results
        in: query
        description: 'the maximum number of results when paging through a list of services. (Note: when using ?include maximum is reduced to 25)'
        schema:
          maximum: 100
          type: integer
          format: int32
          default: 10
      - name: include
        in: query
        description: Describes optional properties that should be included in the response. You may declare multiple. (subscribed, uptime, incidents)
        style: form
        explode: true
        schema:
          type: array
          items:
            type: string
            enum:
            - subscribed
            - uptime
            - incidents
      responses:
        '200':
          description: The services
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Service'
    post:
      tags:
      - Services
      summary: Create a new service.
      requestBody:
        description: the service
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ServiceNoIncludes'
        required: true
      responses:
        '200':
          description: The newly created service
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ServiceNoIncludes'
      x-codegen-request-body-name: service
  /services/{id}:
    get:
      tags:
      - Services
      summary: Get a specific service.
      parameters:
      - name: id
        in: path
        description: entity ID
        required: true
        schema:
          type: number
      - name: include
        in: query
        description: Describes optional properties that should be included in the response. You may declare multiple. (subscribed, uptime, incidents)
        style: form
        explode: true
        schema:
          type: array
          items:
            type: string
            enum:
            - subscribed
            - uptime
            - incidents
      responses:
        '200':
          description: The requested service
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Service'
    put:
      tags:
      - Services
      summary: Update the specific service
      parameters:
      - name: id
        in: path
        description: entity ID
        required: true
        schema:
          type: number
      requestBody:
        description: the service
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ServiceNoIncludes'
        required: true
      responses:
        '200':
          description: The updated service
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ServiceNoIncludes'
      x-codegen-request-body-name: service
    delete:
      tags:
      - Services
      summary: Remove a specific service.
      parameters:
      - name: id
        in: path
        description: entity ID
        required: true
        schema:
          type: number
      responses:
        '204':
          description: Empty body delete response
          content: {}
  /services/{id}/private-subscribers:
    get:
      tags:
      - Services
      summary: Get the subscribers (users and teams) of a service
      parameters:
      - name: id
        in: path
        description: entity ID
        required: true
        schema:
          type: number
      responses:
        '200':
          description: The subscribers of the service
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/TeamUserOption'
    put:
      tags:
      - Services
      summary: Set subscribers (users and teams) of a service
      description: 'Note: this is an in place update'
      parameters:
      - name: id
        in: path
        description: entity ID
        required: true
        schema:
          type: number
      requestBody:
        description: subscribers that should be adjusted
        content:
          application/json:
            schema:
              type: array
              items:
                $ref: '#/components/schemas/TeamUserOption'
        required: true
      responses:
        '204':
          description: the response
          content: {}
      x-codegen-request-body-name: subscribers
components:
  schemas:
    ServiceStatus:
      type: string
      description: the service status
      enum:
      - OPERATIONAL
      - UNDER_MAINTENANCE
      - DEGRADED
      - PARTIAL_OUTAGE
      - MAJOR_OUTAGE
    TeamRel:
      type: object
      properties:
        id:
          type: integer
          format: int64
        name:
          type: string
    IncidentStatus:
      type: string
      description: the incident status
      enum:
      - INVESTIGATING
      - IDENTIFIED
      - MONITORING
      - RESOLVED
    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'
    ServiceUptimePercentage:
      type: object
      properties:
        uptimePercentage:
          type: object
          properties:
            p90:
              maximum: 100
              minimum: 0
              type: number
              format: float
              readOnly: true
            p60:
              maximum: 100
              minimum: 0
              type: number
              format: float
              readOnly: true
            p30:
              maximum: 100
              minimum: 0
              type: number
              format: float
              readOnly: true
    IncidentNoIncludes:
      type: object
      properties:
        id:
          type: number
        summary:
          type: string
        status:
          $ref: '#/components/schemas/IncidentStatus'
        message:
          type: string
        sendNotification:
          type: boolean
        createdAt:
          type: string
          description: May be overwritten during the creation of the incident, otherwise read-only
          format: date-time
        updatedAt:
          type: string
          description: May be overwritten during the creation of the incident, otherwise read-only
          format: date-time
        affectedServices:
          type: array
          items:
            type: object
            properties:
              impact:
                $ref: '#/components/schemas/ServiceStatus'
              service:
                $ref: '#/components/schemas/ServiceNoIncludes'
        resolvedOn:
          type: string
          format: date-time
          readOnly: true
    ServiceOutage:
      type: object
      properties:
        status:
          $ref: '#/components/schemas/ServiceStatus'
        from:
          type: string
          format: date-time
        until:
          type: string
          format: date-time
    ServiceUptime:
      type: object
      properties:
        rangeStart:
          type: string
          format: date-time
        rangeEnd:
          type: string
          format: date-time
        outages:
          type: array
          items:
            $ref: '#/components/schemas/ServiceOutage'
        uptimePercentage:
          $ref: '#/components/schemas/ServiceUptimePercentage'
    TeamUserOption:
      type: object
      properties:
        id:
          type: number
        name:
          type: string
        type:
          type: string
          enum:
          - USER
          - TEAM
    ServiceNoIncludes:
      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'
  securitySchemes:
    apiKey:
      type: apiKey
      description: The Bearer API key of your user <a href='/api-docs/#section/Authentication'>more info</a>.
      name: Authorization
      in: header
x-original-swagger-version: '2.0'