StatOSS Log alerts API

An app's log alert rules: a search and a condition over a window that opens an on-call alert.

GitHub OpenAPI

Operations 5

GET /apps/{app}/log-alerts List an app's log alerts #
POST /apps/{app}/log-alerts Make a log alert #
GET /apps/{app}/log-alerts/{ruleId} One log alert #
PATCH /apps/{app}/log-alerts/{ruleId} Change a log alert #
DELETE /apps/{app}/log-alerts/{ruleId} Remove a log alert #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/statoss-com:statoss-com-log-alerts-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

statoss-com-log-alerts-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: StatOSS Log alerts API
  version: '1'
  description: Everything the dashboard does to a status page, over HTTPS with a key. Keys are made under Settings, API keys; each reads, or reads and writes, and reaches every page or one page.
servers:
- url: https://statoss.com/api/v1
security:
- bearer: []
tags:
- name: Log alerts
  description: 'An app''s log alert rules: a search and a condition over a window that opens an on-call alert.'
paths:
  /apps/{app}/log-alerts:
    get:
      tags:
      - Log alerts
      operationId: listLogAlerts
      summary: List an app's log alerts
      description: 'Its log alert rules on pages the key reaches, newest first. Log alerts are on-call alerts: without on-call (Hobby and Pro) these paths answer 404.'
      parameters:
      - name: app
        in: path
        required: true
        schema:
          type: string
        description: The app's id or slug, from GET /apps.
      - name: limit
        in: query
        schema:
          type: integer
          default: 25
          minimum: 1
          maximum: 100
        description: How many, from 1 to 100.
      - name: cursor
        in: query
        schema:
          type: string
        description: The cursor the last page gave, for the next one.
      responses:
        '200':
          description: The rules.
          content:
            application/json:
              schema:
                type: object
                properties:
                  logAlerts:
                    type: array
                    items:
                      $ref: '#/components/schemas/LogAlert'
                  cursor:
                    type:
                    - string
                    - 'null'
                    description: Give it as ?cursor= for the next page; null when nothing is left.
        '400':
          description: The query or body did not pass validation.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: No key, or a key that is not valid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Nothing by that id that this key reaches, or the team has no logs.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: More than 120 requests in a minute on this key. Retry-After says in how many seconds the minute is up.
          headers:
            Retry-After:
              description: Seconds until the minute is up.
              schema:
                type: integer
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Something went wrong on our side.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
    post:
      tags:
      - Log alerts
      operationId: createLogAlert
      summary: Make a log alert
      description: 'What the body leaves out takes the default rule''s: at least 10 lines in 5 minutes, firing at once and resolving after 5 quiet minutes, to the page''s destinations, paging nobody. At most 20 rules per app. Log alerts are on-call alerts: without on-call (Hobby and Pro) these paths answer 404.'
      parameters:
      - name: app
        in: path
        required: true
        schema:
          type: string
        description: The app's id or slug, from GET /apps.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/LogAlertInput'
            example:
              name: Checkout 5xx
              query: service:checkout http.status_code:>=500
              threshold: 20
              windowMinutes: 5
              environments:
              - production
      responses:
        '201':
          description: The rule.
          content:
            application/json:
              schema:
                type: object
                properties:
                  logAlert:
                    $ref: '#/components/schemas/LogAlert'
        '400':
          description: The query or body did not pass validation.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: No key, or a key that is not valid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: A read-only key on a write route, or a token for someone who does not manage the team.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Nothing by that id that this key reaches, or the team has no logs.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: More than 120 requests in a minute on this key. Retry-After says in how many seconds the minute is up.
          headers:
            Retry-After:
              description: Seconds until the minute is up.
              schema:
                type: integer
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Something went wrong on our side.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /apps/{app}/log-alerts/{ruleId}:
    get:
      tags:
      - Log alerts
      operationId: getLogAlert
      summary: One log alert
      description: 'Log alerts are on-call alerts: without on-call (Hobby and Pro) these paths answer 404.'
      parameters:
      - name: app
        in: path
        required: true
        schema:
          type: string
        description: The app's id or slug, from GET /apps.
      - name: ruleId
        in: path
        required: true
        schema:
          type: string
        description: The rule id, from the list of rules.
      responses:
        '200':
          description: The rule.
          content:
            application/json:
              schema:
                type: object
                properties:
                  logAlert:
                    $ref: '#/components/schemas/LogAlert'
        '401':
          description: No key, or a key that is not valid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Nothing by that id that this key reaches, or the team has no logs.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: More than 120 requests in a minute on this key. Retry-After says in how many seconds the minute is up.
          headers:
            Retry-After:
              description: Seconds until the minute is up.
              schema:
                type: integer
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Something went wrong on our side.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
    patch:
      tags:
      - Log alerts
      operationId: updateLogAlert
      summary: Change a log alert
      description: 'What the body leaves out stays. Its condition starts over; turning it off resolves its alert. Log alerts are on-call alerts: without on-call (Hobby and Pro) these paths answer 404.'
      parameters:
      - name: app
        in: path
        required: true
        schema:
          type: string
        description: The app's id or slug, from GET /apps.
      - name: ruleId
        in: path
        required: true
        schema:
          type: string
        description: The rule id, from the list of rules.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/LogAlertInput'
            example:
              enabled: false
      responses:
        '200':
          description: The rule after.
          content:
            application/json:
              schema:
                type: object
                properties:
                  logAlert:
                    $ref: '#/components/schemas/LogAlert'
        '400':
          description: The query or body did not pass validation.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: No key, or a key that is not valid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: A read-only key on a write route, or a token for someone who does not manage the team.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Nothing by that id that this key reaches, or the team has no logs.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: More than 120 requests in a minute on this key. Retry-After says in how many seconds the minute is up.
          headers:
            Retry-After:
              description: Seconds until the minute is up.
              schema:
                type: integer
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Something went wrong on our side.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
    delete:
      tags:
      - Log alerts
      operationId: removeLogAlert
      summary: Remove a log alert
      description: 'Resolves its open alert. Without confirm, answers with what it would do. Log alerts are on-call alerts: without on-call (Hobby and Pro) these paths answer 404.'
      parameters:
      - name: app
        in: path
        required: true
        schema:
          type: string
        description: The app's id or slug, from GET /apps.
      - name: ruleId
        in: path
        required: true
        schema:
          type: string
        description: The rule id, from the list of rules.
      - name: confirm
        in: query
        schema:
          type: boolean
        description: 'true goes ahead; "confirm": true in the body does the same. Left out, the answer says what would happen and nothing changes.'
      responses:
        '200':
          description: 'Without confirm: what it would do.'
          content:
            application/json:
              schema:
                type: object
                properties:
                  done:
                    type: boolean
                    description: 'false: nothing changed yet.'
                  confirm:
                    type: boolean
                    description: 'true: send confirm to go ahead.'
                  summary:
                    type: string
                    description: What it would do, in words.
                  logAlert:
                    $ref: '#/components/schemas/LogAlert'
                  openAlerts:
                    type: integer
                    description: Its open alerts, resolved on removal.
        '204':
          description: Removed.
        '400':
          description: The query or body did not pass validation.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: No key, or a key that is not valid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: A read-only key on a write route, or a token for someone who does not manage the team.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Nothing by that id that this key reaches, or the team has no logs.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: More than 120 requests in a minute on this key. Retry-After says in how many seconds the minute is up.
          headers:
            Retry-After:
              description: Seconds until the minute is up.
              schema:
                type: integer
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Something went wrong on our side.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    LogAlertInput:
      type: object
      properties:
        name:
          type: string
          description: The rule's name, up to 80 characters.
        pageId:
          type: string
          description: 'The page whose on-call takes its alerts: a status page, or the app''s project''s on-call page. A new rule takes the app''s page unless given, else the key''s, else its project''s on-call, made with the first rule when the project has no status page.'
        enabled:
          type: boolean
          description: Off keeps the rule without checking it.
        query:
          type: string
          description: 'The lines it counts: the Logs search; empty for every line.'
        kind:
          type: string
          description: 'match: at least threshold lines in the window; fewer: fewer than threshold; absent: no line at all.'
          enum:
          - match
          - fewer
          - absent
        threshold:
          type: integer
          description: Lines; not for absent.
          minimum: 1
          maximum: 100000000
        windowMinutes:
          type: integer
          description: The window the lines are counted over.
          minimum: 1
          maximum: 1440
        confirmMinutes:
          type: integer
          description: How long the condition holds before it fires; 0 is at once.
          minimum: 0
          maximum: 60
        recoverMinutes:
          type: integer
          description: How long it is false before the alert resolves; 0 is at once.
          minimum: 0
          maximum: 60
        environments:
          type: array
          items:
            type: string
            description: Environments a line must be in; empty for any.
        ownRouting:
          type: boolean
          description: true sends to destinationIds and memberIds; false to where the page's alerts go.
        repeatMinutes:
          type: integer
          description: Minutes between repeats while triggered; 0 for none.
          enum:
          - 0
          - 1
          - 2
          - 5
          - 10
          - 15
          - 30
          - 60
        groupMinutes:
          type: integer
          description: Minutes in which later alerts join the first; 0 is off.
          enum:
          - 0
          - 2
          - 5
          - 10
          - 30
        destinationIds:
          type: array
          items:
            type: string
            description: 'With ownRouting: the team''s alert destinations.'
        memberIds:
          type: array
          items:
            type: string
            description: 'With ownRouting: people in the team to notify.'
        paging:
          type: string
          description: 'Who is paged: "page" (the page''s escalation policy), "none", or the id of one of the team''s policies. Escalation is on Pro.'
    Error:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              description: 'A short machine-readable reason: unauthenticated, read_only, forbidden, not_found, bad_request, conflict, plan_limit, too_broad, rate_limited, suspended, out_of_reach, internal, unavailable.'
            message:
              type: string
              description: What went wrong, in words.
          required:
          - code
          - message
      required:
      - error
    LogAlert:
      type: object
      properties:
        id:
          type: string
          description: The rule id.
        appId:
          type: string
          description: The app whose lines it counts.
        name:
          type: string
          description: The rule's name, up to 80 characters.
        pageId:
          type: string
          description: 'The page whose on-call takes its alerts: a status page, or the app''s project''s on-call page. A new rule takes the app''s page unless given, else the key''s, else its project''s on-call, made with the first rule when the project has no status page.'
        enabled:
          type: boolean
          description: Off keeps the rule without checking it.
        query:
          type: string
          description: 'The lines it counts: the Logs search; empty for every line.'
        kind:
          type: string
          description: 'match: at least threshold lines in the window; fewer: fewer than threshold; absent: no line at all.'
          enum:
          - match
          - fewer
          - absent
        threshold:
          type: integer
          description: Lines; not for absent.
          minimum: 1
          maximum: 100000000
        windowMinutes:
          type: integer
          description: The window the lines are counted over.
          minimum: 1
          maximum: 1440
        confirmMinutes:
          type: integer
          description: How long the condition holds before it fires; 0 is at once.
          minimum: 0
          maximum: 60
        recoverMinutes:
          type: integer
          description: How long it is false before the alert resolves; 0 is at once.
          minimum: 0
          maximum: 60
        environments:
          type: array
          items:
            type: string
            description: Environments a line must be in; empty for any.
        ownRouting:
          type: boolean
          description: true sends to destinationIds and memberIds; false to where the page's alerts go.
        repeatMinutes:
          type: integer
          description: Minutes between repeats while triggered; 0 for none.
          enum:
          - 0
          - 1
          - 2
          - 5
          - 10
          - 15
          - 30
          - 60
        groupMinutes:
          type: integer
          description: Minutes in which later alerts join the first; 0 is off.
          enum:
          - 0
          - 2
          - 5
          - 10
          - 30
        destinationIds:
          type: array
          items:
            type: string
            description: 'With ownRouting: the team''s alert destinations.'
        memberIds:
          type: array
          items:
            type: string
            description: 'With ownRouting: people in the team to notify.'
        paging:
          type: string
          description: 'Who is paged: "page" (the page''s escalation policy), "none", or the id of one of the team''s policies. Escalation is on Pro.'
        internal:
          type: boolean
          description: true when pageId is the project's on-call page, which is no status page.
        summary:
          type: string
          description: Its condition and search, in words.
        firing:
          type: boolean
          description: Whether its alert is open.
        waitingForLines:
          type: boolean
          description: 'fewer and absent: true until a check has found the condition false once (for absent, a line; for fewer, at least threshold lines). Until then the rule does not fire, so one made before its app sends anything waits for the first lines. Editing the search, kind or environments starts the wait again. False while the rule is firing, and always for match.'
        lastCheckedAt:
          type:
          - string
          - 'null'
          description: ISO 8601, UTC.
          format: date-time
        lastCount:
          type:
          - integer
          - 'null'
          description: Lines in the window at the last check.
        lastFiredAt:
          type:
          - string
          - 'null'
          description: ISO 8601, UTC.
          format: date-time
        lastError:
          type:
          - string
          - 'null'
          description: What ClickHouse said when it refused the search; the rule is not checked until it is changed. A search too heavy to count is set apart for an hour and says so.
        searchUrl:
          type: string
          description: The Logs area at its search and window.
        createdAt:
          type: string
          description: ISO 8601, UTC.
          format: date-time
        updatedAt:
          type: string
          description: ISO 8601, UTC.
          format: date-time
  securitySchemes:
    bearer:
      type: http
      scheme: bearer
      description: 'Authorization: Bearer sk_... with a key from Settings, API keys, or an OAuth access token (sat_...) from /oauth/token, which /.well-known/oauth-authorization-server describes. An agent nobody has claimed yet holds a sag_... token, which reaches /agent/draft only (see /auth.md).'