ForgeRock Policies API

Manage authorization policies

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 5

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}/policies List authorization policies in a realm · ForgeRock List authorization policies #
Ask an LLM
“Which authorization policies are defined in a realm?”
“Can I filter a realm's policies with a CREST query?”
Tell an agent
List authorization policies in realm {realm}.
Find policies in {realm} matching {filter}.
POST /json/realms/root/realms/{realm}/policies Create a policy or evaluate policies · ForgeRock Create a policy or evaluate policies #
Ask an LLM
“How do I create a new authorization policy?”
“Can I evaluate policies instead of creating one?”
Tell an agent
Create a policy in realm {realm}.
Evaluate policies in {realm} with action {action}.
GET /json/realms/root/realms/{realm}/policies/{policyName} Get an authorization policy · ForgeRock Get a policy #
Ask an LLM
“What are the conditions of one policy?”
“Can I fetch a single policy by name?”
Tell an agent
Get policy {policy} in realm {realm}.
Show the conditions of policy {policy}.
PUT /json/realms/root/realms/{realm}/policies/{policyName} Replace an authorization policy · ForgeRock Update a policy #
Ask an LLM
“How do I change the conditions of an existing policy?”
“Can I deactivate a policy without deleting it?”
Tell an agent
Replace policy {policy} in realm {realm} with conditions {condition}.
Set policy {policy} active to {active}.
DELETE /json/realms/root/realms/{realm}/policies/{policyName} Delete an authorization policy · ForgeRock Delete a policy #
Ask an LLM
“How do I remove a policy from a realm?”
“Can I delete a policy by name?”
Tell an agent destructive · confirm first
Delete policy {policy} from realm {realm}.
Remove the {policy} policy.

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-policies-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-policies-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: ForgeRock Access Management Policies 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: Policies
  description: Manage authorization policies
paths:
  /json/realms/root/realms/{realm}/policies:
    get:
      operationId: listPolicies
      summary: ForgeRock List authorization policies
      description: Query authorization policies in the specified realm. Supports CREST query filters.
      tags:
      - Policies
      parameters:
      - $ref: '#/components/parameters/RealmPath'
      - name: _queryFilter
        in: query
        description: CREST query filter expression
        schema:
          type: string
      - $ref: '#/components/parameters/ApiVersion'
      responses:
        '200':
          description: List of policies
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PolicyList'
        '403':
          description: Insufficient privileges
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
    post:
      operationId: createPolicyOrEvaluate
      summary: ForgeRock Create a policy or evaluate policies
      description: Create a new authorization policy, or evaluate policies using the _action=evaluate or _action=evaluateTree query parameter.
      tags:
      - Policies
      parameters:
      - $ref: '#/components/parameters/RealmPath'
      - name: _action
        in: query
        description: Action to perform (evaluate or evaluateTree)
        schema:
          type: string
          enum:
          - evaluate
          - evaluateTree
      - $ref: '#/components/parameters/ApiVersion'
      requestBody:
        required: true
        description: Policy definition or evaluation request
        content:
          application/json:
            schema:
              oneOf:
              - $ref: '#/components/schemas/Policy'
              - $ref: '#/components/schemas/PolicyEvaluationRequest'
      responses:
        '200':
          description: Policy evaluation result
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/PolicyDecision'
        '201':
          description: Policy created successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Policy'
        '400':
          description: Invalid policy or evaluation request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /json/realms/root/realms/{realm}/policies/{policyName}:
    get:
      operationId: getPolicy
      summary: ForgeRock Get a policy
      description: Retrieve a specific authorization policy by name.
      tags:
      - Policies
      parameters:
      - $ref: '#/components/parameters/RealmPath'
      - name: policyName
        in: path
        required: true
        description: The policy name
        schema:
          type: string
      - $ref: '#/components/parameters/ApiVersion'
      responses:
        '200':
          description: The policy
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Policy'
        '404':
          description: Policy not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
    put:
      operationId: updatePolicy
      summary: ForgeRock Update a policy
      description: Replace an existing authorization policy.
      tags:
      - Policies
      parameters:
      - $ref: '#/components/parameters/RealmPath'
      - name: policyName
        in: path
        required: true
        description: The policy name
        schema:
          type: string
      - $ref: '#/components/parameters/ApiVersion'
      requestBody:
        required: true
        description: The complete policy definition
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Policy'
      responses:
        '200':
          description: Policy updated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Policy'
        '404':
          description: Policy not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
    delete:
      operationId: deletePolicy
      summary: ForgeRock Delete a policy
      description: Delete an authorization policy by name.
      tags:
      - Policies
      parameters:
      - $ref: '#/components/parameters/RealmPath'
      - name: policyName
        in: path
        required: true
        description: The policy name
        schema:
          type: string
      - $ref: '#/components/parameters/ApiVersion'
      responses:
        '200':
          description: Policy deleted
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Policy'
        '404':
          description: Policy not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
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
  schemas:
    PolicyDecision:
      type: object
      description: Authorization decision for a resource
      properties:
        resource:
          type: string
        actions:
          type: object
          additionalProperties:
            type: boolean
        attributes:
          type: object
          additionalProperties:
            type: array
            items:
              type: string
        advices:
          type: object
          additionalProperties:
            type: array
            items:
              type: string
    PolicyList:
      type: object
      properties:
        result:
          type: array
          items:
            $ref: '#/components/schemas/Policy'
        resultCount:
          type: integer
        totalPagedResults:
          type: integer
    Policy:
      type: object
      description: An authorization policy
      properties:
        name:
          type: string
          description: Policy name
        active:
          type: boolean
          description: Whether the policy is active
        description:
          type: string
        applicationName:
          type: string
          description: The policy set this policy belongs to
        actionValues:
          type: object
          description: Action-value pairs
          additionalProperties:
            type: boolean
        resources:
          type: array
          description: Resources this policy applies to
          items:
            type: string
        subject:
          type: object
          description: Subject conditions
        condition:
          type: object
          description: Environment conditions
        resourceTypeUuid:
          type: string
          description: UUID of the resource type
    PolicyEvaluationRequest:
      type: object
      description: Policy evaluation request
      properties:
        resources:
          type: array
          items:
            type: string
          description: Resources to evaluate
        application:
          type: string
          description: Policy set name
        subject:
          type: object
          description: Subject for evaluation
          properties:
            ssoToken:
              type: string
            claims:
              type: object
        environment:
          type: object
          description: Environment conditions
          additionalProperties:
            type: array
            items:
              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