curl --request GET \
--url https://api.portkey.ai/v1/guardrails/{guardrailId} \
--header 'x-portkey-api-key: <api-key>'{
"id": "<string>",
"name": "<string>",
"slug": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"last_updated_at": "2023-11-07T05:31:56Z",
"owner_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"organisation_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"workspace_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "active",
"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>",
"is_enabled": true
}
],
"actions": {
"deny": false,
"async": false,
"on_success": {
"feedback": {
"value": 5,
"weight": 1,
"metadata": ""
}
},
"on_fail": {
"feedback": {
"value": -5,
"weight": 1,
"metadata": ""
}
}
}
}Retrieves details of a specific guardrail by ID or slug
curl --request GET \
--url https://api.portkey.ai/v1/guardrails/{guardrailId} \
--header 'x-portkey-api-key: <api-key>'{
"id": "<string>",
"name": "<string>",
"slug": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"last_updated_at": "2023-11-07T05:31:56Z",
"owner_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"organisation_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"workspace_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "active",
"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>",
"is_enabled": true
}
],
"actions": {
"deny": false,
"async": false,
"on_success": {
"feedback": {
"value": 5,
"weight": 1,
"metadata": ""
}
},
"on_fail": {
"feedback": {
"value": -5,
"weight": 1,
"metadata": ""
}
}
}
}Guardrail UUID or slug (with guard_ prefix)
Guardrail details retrieved successfully
Unique identifier of the guardrail
Name of the guardrail
URL-friendly slug
Creation timestamp
Last update timestamp
UUID of the user who created the guardrail
Organisation UUID
Workspace UUID (null for organisation-level guardrails)
Current status of the guardrail
active, archived UUID of the user who last updated the guardrail
Array of configured guardrail checks
Show child attributes
Identifier of the guardrail check type
default.jwt, default.modelWhitelist, default.isAllLowerCase, default.regexMatch, default.sentenceCount, default.wordCount, default.characterCount, default.jsonSchema, default.jsonKeys, default.contains, default.validUrls, default.containsCode, default.webhook, default.endsWith, default.alluppercase, default.requiredMetadataKeys, portkey.moderateContent, portkey.language, portkey.pii, portkey.gibberish, sydelabs.sydeguard, aporia.validateProject, pillar.scanPrompt, pillar.scanResponse, patronus.phi, patronus.pii, patronus.isConcise, patronus.isHelpful, patronus.isPolite, patronus.noApologies, patronus.noGenderBias, patronus.noRacialBias, patronus.retrievalAnswerRelevance, patronus.toxicity, patronus.custom, mistral.moderateContent, pangea.textGuard, pangea.pii, bedrock.guard, promptfoo.guard, promptfoo.pii, promptfoo.harm, acuvity.scan, lasso.classify, azure.contentSafety, azure.pii, panw-prisma-airs.intercept Configuration parameters specific to the check type
Show child attributes
JWKS URI of the JWT token
Header key to check for the JWT token
Cache max age in seconds
Clock tolerance in seconds
Max token age
Algorithms to check for the JWT token
Custom name for this specific check instance
Whether this check is enabled
Actions to take when guardrail checks fail or pass
Show child attributes
Whether to deny the request when guardrail check fails
Whether the guardrail check should be performed asynchronously
Actions to take when guardrail check passes
Show child attributes
Feedback configuration for successful checks
Actions to take when guardrail check fails
Show child attributes
Feedback configuration for failed checks
Was this page helpful?