---
title: "Get OpalScript by ID"
method: GET
path: "/opal-scripts/{opal_script_id}"
tags: ["opal-scripts"]
---

# Get OpalScript by ID

`GET /opal-scripts/{opal_script_id}`

## Request

- Base URL: `https://api.opal.dev/v1`
- URL: `https://api.opal.dev/v1/opal-scripts/{opal_script_id}`
- Auth: HTTP bearer

Returns an `OpalScript` object.

## Path parameters

- `opal_script_id` string, uuid, required

## Response `200`

The OpalScript associated with the passed-in ID.

- OpalScript: # OpalScript Object ### Description The `OpalScript` object represents an OpalScript: a Starlark script that automates part of Opal's access lifecycle.
  - `opal_script_id` string, uuid, required: The ID of the OpalScript.
  - `name` string, required: The name of the OpalScript.
  - `script_type` 'REQUEST_REVIEW' | 'REQUEST_DELEGATION_CONDITION' | 'CONTEXT_PROVIDER' | 'REQUEST_CONFIGURATION_CONDITION', required: The kind of automation an OpalScript performs.
  - `script` string, required: The source of the OpalScript's latest version.
  - `version` integer, required: The version number of the OpalScript's latest version.
  - `updated_at` string, date-time: The date the OpalScript was last updated.

## Changes

- **2026-10-21** `28c861b91406`: 1 warning
  - added the new `REQUEST_CONFIGURATION_CONDITION` enum value to the `script_type` response property for the response status `200`
- **2026-10-08** `5d8d995bc79d`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/opal/apis/opal-api/changes/opal-scripts/:opal_script_id/get.md)

---

[API](https://skmtc.dev/opal/apis/opal-api.md) - [All operations](https://skmtc.dev/opal/apis/opal-api/llms.txt) - [OpenAPI document](https://skmtc.dev/opal/apis/opal-api/revisions/e7877ea96eab?raw)
