LogRocket Data Export API

Retrieve exported session data files from storage buckets.

OpenAPI Specification

logrocket-data-export-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: LogRocket GraphQL Data Export API
  description: The LogRocket GraphQL API allows developers to query session replay and analytics data using GraphQL. It provides a flexible query interface for retrieving session information, user activity, error details, and performance metrics. Developers can use this API to build custom dashboards, integrate session data into internal tools, and perform advanced filtering and aggregation of LogRocket monitoring data.
  version: '1.0'
  contact:
    name: LogRocket Support
    url: https://logrocket.com/support
  termsOfService: https://logrocket.com/terms
servers:
- url: https://api.logrocket.com
  description: LogRocket Production API
security:
- tokenAuth: []
tags:
- name: Data Export
  description: Retrieve exported session data files from storage buckets.
paths:
  /orgs/{orgId}/apps/{appId}/data-export/:
    get:
      operationId: listDataExports
      summary: List exported session data files
      description: Returns a paginated list of exported session data files. Each session produces a single JSON Lines file when the session completes, which is defined as no new data being received for over an hour. Use the cursor from the response to retrieve the next page of results.
      tags:
      - Data Export
      parameters:
      - $ref: '#/components/parameters/orgId'
      - $ref: '#/components/parameters/appId'
      - name: cursor
        in: query
        required: false
        description: Cursor from a previous response to retrieve the next page of newer sessions. Treat this value as a string even though it may appear numeric.
        schema:
          type: string
      - name: limit
        in: query
        required: false
        description: Maximum number of session export records to return per page. Default is 10, maximum is 100.
        schema:
          type: integer
          default: 10
          minimum: 1
          maximum: 100
      - name: date
        in: query
        required: false
        description: Unix timestamp in milliseconds to start retrieving sessions from.
        schema:
          type: string
      responses:
        '200':
          description: List of exported session data files.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DataExportResponse'
        '401':
          description: Missing or invalid API key.
        '404':
          description: Organization or application not found.
components:
  schemas:
    DataExportResponse:
      type: object
      description: Paginated response containing exported session data file URLs.
      properties:
        cursor:
          type: string
          description: Cursor value for retrieving the next page of results. Treat as a string even though it may appear numeric.
        sessions:
          type: array
          description: Array of exported session records with download URLs.
          items:
            $ref: '#/components/schemas/ExportedSession'
    ExportedSession:
      type: object
      description: An exported session data file record.
      properties:
        url:
          type: string
          format: uri
          description: URL to download the JSON Lines file containing the session data.
  parameters:
    orgId:
      name: orgId
      in: path
      required: true
      description: The organization identifier found in the LogRocket dashboard URL.
      schema:
        type: string
    appId:
      name: appId
      in: path
      required: true
      description: The application or project identifier found in the LogRocket dashboard URL.
      schema:
        type: string
  securitySchemes:
    tokenAuth:
      type: apiKey
      in: header
      name: Authorization
      description: API token authentication. Use the format "token <your-api-key>". API keys are available from the LogRocket dashboard under Settings > General Settings.
externalDocs:
  description: LogRocket GraphQL API Documentation
  url: https://docs.logrocket.com/reference/graphql-1