PingOne Advanced Identity Cloud

Scripts

You can interact with the script service over REST, as shown in the following table:

URI HTTP Operation Description

/openidm/script?_action=compile

POST

Compiles a script, to validate that it can be executed. Note that this action compiles a script, but does not execute it. A successful compilation returns true. An unsuccessful compilation returns the reason for the failure.

The following example compiles, but does not execute, the script provided in the JSON payload:

curl \
--header "Authorization: Bearer <token>" \
--header "Accept-API-Version: resource=1.0" \
--header "Content-Type: application/json" \
--request POST \
--data '{
  "type": "text/javascript",
  "source": "source.mail ? source.mail.toLowerCase() : null"
}' \
"https://<tenant-env-fqdn>/openidm/script?_action=compile"
True