List Roles
GEThttps://api.confident-ai.com/v2/organization/roles
Lists every organization role a member of your organization can be given: the custom roles your organization owns, plus the global, system-defined roles (organizationId is null) that every organization can assign. Each role is returned with the policies attached to it, which is where its permissions come from — a global role's permissions are system-defined instead, so it comes back with an empty policies array.
curl -X GET "https://api.confident-ai.com/v2/organization/roles" \
-H "CONFIDENT_API_KEY: <ORGANIZATION-API-KEY>"{
"success": true,
"data": {
"roles": [
{
"id": "<ROLE-ID>",
"name": "Billing Auditor",
"description": "Read-only access to invoices and model costs.",
"policies": [
{
"id": "<POLICY-ID>",
"name": "Billing read-only"
}
],
"organizationId": "<ORGANIZATION-ID>"
}
]
},
"deprecated": false
}Headers
CONFIDENT_API_KEYstringRequiredThe organization API key for your Confident AI organization.
Response
List Roles succeeded.
successbooleanIndicates if the request was successful.
dataobjectEvery organization role a member can be given, owned and global together.
Show 1 propertyHide 1 property
roleslist of objectsThe roles your organization can assign: the roles it owns, plus the global, system-defined roles available to every organization.
Show 5 propertiesHide 5 properties
idstringThe id of the role, generated by Confident AI.
namestringThe name of the role.
descriptionstring | nullWhat the role is for, or null when it has no description.
policieslist of objectsThe organization policies attached to the role, whose permissions together are everything a member holding it can do. A global role's permissions are system-defined rather than drawn from policies, so its list is empty.
Show 2 propertiesHide 2 properties
idstringThe id of the policy, generated by Confident AI.
namestringThe name of the policy.
organizationIdstring | null
deprecatedbooleanIndicates if this endpoint is deprecated.