---
title: "GET /v2/scripts/{script_id}/"
method: GET
path: "/v2/scripts/{script_id}/"
tags: ["blueprints_Custom Actions API"]
---

# GET /v2/scripts/{script_id}/

`GET /v2/scripts/{script_id}/`

⚠️ Linux only. Scripts retrieved by this endpoint are associated with custom actions that run exclusively on Linux-managed devices.

Retrieves the content of a specific script by its unique script ID.
Returns a platformScript object containing the raw script content and the interpreter used to execute it (e.g., bash, python3). Script IDs are generated when a custom action is created and are referenced within the options[*].scripts.linux.script_id field of a CustomActionRead response. Use this endpoint to inspect or archive the exact script code associated with a custom action option before modifying or deleting it.

**About Retrieve Script**

Scripts in Esper's custom actions system are stored as discrete objects in external storage, each identified by a UUID script_id. They are not directly editable in place — to update a script, you must supply a replacement options array in PUT /v2/custom-actions/{custom_action_id}/, which generates a new script_id. This endpoint provides read-only access to the raw script content and its interpreter metadata.

**Key Fields**

script_id — UUID of the script to retrieve (path parameter, required); obtained from a custom action's options[*].scripts.linux.script_id

script — The raw script content (string)

interpreter — The runtime used to execute the script (e.g., bash, sh, python, python3; defaults to bash)

**Common Use Cases**

Retrieve and review script content before activating a custom action or including it in a Blueprint

Archive the script code of a custom action option before replacing it with an updated version

Audit which interpreter is configured for a script to ensure compatibility with the target Linux environment

**Best Practices**

Obtain script_id values from the options array returned by GET /v2/custom-actions/{custom_action_id}/ — they are not independently discoverable

Scripts are immutable once created; to change script content, update the parent custom action via PUT /v2/custom-actions/{custom_action_id}/ with a new options array

Store the retrieved script content in version control if the script logic is critical to your deployment workflow

**Workflow**

Call GET /v2/custom-actions/{custom_action_id}/ to retrieve the custom action and locate script_id values in options[*].scripts.linux.script_id

Call GET /v2/scripts/{script_id}/ for each script you want to inspect

Review the script content and interpreter field

To update the script, build a new options array and submit it via PUT /v2/custom-actions/{custom_action_id}/

## Path parameters

- `script_id` string, uuid, required

## Response `200`

Success

- object
  - `content` BlueprintsPlatformScript
    - `script` string, required — The script content
    - `interpreter` string, required — Interpreter used to run the script
  - `message` string
  - `code` 200

## Other responses

- `403` — Permission denied
- `404` — Script not found
- `500` — Internal Server Error

---

[API](https://skmtc.net/esper/apis/esper-api-reference.md) · [All operations](https://skmtc.net/esper/apis/esper-api-reference/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/esper/esper-api-reference/revisions/e1f64cbb488e/schema)
