Scanner Ad Hoc Queries API

Run asynchronous or blocking full-text queries over indexed logs.

Operations 4

POST /v1/start_query Start ad hoc query #
GET /v1/query_progress/{qr_id} Get query progress #
POST /v1/cancel_query/{qr_id} Cancel query #
POST /v1/blocking_query Blocking ad hoc query #

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/scanner-ad-hoc-queries-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

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. See our Privacy Policy and Terms.

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

OpenAPI Specification

scanner-ad-hoc-queries-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Scanner Ad Hoc Queries 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: Ad Hoc Queries
  description: Run asynchronous or blocking full-text queries over indexed logs.
paths:
  /v1/start_query:
    post:
      operationId: startQuery
      tags:
      - Ad Hoc Queries
      summary: Start ad hoc query
      description: Create an asynchronous ad hoc query. Returns a query-result id (qr_id) to poll.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/QueryRequest'
      responses:
        '200':
          description: Query accepted.
          content:
            application/json:
              schema:
                type: object
                properties:
                  qr_id:
                    type: string
                    format: uuid
              example:
                qr_id: 3f8c1c9a-0f2e-4a2b-9c1a-2d3e4f5a6b7c
        '400':
          $ref: '#/components/responses/BadRequest'
  /v1/query_progress/{qr_id}:
    get:
      operationId: getQueryProgress
      tags:
      - Ad Hoc Queries
      summary: Get query progress
      description: Check execution status and retrieve intermediate or final results for an ad hoc query. Poll about once per second.
      parameters:
      - name: qr_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      - name: show_intermediate_results
        in: query
        required: false
        schema:
          type: boolean
          default: true
      responses:
        '200':
          description: Query status and results.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/QueryResult'
        '404':
          $ref: '#/components/responses/NotFound'
  /v1/cancel_query/{qr_id}:
    post:
      operationId: cancelQuery
      tags:
      - Ad Hoc Queries
      summary: Cancel query
      description: Cancel an active query and free resources. Idempotent.
      parameters:
      - name: qr_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      responses:
        '204':
          description: Query cancelled (no body).
  /v1/blocking_query:
    post:
      operationId: blockingQuery
      tags:
      - Ad Hoc Queries
      summary: Blocking ad hoc query
      description: Execute a synchronous ad hoc query, holding the connection open until completion or a 300-second timeout.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/QueryRequest'
      responses:
        '200':
          description: Completed query result.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/QueryResult'
        '400':
          $ref: '#/components/responses/BadRequest'
        '504':
          description: Query exceeded the 300-second blocking timeout; no results returned.
components:
  schemas:
    Error:
      type: object
      properties:
        error:
          type: string
          description: Human-readable error description.
    QueryRequest:
      type: object
      required:
      - query
      - start_time
      - end_time
      properties:
        query:
          type: string
          description: Scanner query text.
        start_time:
          type: string
          format: date-time
          description: RFC 3339 start timestamp (inclusive).
        end_time:
          type: string
          format: date-time
          description: RFC 3339 end timestamp (exclusive).
        max_rows:
          type: integer
          default: 1000
          maximum: 100000
        max_bytes:
          type: integer
          default: 134217728
          description: Result size cap in bytes; default/max 128MB, min 1MB.
        scan_back_to_front:
          type: boolean
          default: true
    QueryResult:
      type: object
      properties:
        is_completed:
          type: boolean
        results:
          type: object
          properties:
            column_ordering:
              type: array
              items:
                type: string
            rows:
              type: array
              items:
                type: array
                items: {}
        metadata:
          type: object
  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.'