ForgeRock Audit API

Access audit log records

Documentation

Specifications

Other Resources

OpenAPI Specification

forgerock-audit-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: ForgeRock Access Management Access Requests Audit API
  description: REST API for ForgeRock Access Management (AM) providing authentication, authorization, session management, and policy evaluation. Supports OAuth 2.0 and OpenID Connect flows, authentication trees/journeys, policy-based authorization decisions, and realm management.
  version: 7.3.0
  contact:
    name: ForgeRock
    url: https://www.forgerock.com
  license:
    name: Proprietary
    url: https://www.forgerock.com/terms
  x-provider: forgerock
  x-api: access-management
servers:
- url: https://{deployment}/am
  description: ForgeRock Access Management server
  variables:
    deployment:
      default: am.example.com
      description: The AM deployment hostname
security:
- ssoToken: []
- bearerAuth: []
tags:
- name: Audit
  description: Access audit log records
paths:
  /audit/{auditTopic}:
    get:
      operationId: queryAuditLogs
      summary: ForgeRock Query audit log entries
      description: Query audit log records for the specified topic (e.g., access, activity, authentication, config, recon, sync).
      tags:
      - Audit
      parameters:
      - name: auditTopic
        in: path
        required: true
        description: The audit topic to query
        schema:
          type: string
          enum:
          - access
          - activity
          - authentication
          - config
          - recon
          - sync
      - $ref: '#/components/parameters/QueryFilter'
      - $ref: '#/components/parameters/PageSize'
      - $ref: '#/components/parameters/PagedResultsOffset'
      - $ref: '#/components/parameters/SortKeys'
      responses:
        '200':
          description: Audit log entries
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AuditQueryResult'
  /audit/{auditTopic}/{auditId}:
    get:
      operationId: getAuditLogEntry
      summary: ForgeRock Get an audit log entry
      description: Retrieve a specific audit log entry by topic and identifier.
      tags:
      - Audit
      parameters:
      - name: auditTopic
        in: path
        required: true
        description: The audit topic
        schema:
          type: string
      - name: auditId
        in: path
        required: true
        description: The audit entry identifier
        schema:
          type: string
      responses:
        '200':
          description: The audit entry
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AuditEntry'
        '404':
          description: Audit entry not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  parameters:
    QueryFilter:
      name: _queryFilter
      in: query
      description: CREST query filter expression
      schema:
        type: string
    SortKeys:
      name: _sortKeys
      in: query
      description: Comma-separated sort fields (prefix with - for descending)
      schema:
        type: string
    PageSize:
      name: _pageSize
      in: query
      description: Number of results per page
      schema:
        type: integer
        minimum: 1
    PagedResultsOffset:
      name: _pagedResultsOffset
      in: query
      description: Offset for pagination
      schema:
        type: integer
        minimum: 0
  schemas:
    AuditQueryResult:
      type: object
      properties:
        result:
          type: array
          items:
            $ref: '#/components/schemas/AuditEntry'
        resultCount:
          type: integer
        totalPagedResults:
          type: integer
    AuditEntry:
      type: object
      description: An audit log entry
      properties:
        _id:
          type: string
        eventName:
          type: string
        timestamp:
          type: string
          format: date-time
        transactionId:
          type: string
        userId:
          type: string
        trackingIds:
          type: array
          items:
            type: string
        runAs:
          type: string
        objectId:
          type: string
        operation:
          type: string
        before:
          type: object
        after:
          type: object
        changedFields:
          type: array
          items:
            type: string
        status:
          type: string
          enum:
          - SUCCESS
          - FAILURE
    ErrorResponse:
      type: object
      description: Standard CREST error response
      properties:
        code:
          type: integer
        reason:
          type: string
        message:
          type: string
  securitySchemes:
    ssoToken:
      type: apiKey
      in: header
      name: iPlanetDirectoryPro
      description: AM SSO token obtained from authentication
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: OAuth 2.0 access token