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

# Get OpalScript by name

`GET /opal-scripts/name/{opal_script_name}`

## Request

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

Returns the `OpalScript` whose name exactly matches the given name. OpalScript names are not unique; when more than one script matches, the request fails and the script must be referenced by ID instead.

## Path parameters

- `opal_script_name` string, required

## Response `200`

The OpalScript associated with the passed-in name.

- 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/name/:opal_script_name/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)
