Assign Projects to Governance Policy
(v1)POST
Assigns one or more projects to a governance policy, moving any that are already on a different policy. This is a partial-success operation: assigned ids are returned in assignedProjectIds, unknown ids in notFoundProjectIds, and count is the number now assigned.
curl -X POST "https://api.confident-ai.com/v1/organization/governance-policies/{policyId}/assign" \
-H "CONFIDENT_API_KEY: <ORGANIZATION-API-KEY>" \
-H "Content-Type: application/json" \
-d '{
"projectIds": [
"project-uuid-1",
"project-uuid-2"
]
}'{
"success": true,
"data": {
"governancePolicy": {
"id": "gov-policy-uuid-1",
"name": "Production Gate"
},
"assignedProjectIds": [
"project-uuid-1",
"project-uuid-2"
],
"notFoundProjectIds": [],
"count": 2
}
}Headers
CONFIDENT_API_KEYstringRequiredThe organization API key for your Confident AI organization.
Path parameters
policyIdstringRequiredThe unique identifier of the governance policy.
Request body
projectIdslist of stringsRequiredThe ids of the projects to assign or unassign.
Response
successbooleanIndicates if the request was successful
dataobjectShow 4 propertiesHide 4 properties
governancePolicyobjectThe governance policy that was modified.
Show 2 propertiesHide 2 properties
idstringThe unique identifier of the governance policy.
namestringThe name of the governance policy.
assignedProjectIdslist of stringsIds of the projects now assigned to this policy, including any that were already enrolled.
notFoundProjectIdslist of stringsIds that do not exist in this organization. They are skipped (not assigned) and reported here rather than failing the request.
countintegerThe number of projects now assigned (the length of assignedProjectIds).