List Policies
GEThttps://api.confident-ai.com/v2/projects/{projectId}/policies
Lists the custom access policies this project owns. Each one is a named set of project permissions, returned with every permission it grants as a resource:action pair such as promptBranch:merge. These are the policies you attach to this project's roles; the global, system-defined roles do not draw their permissions from policies, so nothing here applies to them. A project's policies are separate from your organization's, and only these can be attached to a project role.
curl -X GET "https://api.confident-ai.com/v2/projects/{projectId}/policies" \
-H "CONFIDENT_API_KEY: <ORGANIZATION-API-KEY>"{
"success": true,
"data": {
"policies": [
{
"id": "<POLICY-ID>",
"name": "Billing read-only",
"description": "Lets a role read invoices and model costs, but change neither.",
"permissions": [
{
"id": "<PERMISSION-ID>",
"name": "billing:read"
}
]
}
]
},
"deprecated": false
}Headers
CONFIDENT_API_KEYstringRequiredThe organization API key for your Confident AI organization.
Path parameters
projectIdstringRequiredThe id of the project, which must belong to your organization.
Response
List Policies succeeded.
successbooleanIndicates if the request was successful.
dataobjectThe policies available to attach to the roles of the same organization or project.
Show 1 propertyHide 1 property
policieslist of objectsThe custom policies the organization or project owns.
Show 4 propertiesHide 4 properties
idstringThe id of the policy, generated by Confident AI.
namestringThe name of the policy.
descriptionstring | nullWhat the policy is for, or null when it has no description.
permissionslist of objectsThe permissions this policy grants.
Show 2 propertiesHide 2 properties
idstringThe id of the permission, generated by Confident AI.
namestringThe permission, written as
resource:action— the resource it applies to, then what it allows on it.
deprecatedbooleanIndicates if this endpoint is deprecated.