Access

Get a guardrail or custom policy

Changed on

Returns one guardrail or custom policy by id: its enabled state, its networks, models or endpoints, and its Cedar (the source, or what a guardrail generates).

Requires the policy.read permission. See Permissions for the roles and API key permissions that include it.

get/v1/authz/policies/{policyId}

Request

  • Base URL
    https://api.openrelay.inc
  • URL
    https://api.openrelay.inc/v1/authz/policies/{policyId}
  • Auth
    HTTP bearer

Path parameters

policyIdstring required

Response

The policy

cedarstring

The Cedar a guardrail generates.

cedarTextstring

A custom policy's Cedar source.

createdAtstring
createdBystring
descriptionstring
enabledboolean required
endpointsstring[]
guardrail'key_networks' | 'everyone_networks' | 'model_allowlist'

key_networks limits API keys to ipRanges; everyone_networks limits sessions and keys (owners only); model_allowlist limits inference to models and endpoints.

idstring required
ipRangesstring[]
kind'guardrail' | 'custom' required
modelsstring[]
namestring required
stalestring

Set when an enabled policy names something this version of OpenRelay does not know, or can no longer be read: what it does now and what to change.

updatedAtstring
updatedBystring

Changes

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      endpoint added