---
title: Read a script
description: To read an individual script in a realm, perform an HTTP GET using the /json{/realm}/scripts endpoint, specifying the UUID in the URL.
component: pingam
version: 8.1
page_id: pingam:am-scripting:rest-api-scripts-read
canonical_url: https://docs.pingidentity.com/pingam/8.1/am-scripting/rest-api-scripts-read.html
keywords: ["Scripts"]
page_aliases: ["scripting-guide:rest-api-scripts-read.adoc"]
---

# Read a script

To read an individual script in a realm, perform an HTTP GET using the `/json{/realm}/scripts` endpoint, specifying the UUID in the URL.

|   |                                                                                                                  |
| - | ---------------------------------------------------------------------------------------------------------------- |
|   | To read a script in the Top Level Realm, or to read a built-in global script, do not specify a realm in the URL. |

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.

```bash
$ curl \
--header "iPlanetDirectoryPro: AQIC5…​" \
--header "Accept-API-Version: resource=1.1" \
https://am.example.com:8443/am/json/realms/root/realms/myrealm/scripts/9de3eb62-f131-4fac-a294-7bd170fd4acb
{
  "_id": "9de3eb62-f131-4fac-a294-7bd170fd4acb",
  "name": "Scripted Policy Condition",
  "description": "Default global script for Scripted Policy Conditions",
  "script": "LyoqCiAqIFRoaXMg…​",
  "language": "JAVASCRIPT",
  "context": "POLICY_CONDITION",
  "createdBy": "id=dsameuser,ou=user,ou=am-config",
  "creationDate": 1433147666269,
  "lastModifiedBy": "id=dsameuser,ou=user,ou=am-config",
  "lastModifiedDate": 1433147666269,
  "evaluatorVersion": "1.0"
}
```
