API Reference
Virtual Keys
Prompts
- POSTCreate Prompt
- GETList Prompts
- GETRetrieve Prompt
- PUTUpdate Prompt
- DELDelete Prompt
- PUTPublish Prompt
- GETList Prompt Versions
- GETRetrieve Prompt Version
- PUTUpdate Prompt Version
- Prompt Partials
- Prompt Labels
- Prompt Collections
API Keys
Analytics [BETA]
- Summary
- Groups Paginated Data
- Graphs - Time Series Data
User Invites
Workspaces
Workspace Members
Audit Logs
Guardrails
OpenAPI
Retrieve Guardrail
Retrieves details of a specific guardrail by ID or slug
GET
/
guardrails
/
{guardrailId}
Get a specific guardrail
Copy
Ask AI
curl --request GET \
--url https://api.portkey.ai/v1/guardrails/{guardrailId} \
--header 'x-portkey-api-key: <api-key>'
Copy
Ask AI
{
"id": "<string>",
"name": "<string>",
"slug": "<string>",
"organisation_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"workspace_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "active",
"created_at": "2023-11-07T05:31:56Z",
"last_updated_at": "2023-11-07T05:31:56Z",
"owner_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"updated_by": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"checks": [
{
"id": "default.jwt",
"parameters": {
"jwksUri": "<string>",
"headerKey": "<string>",
"cacheMaxAge": 86400,
"clockTolerance": 5,
"maxTokenAge": "1d",
"algorithms": [
"RS256"
]
},
"name": "<string>",
"enabled": true
}
],
"actions": {
"onFail": "block",
"onPass": "continue",
"message": "<string>",
"logLevel": "info",
"metadata": {}
}
}
Authorizations
Path Parameters
Guardrail UUID or slug (with guard_ prefix)
Response
200
application/json
Guardrail details retrieved successfully
The response is of type object
.
Was this page helpful?
Get a specific guardrail
Copy
Ask AI
curl --request GET \
--url https://api.portkey.ai/v1/guardrails/{guardrailId} \
--header 'x-portkey-api-key: <api-key>'
Copy
Ask AI
{
"id": "<string>",
"name": "<string>",
"slug": "<string>",
"organisation_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"workspace_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "active",
"created_at": "2023-11-07T05:31:56Z",
"last_updated_at": "2023-11-07T05:31:56Z",
"owner_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"updated_by": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"checks": [
{
"id": "default.jwt",
"parameters": {
"jwksUri": "<string>",
"headerKey": "<string>",
"cacheMaxAge": 86400,
"clockTolerance": 5,
"maxTokenAge": "1d",
"algorithms": [
"RS256"
]
},
"name": "<string>",
"enabled": true
}
],
"actions": {
"onFail": "block",
"onPass": "continue",
"message": "<string>",
"logLevel": "info",
"metadata": {}
}
}
Assistant
Responses are generated using AI and may contain mistakes.