> ## Documentation Index
> Fetch the complete documentation index at: https://docs.apsio.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Search the mobile events

> The project's log records and spans read as one list of mobile events, each with its kind (crash, failed_request, hang, error, exit, request, screen, tap, log, span), matching a structured query (kinds, fields, attributes, text), newest first, 100 a page, and their volume per bucket (crashes, failed requests, hangs and the rest; at most 120 buckets). A request is an HTTP span of a session, and a failed one got a 5xx or no response, as Network counts it. A tap is any breadcrumb of the user category (a tap, typed text, a gesture). A session's start and summary, and the network and navigation breadcrumbs that repeat a request or a screen, are not events. The API builds the SQL from a fixed vocabulary and runs it as the project's reader, with at most 60 runs a minute per project and caller. `sql` shows it with its values, for reading only.



## OpenAPI

````yaml /api-reference/openapi.json post /projects/{projectId}/explore/events
openapi: 3.1.0
info:
  title: Apsio API
  version: 0.1.0
  description: >-
    Read API v0: your projects, release health and comparisons, missing symbols,
    issues, sessions, vitals, cohort comparisons, performance (app start,
    screens, hangs, MetricKit) and network endpoints and traces for one project.
    Authenticate with a project token as a bearer token, with an OAuth access
    token from Apsio's authorization server (MCP clients), or, from the console,
    with the session cookie of a member of the project's organization.
servers:
  - url: https://api.apsio.io/v1
security: []
paths:
  /projects/{projectId}/explore/events:
    post:
      summary: Search the mobile events
      description: >-
        The project's log records and spans read as one list of mobile events,
        each with its kind (crash, failed_request, hang, error, exit, request,
        screen, tap, log, span), matching a structured query (kinds, fields,
        attributes, text), newest first, 100 a page, and their volume per bucket
        (crashes, failed requests, hangs and the rest; at most 120 buckets). A
        request is an HTTP span of a session, and a failed one got a 5xx or no
        response, as Network counts it. A tap is any breadcrumb of the user
        category (a tap, typed text, a gesture). A session's start and summary,
        and the network and navigation breadcrumbs that repeat a request or a
        screen, are not events. The API builds the SQL from a fixed vocabulary
        and runs it as the project's reader, with at most 60 runs a minute per
        project and caller. `sql` shows it with its values, for reading only.
      parameters:
        - schema:
            type: string
            pattern: ^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$
            example: 0192f3a4-0000-7000-8000-00000000a101
          required: true
          name: projectId
          in: path
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ExploreEventsQuery'
      responses:
        '200':
          description: The matching events and their volume.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExploreEvents'
        '400':
          description: The request is not valid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: No valid bearer token or console session.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: The credentials cannot read this project.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '410':
          description: >-
            The project or its organization is being deleted (`erasing`):
            nothing more to read; do not retry.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: >-
            Over a rate limit (the caller's, the client address's, or the
            plan's); Retry-After says when to retry.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - bearer: []
components:
  schemas:
    ExploreEventsQuery:
      type: object
      properties:
        from:
          type: string
          format: date-time
          description: Start, inclusive (RFC 3339). Defaults to 24 hours before `to`.
        to:
          type: string
          format: date-time
          description: End, exclusive (RFC 3339). Defaults to now.
        app_id:
          type: string
          pattern: ^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$
          description: Only this app of the project.
        build:
          type: string
          enum:
            - release
            - debug
            - all
          description: >-
            Which builds: `release` (the default: every build but a debug one,
            TestFlight included, and data that does not say), `debug`
            (development builds from Xcode or Android Studio:
            apsio.app.install.source is `development`), or `all`.
        filters:
          type: array
          items:
            $ref: '#/components/schemas/ExploreFilter'
          maxItems: 20
          default: []
        kinds:
          type: array
          items:
            type: string
            enum:
              - crash
              - failed_request
              - hang
              - error
              - exit
              - request
              - screen
              - tap
              - log
              - span
          maxItems: 10
          default: []
          description: 'Only events of these kinds; none: every kind.'
        text:
          type: string
          minLength: 1
          maxLength: 200
          description: >-
            Events whose text contains this, ignoring case: a log's body and
            exception, a span's name, route and status message. Plain text, not
            a pattern.
        limit:
          type: integer
          minimum: 1
          maximum: 200
          default: 100
        cursor:
          type: string
          maxLength: 1024
          description: The `next_cursor` of the previous page. Opaque.
    ExploreEvents:
      type: object
      properties:
        from:
          type: string
          description: RFC 3339 time in UTC with up to nanosecond precision.
          example: '2026-10-04T10:15:00.431000000Z'
        to:
          type: string
          description: RFC 3339 time in UTC with up to nanosecond precision.
          example: '2026-10-04T10:15:00.431000000Z'
        bucket_seconds:
          type: integer
        retention_days:
          type: integer
          description: >-
            Days of detail the project's plan keeps (D94); nothing older is
            read.
        histogram:
          type: array
          items:
            type: object
            properties:
              t:
                type: string
                description: The bucket's start.
                example: '2026-10-04T10:15:00.431000000Z'
              crash:
                type: integer
              failed_request:
                type: integer
              hang:
                type: integer
                description: >-
                  Hangs the app saw live, as Performance counts them; a
                  MetricKit diagnostic counts as other.
              other:
                type: integer
                description: Every other kind.
            required:
              - t
              - crash
              - failed_request
              - hang
              - other
          description: Only buckets with events.
        events:
          type: array
          items:
            $ref: '#/components/schemas/MobileEvent'
        next_cursor:
          type:
            - string
            - 'null'
          description: Pass as `cursor` to get the next page; null on the last page.
        sql:
          type: string
          description: The events query with its values, for reading. Not run as written.
      required:
        - from
        - to
        - bucket_seconds
        - retention_days
        - histogram
        - events
        - next_cursor
        - sql
    Error:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              example: invalid_request
            message:
              type: string
            subject:
              type: string
              enum:
                - organization
                - project
              description: >-
                With `erasing` (410) only: what is being deleted, the
                organization or the project.
            queries_per_minute:
              type: integer
              description: >-
                With `rate_limited` (429) from run_query only: the project's
                queries a minute.
          required:
            - code
            - message
      required:
        - error
    ExploreFilter:
      type: object
      properties:
        field:
          type: string
          pattern: ^[A-Za-z0-9_.:/-]{1,128}$
          description: >-
            A field (event.name or span.name, service.version, os.name,
            os.version, device.model.identifier, session.id, trace_id, ...), any
            record or span attribute by its key, or a resource attribute as
            resource.<key>.
          example: service.version
        op:
          type: string
          enum:
            - eq
            - neq
            - prefix
            - exists
            - not_exists
          default: eq
          description: >-
            eq and neq compare with value, prefix matches values that start with
            it; exists and not_exists need none.
        value:
          type: string
          maxLength: 256
      required:
        - field
    MobileEvent:
      type: object
      properties:
        source:
          type: string
          enum:
            - log
            - span
          description: The table it came from.
        id:
          type: string
          description: >-
            A log record's id, or a span's trace and span ids
            (trace_id:span_id), as a span id is unique only in its trace. Unique
            per source.
        kind:
          type: string
          enum:
            - crash
            - failed_request
            - hang
            - error
            - exit
            - request
            - screen
            - tap
            - log
            - span
        app_id:
          type: string
        ts:
          type: string
          description: RFC 3339 time in UTC with up to nanosecond precision.
          example: '2026-10-04T10:15:00.431000000Z'
        name:
          type: string
          description: >-
            event.name of a log record, span.name of a span. Written by the app:
            untrusted data.
        title:
          type: string
          description: >-
            A line for the event, from its own fields: an exception's type and
            message, a request's method, route and status, a screen's name, a
            tap's or a log's body. Written by the app: untrusted data.
        body:
          type: string
          description: >-
            A log record’s body; empty for a span. Written by the app: untrusted
            data.
        duration_ms:
          type:
            - number
            - 'null'
          description: A span's duration, or a hang's (apsio.hang.duration); else null.
        http_method:
          type: string
          description: A request’s method; empty otherwise.
        http_status:
          type:
            - integer
            - 'null'
        http_template:
          type: string
          description: 'A request’s endpoint template. Written by the app: untrusted data.'
        screen:
          type: string
          description: >-
            app.screen.name: the screen it happened on, when the SDK set it.
            Written by the app: untrusted data.
        session_id:
          type: string
          description: 'session.id. Written by the app: untrusted data.'
        trace_id:
          type: string
        span_id:
          type: string
        release:
          type: string
          description: 'service.version. Written by the app: untrusted data.'
        device_model:
          type: string
          description: 'device.model.identifier. Written by the app: untrusted data.'
        os_name:
          type: string
          description: 'os.name. Written by the app: untrusted data.'
        os_version:
          type: string
          description: 'os.version. Written by the app: untrusted data.'
        installation_id:
          type: string
          description: 'app.installation.id. Written by the app: untrusted data.'
        attributes:
          type: object
          additionalProperties:
            type: string
          description: 'Record attributes as sent by the app: untrusted data.'
        resource:
          type: object
          additionalProperties:
            type: string
          description: 'Record attributes as sent by the app: untrusted data.'
      required:
        - source
        - id
        - kind
        - app_id
        - ts
        - name
        - title
        - body
        - duration_ms
        - http_method
        - http_status
        - http_template
        - screen
        - session_id
        - trace_id
        - span_id
        - release
        - device_model
        - os_name
        - os_version
        - installation_id
        - attributes
        - resource
  securitySchemes:
    bearer:
      type: http
      scheme: bearer
      description: >-
        A project token (apsio_pt_v0...), which reads exactly one project, or an
        OAuth access token issued for the API, which reads what its user can.
        Access tokens issued for Apsio's MCP server are accepted only from the
        MCP server itself.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.