Query scripts
To list all the scripts in a realm, as well as any global scripts,
perform an HTTP GET to the /json{/realm}/scripts
endpoint with a _queryFilter
parameter set to true
.
If the realm is not specified in the URL, AM returns scripts in the top level realm, as well as any global scripts. |
The iPlanetDirectoryPro
header is required and should contain the SSO token of an administrative user,
such as amAdmin
, who has access to perform the operation.
$ curl \
--header "iPlanetDirectoryPro: AQIC5…" \
--header "Accept-API-Version: resource=1.1" \
https://am.example.com:8443/am/json/realms/root/realms/myrealm/scripts?_queryFilter=true
{
"result": [
{
"_id": "01e1a3c0-038b-4c16-956a-6c9d89328cff",
"name": "Authentication Tree Decision Node Script",
"description": "Default global script for a scripted decision node",
"script": "LyoKICAtIERhdGE…",
"default": true,
"language": "JAVASCRIPT",
"context": "AUTHENTICATION_TREE_DECISION_NODE",
"createdBy": "id=dsameuser,ou=user,dc=am,dc=example,dc=com",
"creationDate": 1433147666269,
"lastModifiedBy": "id=dsameuser,ou=user,dc=am,dc=example,dc=com",
"lastModifiedDate": 1433147666269,
"evaluatorVersion": "1.0"
},
{
"_id": "5e854779-6ec1-4c39-aeba-0477e0986646",
"name": "Config Provider Node Script",
"description": "Script to provide values for a config provider node",
"script": "LyoKICogQ29weX…",
"default": true,
"language": "JAVASCRIPT",
"context": "CONFIG_PROVIDER_NODE",
"createdBy": "id=dsameuser,ou=user,dc=am,dc=example,dc=com",
"creationDate": 1433147666269,
"lastModifiedBy": "id=dsameuser,ou=user,dc=am,dc=example,dc=com",
"lastModifiedDate": 1433147666269,
"evaluatorVersion": "1.0"
},
…
],
"resultCount": 20,
"pagedResultsCookie": null,
"totalPagedResultsPolicy": "NONE",
"totalPagedResults": -1,
"remainingPagedResults": 23
}
Field | Supported Operators |
---|---|
|
Equals ( |
|
Equals ( |
|
Equals ( |
|
Equals ( |
|
Equals ( |
|
Equals ( |