Link policies to control
curl --request POST \
--url https://api.trycomp.ai/v1/controls/{id}/policies/link \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"policyIds": [
"<string>"
]
}
'const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({policyIds: ['<string>']})
};
fetch('https://api.trycomp.ai/v1/controls/{id}/policies/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}/policies/link"
payload = { "policyIds": ["<string>"] }
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)Controls
Link policies to control | Comp AI API
Link policies to a control so auditors and reviewers can trace control implementation back to approved policy evidence.
POST
/
v1
/
controls
/
{id}
/
policies
/
link
Link policies to control
curl --request POST \
--url https://api.trycomp.ai/v1/controls/{id}/policies/link \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"policyIds": [
"<string>"
]
}
'const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({policyIds: ['<string>']})
};
fetch('https://api.trycomp.ai/v1/controls/{id}/policies/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}/policies/link"
payload = { "policyIds": ["<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
Policy IDs to link to the control
Response
201 - undefined
Was this page helpful?

