Link tasks to control
curl --request POST \
--url https://api.trycomp.ai/v1/controls/{id}/tasks/link \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"taskIds": [
"<string>"
]
}
'const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({taskIds: ['<string>']})
};
fetch('https://api.trycomp.ai/v1/controls/{id}/tasks/link', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.trycomp.ai/v1/controls/{id}/tasks/link"
payload = { "taskIds": ["<string>"] }
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)Controls
Link tasks to control | Comp AI API
Link compliance tasks to a control so implementation work, evidence collection, and review status stay connected.
POST
/
v1
/
controls
/
{id}
/
tasks
/
link
Link tasks to control
curl --request POST \
--url https://api.trycomp.ai/v1/controls/{id}/tasks/link \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"taskIds": [
"<string>"
]
}
'const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({taskIds: ['<string>']})
};
fetch('https://api.trycomp.ai/v1/controls/{id}/tasks/link', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.trycomp.ai/v1/controls/{id}/tasks/link"
payload = { "taskIds": ["<string>"] }
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)Authorizations
API key for authentication
Path Parameters
Query Parameters
Scope to one framework instance. Omit to use every instance the control belongs to.
Body
application/json
Task IDs to link to the control
Response
201 - undefined
Was this page helpful?

