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 | ||
---|---|---|---|---|
|
GET |
Returns the schema for the |
||
|
GET |
Returns the schema for the |
||
|
GET |
Returns the schema for the |
||
|
GET |
Returns the schema for the |
||
|
GET |
Returns the
|
||
|
PUT |
Creates the
|
||
|
PUT |
Updates the
|
||
|
DELETE |
Deletes the
|
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"