Get tasks that serve as evidence for a policy, grouped by control
curl --request GET \
--url https://api.trycomp.ai/v1/policies/{id}/evidence-tasks \
--header 'X-API-Key: <api-key>'const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.trycomp.ai/v1/policies/{id}/evidence-tasks', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.trycomp.ai/v1/policies/{id}/evidence-tasks"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text){
"data": [
{
"control": {
"id": "ctl_abc123def456",
"name": "Access Control Policy Review"
},
"tasks": [
{
"id": "tsk_abc123def456",
"title": "Review access logs",
"status": "todo",
"frequency": "quarterly",
"department": "it",
"automationStatus": "MANUAL",
"assigneeId": "mem_abc123def456"
}
]
}
],
"count": 1,
"authType": "api-key"
}{
"message": "Policy not found"
}Policies
Get tasks that serve as evidence for a | Comp AI API
Get tasks that serve as evidence for a policy, grouped by control in Comp AI. Create, version, publish, export, map, and improve compliance policies.
GET
/
v1
/
policies
/
{id}
/
evidence-tasks
Get tasks that serve as evidence for a policy, grouped by control
curl --request GET \
--url https://api.trycomp.ai/v1/policies/{id}/evidence-tasks \
--header 'X-API-Key: <api-key>'const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.trycomp.ai/v1/policies/{id}/evidence-tasks', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.trycomp.ai/v1/policies/{id}/evidence-tasks"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text){
"data": [
{
"control": {
"id": "ctl_abc123def456",
"name": "Access Control Policy Review"
},
"tasks": [
{
"id": "tsk_abc123def456",
"title": "Review access logs",
"status": "todo",
"frequency": "quarterly",
"department": "it",
"automationStatus": "MANUAL",
"assigneeId": "mem_abc123def456"
}
]
}
],
"count": 1,
"authType": "api-key"
}{
"message": "Policy not found"
}Authorizations
API key for authentication
Headers
Organization ID (required for session auth, optional for API key auth)
Path Parameters
Policy ID
Example:
"pol_abc123def456"
Response
Evidence tasks retrieved successfully
One entry per control mapped to the policy — the tasks are grouped by control, not returned as a flat list. A task mapped to two controls appears in both groups.
Show child attributes
Show child attributes
Number of DISTINCT tasks across all groups — deduplicated, so it can be smaller than the sum of the group lengths.
Example:
2
How the request was authenticated
Available options:
api-key, session Authenticated user information (only present for session auth)
Show child attributes
Show child attributes
Was this page helpful?

