Policies
Get a policy
Returns one policy, with owner and lastEditedBy.
Required permission: policies:read
GET
/
api
/
v1
/
policies
/
{id}
Get a policy
curl --request GET \
--url https://api.igrisecurity.com/api/v1/policies/{id} \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.igrisecurity.com/api/v1/policies/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.igrisecurity.com/api/v1/policies/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"data": {
"id": "7b1d4c2e-0000-4000-8000-000000000002",
"name": "Cap GPT-4o spend",
"description": null,
"connectionSlugs": null,
"rules": [
{
"target": {
"kind": "llm_model",
"model": "gpt-4o*"
},
"action": "allow",
"limit": {
"dollars": 50,
"per": "day"
},
"contentGuard": {
"detectors": [
"pii_email",
"pii_phone"
],
"action": "redact"
}
}
],
"enabled": true,
"owner": {
"name": "Alice",
"email": "alice@company.com"
},
"lastEditedBy": {
"name": "Bob",
"email": "bob@company.com"
},
"createdAt": "2026-01-01T00:00:00Z",
"updatedAt": "2026-01-02T00:00:00Z"
}
}{
"error": "Unauthorized"
}{
"error": "Forbidden",
"required": "policies:write"
}{
"error": "Not found"
}⌘I
Get a policy
curl --request GET \
--url https://api.igrisecurity.com/api/v1/policies/{id} \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.igrisecurity.com/api/v1/policies/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.igrisecurity.com/api/v1/policies/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"data": {
"id": "7b1d4c2e-0000-4000-8000-000000000002",
"name": "Cap GPT-4o spend",
"description": null,
"connectionSlugs": null,
"rules": [
{
"target": {
"kind": "llm_model",
"model": "gpt-4o*"
},
"action": "allow",
"limit": {
"dollars": 50,
"per": "day"
},
"contentGuard": {
"detectors": [
"pii_email",
"pii_phone"
],
"action": "redact"
}
}
],
"enabled": true,
"owner": {
"name": "Alice",
"email": "alice@company.com"
},
"lastEditedBy": {
"name": "Bob",
"email": "bob@company.com"
},
"createdAt": "2026-01-01T00:00:00Z",
"updatedAt": "2026-01-02T00:00:00Z"
}
}{
"error": "Unauthorized"
}{
"error": "Forbidden",
"required": "policies:write"
}{
"error": "Not found"
}