Scanner Event Sinks API

Manage alert destinations (Slack, Webhook, PagerDuty).

OpenAPI Specification

scanner-event-sinks-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Scanner Ad Hoc Queries Event Sinks API
  version: v1
  description: Scanner is a cloud-native security data platform that indexes logs directly in Amazon S3 for fast full-text search, continuous streaming detections, and programmatic access to security data. This REST API (v1) covers searchable indexes, detection rules, event sinks, lookup tables, ad hoc queries, and account/query-capacity info. Authentication is a Scanner API key presented as an HTTP Bearer token. Most operations are tenant-scoped and require a `tenant_id`. The API base URL is environment-specific and shown in Settings > API Keys inside the Scanner app.
  contact:
    name: Scanner
    url: https://docs.scanner.dev/scanner/
  x-provenance:
    generated: '2026-07-21'
    method: generated
    source: https://docs.scanner.dev/scanner/using-scanner-complete-feature-reference/developer-tools/api.md
servers:
- url: https://{environment}.scanner.dev
  description: Environment-specific Scanner host. Find your environment/base URL in Settings > API Keys (the MCP endpoint uses the parallel form https://mcp.{environment}.scanner.dev/v1/mcp).
  variables:
    environment:
      default: your-env-here
      description: Your Scanner environment identifier from Settings > API Keys.
security:
- bearerAuth: []
tags:
- name: Event Sinks
  description: Manage alert destinations (Slack, Webhook, PagerDuty).
paths:
  /v1/event_sink:
    post:
      operationId: createEventSink
      tags:
      - Event Sinks
      summary: Create event sink
      description: Create a new event sink (Slack, Webhook, or PagerDuty) destination for alerts.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/EventSinkCreate'
      responses:
        '200':
          description: Created event sink.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EventSink'
        '400':
          $ref: '#/components/responses/BadRequest'
    get:
      operationId: listEventSinks
      tags:
      - Event Sinks
      summary: List event sinks
      description: Retrieve all event sinks for a tenant.
      parameters:
      - $ref: '#/components/parameters/TenantId'
      - $ref: '#/components/parameters/PageSize'
      - $ref: '#/components/parameters/PageToken'
      responses:
        '200':
          description: Paginated list of event sinks.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      event_sinks:
                        type: array
                        items:
                          $ref: '#/components/schemas/EventSink'
                  pagination:
                    $ref: '#/components/schemas/Pagination'
        '400':
          $ref: '#/components/responses/BadRequest'
  /v1/event_sink/{id}:
    get:
      operationId: getEventSink
      tags:
      - Event Sinks
      summary: Get event sink
      description: Retrieve a specific event sink by id.
      parameters:
      - $ref: '#/components/parameters/PathId'
      responses:
        '200':
          description: The event sink.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EventSink'
        '404':
          $ref: '#/components/responses/NotFound'
    put:
      operationId: updateEventSink
      tags:
      - Event Sinks
      summary: Update event sink
      description: Modify an existing event sink.
      parameters:
      - $ref: '#/components/parameters/PathId'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/EventSinkUpdate'
      responses:
        '200':
          description: Updated event sink.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EventSink'
        '400':
          $ref: '#/components/responses/BadRequest'
        '404':
          $ref: '#/components/responses/NotFound'
    delete:
      operationId: deleteEventSink
      tags:
      - Event Sinks
      summary: Delete event sink
      description: Remove an event sink.
      parameters:
      - $ref: '#/components/parameters/PathId'
      responses:
        '200':
          description: Id and tenant_id of the deleted event sink.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeletedRef'
        '404':
          $ref: '#/components/responses/NotFound'
components:
  schemas:
    DeletedRef:
      type: object
      properties:
        id:
          type: string
        tenant_id:
          type: string
    EventSink:
      type: object
      properties:
        id:
          type: string
        tenant_id:
          type: string
        name:
          type: string
        description:
          type: string
        event_sink_type:
          type: string
          enum:
          - Slack
          - Webhook
          - PagerDuty
        configuration:
          type: object
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
    Pagination:
      type: object
      properties:
        next_page_token:
          type:
          - string
          - 'null'
          description: Cursor for subsequent requests; null when exhausted.
    EventSinkCreate:
      type: object
      required:
      - tenant_id
      - name
      - description
      - event_sink_args
      properties:
        tenant_id:
          type: string
        name:
          type: string
        description:
          type: string
        event_sink_args:
          type: object
          description: Configuration for Slack, Webhook, or PagerDuty.
    EventSinkUpdate:
      type: object
      properties:
        name:
          type: string
        description:
          type: string
        event_sink_args:
          type: object
    Error:
      type: object
      properties:
        error:
          type: string
          description: Human-readable error description.
  parameters:
    TenantId:
      name: tenant_id
      in: query
      required: true
      schema:
        type: string
      description: Unique identifier for the tenant.
    PathId:
      name: id
      in: path
      required: true
      schema:
        type: string
      description: Resource identifier.
    PageSize:
      name: pagination[page_size]
      in: query
      required: false
      schema:
        type: integer
      description: Maximum results per page.
    PageToken:
      name: pagination[page_token]
      in: query
      required: false
      schema:
        type: string
      description: Cursor for the next page.
  responses:
    BadRequest:
      description: Invalid request.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: invalid query
    NotFound:
      description: Resource not found (or resolves to a non-user index).
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: 'Scanner API key presented as `Authorization: Bearer <Scanner API Key>`. Create keys in Settings > API Keys.'