---
title: Scripts
description: You can interact with the script service over REST, as shown in the following table:
component: pingoneaic-api
page_id: pingoneaic-api:idm-rest-api:endpoints/rest-scripts
canonical_url: https://developer.pingidentity.com/pingoneaic-api/idm-rest-api/endpoints/rest-scripts.html
---

# 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 <access-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
```
