openapi: 3.1.0 info: title: ForgeRock Access Management Access Requests Sessions 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: Sessions description: Query, validate, and manage authenticated sessions paths: /json/realms/root/realms/{realm}/sessions: get: operationId: querySessions summary: ForgeRock Query sessions description: Query active sessions in the specified realm. Requires administrative privileges. tags: - Sessions parameters: - $ref: '#/components/parameters/RealmPath' - name: _queryFilter in: query description: CREST query filter for sessions schema: type: string - $ref: '#/components/parameters/ApiVersion' responses: '200': description: List of active sessions content: application/json: schema: $ref: '#/components/schemas/SessionQueryResult' '403': description: Insufficient privileges content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' post: operationId: sessionAction summary: ForgeRock Perform a session action description: Perform an action on a session such as validate, logout, getSessionInfo, or refresh. tags: - Sessions parameters: - $ref: '#/components/parameters/RealmPath' - name: _action in: query required: true description: The session action to perform schema: type: string enum: - validate - logout - getSessionInfo - refresh - getSessionProperties - $ref: '#/components/parameters/ApiVersion' requestBody: description: Session token data content: application/json: schema: type: object properties: tokenId: type: string description: The SSO token ID responses: '200': description: Session action result content: application/json: schema: $ref: '#/components/schemas/SessionActionResult' '401': description: Invalid or expired session content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' /am/json/realms/root/realms/{realm}/sessions: post: operationId: manageSessions summary: ForgeRock Perform session actions description: Perform actions on sessions such as getting session info, refreshing idle timeout, or logging out. The action is specified via the _action query parameter. tags: - Sessions parameters: - $ref: '#/components/parameters/RealmPath_2' - name: _action in: query required: true description: The action to perform on the session schema: type: string enum: - getSessionInfo - refresh - logout - validate - name: Accept-API-Version in: header required: true description: API version protocol header schema: type: string default: resource=2.0,protocol=1.0 requestBody: description: Session token identifier content: application/json: schema: type: object properties: tokenId: type: string description: The SSO token ID for the session responses: '200': description: Session action completed successfully content: application/json: schema: $ref: '#/components/schemas/SessionInfo_2' '401': description: Session is invalid or expired content: application/json: schema: $ref: '#/components/schemas/ErrorResponse_2' components: parameters: RealmPath: name: realm in: path required: true description: The realm name schema: type: string default: root ApiVersion: name: Accept-API-Version in: header required: true description: CREST API version protocol header schema: type: string default: resource=2.0,protocol=1.0 RealmPath_2: name: realm in: path required: true description: The realm name (e.g., alpha, bravo) schema: type: string default: alpha schemas: SessionActionResult: type: object description: Result of a session action properties: valid: type: boolean description: Whether the session is valid (for validate action) uid: type: string realm: type: string ErrorResponse_2: type: object description: Standard error response properties: code: type: integer description: HTTP status code reason: type: string description: HTTP status reason phrase message: type: string description: Detailed error message SessionInfo: type: object description: Session information properties: username: type: string universalId: type: string realm: type: string latestAccessTime: type: string format: date-time maxIdleExpirationTime: type: string format: date-time maxSessionExpirationTime: type: string format: date-time SessionQueryResult: type: object description: Session query results properties: result: type: array items: $ref: '#/components/schemas/SessionInfo' resultCount: type: integer totalPagedResults: type: integer SessionInfo_2: type: object description: Session information properties: username: type: string description: The username of the session owner universalId: type: string description: Universal identifier for the session owner realm: type: string description: The realm the session belongs to latestAccessTime: type: string format: date-time description: Most recent access time for the session maxIdleExpirationTime: type: string format: date-time description: Time at which the session will expire due to inactivity maxSessionExpirationTime: type: string format: date-time description: Maximum session expiration time properties: type: object description: Session properties additionalProperties: type: string 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