List policies
curl --request GET \
--url https://my.orq.ai/v2/policies \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://my.orq.ai/v2/policies', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://my.orq.ai/v2/policies"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"data": [
{
"_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"created_by_id": "<string>",
"display_name": "<string>",
"enabled": true,
"project_id": "<string>",
"slug": "<string>",
"timeout": 1001,
"updated_at": "2023-11-07T05:31:56Z",
"updated_by_id": "<string>",
"description": "<string>",
"evaluators": [
{
"execute_on": "input",
"id": "<string>",
"is_guardrail": true,
"options": {},
"sample_rate": 0.5,
"timeout": 300500
}
],
"limits": {
"budget": {
"amount": 500000.005,
"currency": "usd",
"period": "hour"
},
"requests": {
"amount": 500000000,
"period": "hour"
},
"tokens": {
"amount": 500000000,
"period": "hour"
}
},
"models_config": {
"mode": "fallback",
"models": [
{
"model": "<string>",
"display_name": "<string>",
"integration_id": "<string>",
"weight": 0.5
}
]
},
"retry_config": {
"count": 3,
"on_codes": [
123
]
}
}
],
"has_more": true,
"object": "<string>"
}Policies
List policies
Returns a paginated list of policies for the current project.
GET
/
v2
/
policies
List policies
curl --request GET \
--url https://my.orq.ai/v2/policies \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://my.orq.ai/v2/policies', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://my.orq.ai/v2/policies"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"data": [
{
"_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"created_by_id": "<string>",
"display_name": "<string>",
"enabled": true,
"project_id": "<string>",
"slug": "<string>",
"timeout": 1001,
"updated_at": "2023-11-07T05:31:56Z",
"updated_by_id": "<string>",
"description": "<string>",
"evaluators": [
{
"execute_on": "input",
"id": "<string>",
"is_guardrail": true,
"options": {},
"sample_rate": 0.5,
"timeout": 300500
}
],
"limits": {
"budget": {
"amount": 500000.005,
"currency": "usd",
"period": "hour"
},
"requests": {
"amount": 500000000,
"period": "hour"
},
"tokens": {
"amount": 500000000,
"period": "hour"
}
},
"models_config": {
"mode": "fallback",
"models": [
{
"model": "<string>",
"display_name": "<string>",
"integration_id": "<string>",
"weight": 0.5
}
]
},
"retry_config": {
"count": 3,
"on_codes": [
123
]
}
}
],
"has_more": true,
"object": "<string>"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Query Parameters
Required range:
1 <= x <= 200A cursor for use in pagination.
A cursor for use in pagination.
Optional filter by project ID.
Was this page helpful?