Identity Cloud

Schema

The Schema API lets you perform operations on managed object schemas. You can create, update, and delete custom relationship properties for managed objects using version 2 of the API. The following table lists the available endpoints for the /schema/ context path:

URI HTTP Operation Description

/openidm/schema/managed/realm-name_assignment

GET

Returns the schema for the managed/realm-name_assignment object.

/openidm/schema/managed/realm-name_organization

GET

Returns the schema for the managed/realm-name_organization object.

/openidm/schema/managed/realm-name_role

GET

Returns the schema for the managed/realm-name_role object.

/openidm/schema/managed/realm-name_user

GET

Returns the schema for the managed/realm-name_user object.

/openidm/schema/managed/realm-name_user/properties/custom_Example

GET

Returns the custom_Example relationship property on the managed/realm-name_user object schema.

API V2 only

/openidm/schema/managed/realm-name_user/properties/custom_Example

PUT

Creates the custom_Example relationship property on the managed/realm-name_user object schema.

API V2 only

/openidm/schema/managed/realm-name_user/properties/custom_Example

PUT

Updates the custom_Example relationship property on the managed/realm-name_user object schema.

API V2 only

/openidm/schema/managed/realm-name_user/properties/custom_Example

DELETE

Deletes the custom_Example relationship property on the managed/realm-name_user object schema.

API V2 only

The following example creates a custom many-to-many relationship property, custom_Children, with a reverse property, custom_Parents:

curl \
--header "Authorization: Bearer <token>" \
--header "Accept-API-Version: resource=2.0" \
--request PUT \
--data '{
  "description": "A user as a child of another user.",
  "title": "Custom children",
  "viewable": true,
  "type": "array",
  "required": false,
  "items": {
    "type": "relationship",
    "title": "Custom Parent",
    "reverseRelationship": true,
    "reversePropertyName": "custom_Parents",
    "notifySelf": false,
    "validate": true,
    "properties": {
      "_ref": {
        "description": "References a relationship from a managed object",
        "type": "string"
      },
      "_refProperties": {
        "description": "Supports metadata within the relationship",
        "type": "object",
        "title": "Custom Provisioning Children Parents _refProperties",
        "properties": {
          "_id": {
            "description": "_refProperties object ID",
            "type": "string"
          }
        }
      }
    },
    "resourceCollection": [
      {
        "path": "managed/alpha_user",
        "label": "User",
        "query": {
          "queryFilter": "true",
          "fields": [
            "userName"
          ]
        },
        "notify": false,
        "reverseProperty": {
          "type": "array",
          "validate": true,
          "resourceCollection": {
            "notify": false,
            "query": {
              "queryFilter": "true",
              "fields": [
                "userName"
              ]
            }
          }
        }
      }
    ]
  }
}
' \
"https://<tenant-env-fqdn>/openidm/schema/managed/realm-name_user/properties/custom_Children"
Copyright © 2010-2024 ForgeRock, all rights reserved.