ForgeRock Sessions API

Query, validate, and manage authenticated sessions

GitHub OpenAPI
Pull this API's OpenAPI, operations, scores and pricing into your own code or AI agent with a free APIs.io key — sign in with GitHub, Google or LinkedIn. No form to fill in; signing in shares your email address with us (Privacy).
Business capability
Identity & Access Management BC-620.20

Operations 3

Each operation below carries the questions people ask an LLM about it and the instructions they give an agent to run it. Generated by API Evangelist overlay

GET /json/realms/root/realms/{realm}/sessions List active sessions in a realm · ForgeRock Query sessions #
Ask an LLM
“Which users are still logged in to my realm?”
“Can I filter active sessions with a CREST query?”
Tell an agent
List active sessions in realm {realm}.
Show sessions in {realm} matching {filter}.
POST /json/realms/root/realms/{realm}/sessions Perform an action on a session · ForgeRock Perform a session action #
Ask an LLM
“How do I log out a user's session by token?”
“Can I validate or refresh a session?”
Tell an agent
Perform action {action} on session {token} in {realm}.
Validate session {token} in realm {realm}.
POST /am/json/realms/root/realms/{realm}/sessions Manage sessions through the AM endpoint · ForgeRock Perform session actions #
Ask an LLM
“Can I get session info or refresh the idle timeout through the AM endpoint?”
“What session actions does the AM manageSessions endpoint support?”
Tell an agent
Use the AM manageSessions endpoint to perform {action} on session {token} in {realm}.
Get session info for {token} in realm {realm} via AM.

Documentation

Specifications

Other Resources

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/forgerock:forgerock-sessions-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

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. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

forgerock-sessions-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Forgerock Sessions API
  contact:
    name: ForgeRock
    url: https://www.forgerock.com
  license:
    name: Proprietary
    url: https://www.forgerock.com/terms
  x-refined-note:
  - x-api differs across the merged source definitions and was not carried
  x-provider: forgerock
  version: '1.0'
  description: 'Operations tagged Sessions across 2 of this provider''s published API definitions: forgerock-access-management-openapi.yml, forgerock-identity-cloud-openapi.yml. Each path carries the servers of the definition it was published in.'
servers:
- url: https://{deployment}/am
  description: ForgeRock Access Management server
  variables:
    deployment:
      default: am.example.com
      description: The AM deployment hostname
- url: https://{tenant}.forgeblocks.com
  description: ForgeRock Identity Cloud tenant
  variables:
    tenant:
      default: mycompany
      description: The tenant identifier for your Identity Cloud environment
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'
      security:
      - ssoToken: []
      - bearerAuth: []
    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'
      security:
      - ssoToken: []
      - bearerAuth: []
    servers:
    - url: https://{deployment}/am
      description: ForgeRock Access Management server
      variables:
        deployment:
          default: am.example.com
          description: The AM deployment hostname
  /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'
      security:
      - bearerAuth: []
      - apiKeyAuth: []
    servers:
    - url: https://{tenant}.forgeblocks.com
      description: ForgeRock Identity Cloud tenant
      variables:
        tenant:
          default: mycompany
          description: The tenant identifier for your Identity Cloud environment
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:
    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
    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
    SessionQueryResult:
      type: object
      description: Session query results
      properties:
        result:
          type: array
          items:
            $ref: '#/components/schemas/SessionInfo'
        resultCount:
          type: integer
        totalPagedResults:
          type: integer
    ErrorResponse:
      type: object
      description: Standard CREST error response
      properties:
        code:
          type: integer
        reason:
          type: string
        message:
          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_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
  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
    apiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: API key for tenant read-only operations. Used together with x-api-secret header.
x-refined-from:
- forgerock-access-management-openapi.yml
- forgerock-identity-cloud-openapi.yml