Eraser Audit Logs API

Query audit events for compliance and monitoring

Operations 1

GET /api/audit-logs Query audit logs #

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/eraser-audit-logs-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

eraser-audit-logs-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Eraser AI Requests Audit Logs API
  description: The Eraser REST API provides programmatic access to diagram generation, file management, folder management, audit logs, and team usage metrics. Developers can generate diagrams from natural language prompts or Eraser DSL, create and manage files and diagrams on the canvas, and retrieve aggregated usage metrics. API access requires a team API token and is available on Starter, Business, and Enterprise paid plans with usage-based billing for API calls beyond plan credits.
  version: v1.0
  contact:
    name: Eraser Support
    url: https://www.eraser.io/
    email: hello@eraser.io
  termsOfService: https://www.eraser.io/
servers:
- url: https://app.eraser.io
  description: Eraser API Server
security:
- bearerAuth: []
tags:
- name: Audit Logs
  description: Query audit events for compliance and monitoring
paths:
  /api/audit-logs:
    get:
      operationId: getAuditLogs
      summary: Query audit logs
      description: Query audit events with cursor-based pagination. Requires an audit API key (not the team bearer token). Supports filtering by time range, event type, and user.
      tags:
      - Audit Logs
      externalDocs:
        description: API documentation
        url: https://docs.eraser.io/reference/get-audit-logs
      security:
      - auditApiKey: []
      parameters:
      - name: startTime
        in: query
        required: false
        description: Start of the time range (inclusive). RFC3339/ISO 8601 timestamp.
        schema:
          type: string
          format: date-time
      - name: endTime
        in: query
        required: false
        description: End of the time range (exclusive). RFC3339/ISO 8601 timestamp.
        schema:
          type: string
          format: date-time
      - name: cursor
        in: query
        required: false
        description: Opaque cursor string for pagination.
        schema:
          type: string
      - name: limit
        in: query
        required: false
        description: Maximum events per request (1-1000). Defaults to 100.
        schema:
          type: integer
          minimum: 1
          maximum: 1000
          default: 100
      - name: eventType
        in: query
        required: false
        description: Filter by action type.
        schema:
          type: string
          enum:
          - auth.login
          - auth.logout
          - iam.user.created
          - iam.user.deleted
          - iam.user.invited
          - iam.role.granted
          - iam.role.revoked
          - admin.api_key.created
          - admin.api_key.deleted
          - admin.settings.changed
          - admin.integration.connected
          - admin.integration.disconnected
          - admin.team.created
          - admin.team.deleted
          - data.file.created
          - data.file.archived
          - data.file.deleted
          - data.file.exported
          - data.file.invite_sent
          - data.file.visited
          - data.file.settings.changed
      - name: userId
        in: query
        required: false
        description: Filter events by the ID of the user who performed the action.
        schema:
          type: string
      - name: format
        in: query
        required: false
        description: Output format. Defaults to ecs.
        schema:
          type: string
          enum:
          - ecs
          - splunk
          default: ecs
      responses:
        '200':
          description: Audit events retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AuditLogResponse'
        '400':
          description: Invalid request parameters
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Invalid or missing audit API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '503':
          description: Audit logging not configured for deployment
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    Error:
      type: object
      properties:
        error:
          type: string
          description: Error message describing what went wrong
    AuditEventECS:
      type: object
      properties:
        id:
          type: string
          description: Unique event identifier
        '@timestamp':
          type: string
          format: date-time
          description: Event timestamp
        event:
          type: object
          properties:
            id:
              type: string
            category:
              type: string
            action:
              type: string
            outcome:
              type: string
        user:
          type: object
          description: User who performed the action
        user.target:
          type: object
          description: Target user of the action (if applicable)
        organization:
          type: object
          description: Organization context
        url:
          type: object
          description: URL context of the event
        eraser:
          type: object
          properties:
            teamId:
              type: string
            workspaceId:
              type: string
            organizationId:
              type: string
            metadata:
              type: object
    AuditLogResponse:
      type: object
      required:
      - events
      - hasMore
      - serverTime
      properties:
        events:
          type: array
          items:
            $ref: '#/components/schemas/AuditEventECS'
        nextCursor:
          type:
          - string
          - 'null'
          description: Cursor for pagination
        hasMore:
          type: boolean
          description: Whether more events are available
        serverTime:
          type: string
          format: date-time
          description: Current server time
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: Team-specific API bearer token from Eraser settings
    auditApiKey:
      type: apiKey
      in: header
      name: Authorization
      description: Audit-specific API key for accessing audit log endpoints
externalDocs:
  description: Eraser API Documentation
  url: https://docs.eraser.io/docs/eraser-api