GET
/
guardrails
/
get-policy
curl --request GET \
  --url https://api.enkryptai.com/guardrails/get-policy \
  --header 'X-Enkrypt-Policy: <x-enkrypt-policy>' \
  --header 'apikey: <api-key>'
{
  "name": "<string>",
  "description": "<string>",
  "detectors": {
    "topic_detector": {
      "enabled": true,
      "topic": [
        "<string>"
      ]
    },
    "nsfw": {
      "enabled": true
    },
    "toxicity": {
      "enabled": true
    },
    "pii": {
      "enabled": true,
      "entities": [
        "pii"
      ]
    },
    "injection_attack": {
      "enabled": true
    },
    "keyword_detector": {
      "enabled": true,
      "banned_keywords": [
        "<string>"
      ]
    },
    "system_prompt": {
      "enabled": true
    },
    "copyright_ip": {
      "enabled": true
    },
    "policy_violation": {
      "enabled": true,
      "policy_text": "<string>",
      "need_explanation": true
    },
    "bias": {
      "enabled": true
    }
  },
  "created_at": "2024-10-07T11:23:03.695943+00:00",
  "updated_at": "2024-10-07T11:23:03.695943+00:00",
  "policy_id": 1234567890,
  "project_name": "default"
}

Authorizations

apikey
string
header
required

Headers

X-Enkrypt-Policy
string
required

The policy saved name

Example:

"Test Policy"

X-Enkrypt-Refresh-Cache
boolean

Refresh the cache if data is stale

Example:

false

Response

200 - application/json
Successful Response
name
string
required
description
string
required
detectors
object
created_at
string
Example:

"2024-10-07T11:23:03.695943+00:00"

updated_at
string
Example:

"2024-10-07T11:23:03.695943+00:00"

policy_id
integer
Example:

1234567890

project_name
string
Example:

"default"