Access Data Objects By Using Scripts
Identity Cloud’s uniform programming model means that all objects are queried and manipulated in the same way, using the Resource API. The URL or URI that is used to identify the target object for an operation depends on the object type. For more information about scripts and the objects available to scripts, see Scripting.
You can use the Resource API to obtain managed, system, configuration, and repository objects, as follows:
val = openidm.read("managed/realm-name_organization/mysampleorg") val = openidm.read("system/mysystem/account") val = openidm.read("config/custom/mylookuptable") val = openidm.read("repo/custom/mylookuptable")
For information about constructing an object ID, see URI Scheme.
You can update entire objects with the
update() function, as follows:
openidm.update("managed/realm-name_organization/mysampleorg", rev, object) openidm.update("system/mysystem/account", rev, object)
You can apply a partial update to a managed or system object by using the
openidm.patch("managed/realm-name_organization/mysampleorg", rev, value)
query() functions work the same way.