IDM 7.5.0

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/assignment

GET

Returns the schema for the managed/assignment object.

/openidm/schema/managed/organization

GET

Returns the schema for the managed/organization object.

/openidm/schema/managed/role

GET

Returns the schema for the managed/role object.

/openidm/schema/managed/user

GET

Returns the schema for the managed/user object.

/openidm/schema/managed/user/properties/custom_Example

GET

Returns the custom_Example relationship property on the managed/user object schema.

API V2 only

/openidm/schema/managed/user/properties/custom_Example

PUT

Creates the custom_Example relationship property on the managed/user object schema.

API V2 only

/openidm/schema/managed/user/properties/custom_Example

PUT

Updates the custom_Example relationship property on the managed/user object schema.

API V2 only

/openidm/schema/managed/user/properties/custom_Example

DELETE

Deletes the custom_Example relationship property on the managed/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 "X-OpenIDM-Username: openidm-admin" \
--header "X-OpenIDM-Password: openidm-admin" \
--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://localhost:8443/openidm/schema/managed/user/properties/custom_Children"