ForgeRock Groups API

Manage group entries in the directory

Documentation

Specifications

Other Resources

OpenAPI Specification

forgerock-groups-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: ForgeRock Access Management Access Requests Groups 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: Groups
  description: Manage group entries in the directory
paths:
  /api/groups:
    get:
      operationId: listGroups
      summary: List directory groups
      description: Query group entries in the directory. Groups are mapped from LDAP groupOfUniqueNames or groupOfNames entries.
      tags:
      - Groups
      parameters:
      - $ref: '#/components/parameters/QueryFilter'
      - $ref: '#/components/parameters/PageSize'
      - $ref: '#/components/parameters/PagedResultsCookie'
      - $ref: '#/components/parameters/Fields'
      responses:
        '200':
          description: List of groups
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GroupQueryResult'
    post:
      operationId: createGroup
      summary: Create a directory group
      description: Create a new group entry in the directory.
      tags:
      - Groups
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Group'
      responses:
        '201':
          description: Group created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Group'
        '409':
          description: Group already exists
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /api/groups/{groupId}:
    get:
      operationId: getGroup
      summary: Get a directory group
      description: Retrieve a specific group entry by its identifier.
      tags:
      - Groups
      parameters:
      - name: groupId
        in: path
        required: true
        description: The group identifier (maps to LDAP cn)
        schema:
          type: string
      - $ref: '#/components/parameters/Fields'
      responses:
        '200':
          description: The group entry
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Group'
        '404':
          description: Group not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
    put:
      operationId: updateGroup
      summary: Replace a directory group
      description: Replace an entire group entry.
      tags:
      - Groups
      parameters:
      - name: groupId
        in: path
        required: true
        description: The group identifier
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Group'
      responses:
        '200':
          description: Group updated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Group'
    patch:
      operationId: patchGroup
      summary: Patch a directory group
      description: Partially update a group entry. Commonly used to add or remove group members.
      tags:
      - Groups
      parameters:
      - name: groupId
        in: path
        required: true
        description: The group identifier
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PatchOperations'
      responses:
        '200':
          description: Group patched
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Group'
    delete:
      operationId: deleteGroup
      summary: Delete a directory group
      description: Delete a group entry from the directory.
      tags:
      - Groups
      parameters:
      - name: groupId
        in: path
        required: true
        description: The group identifier
        schema:
          type: string
      responses:
        '200':
          description: Group deleted
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Group'
components:
  schemas:
    Group:
      type: object
      description: A directory group entry
      properties:
        _id:
          type: string
          description: Group identifier (mapped from LDAP cn)
        _rev:
          type: string
          description: Entry revision
          readOnly: true
        cn:
          type: string
          description: Group common name
        description:
          type: string
          description: Group description
        members:
          type: array
          description: Group member identifiers
          items:
            type: string
    PatchOperations:
      type: array
      description: JSON Patch operations
      items:
        type: object
        required:
        - operation
        - field
        properties:
          operation:
            type: string
            enum:
            - add
            - remove
            - replace
          field:
            type: string
          value: {}
    GroupQueryResult:
      type: object
      properties:
        result:
          type: array
          items:
            $ref: '#/components/schemas/Group'
        resultCount:
          type: integer
        pagedResultsCookie:
          type: string
        totalPagedResults:
          type: integer
    ErrorResponse:
      type: object
      description: Standard CREST error response
      properties:
        code:
          type: integer
        reason:
          type: string
        message:
          type: string
  parameters:
    QueryFilter:
      name: _queryFilter
      in: query
      description: CREST query filter expression, translated to an LDAP filter (e.g., uid eq "jdoe" becomes (uid=jdoe))
      schema:
        type: string
    PagedResultsCookie:
      name: _pagedResultsCookie
      in: query
      description: Cookie from a previous page for server-side paging
      schema:
        type: string
    PageSize:
      name: _pageSize
      in: query
      description: Number of results per page
      schema:
        type: integer
        minimum: 1
    Fields:
      name: _fields
      in: query
      description: Comma-separated list of fields to return
      schema:
        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