List Project Roles
GEThttps://api.confident-ai.com/v1/projects/{projectId}/roles
Lists the roles available to a project. This includes both global, system-defined roles (where projectId is null) and custom roles defined for the project.
curl -X GET "https://api.confident-ai.com/v1/projects/{projectId}/roles" \
-H "CONFIDENT_API_KEY: <ORGANIZATION-API-KEY>"{
"success": true,
"data": {
"roles": [
{
"id": "project-role-uuid-1",
"name": "Owner",
"description": "Owner of the project with full access to all resources.",
"projectId": null,
"policies": []
},
{
"id": "project-role-uuid-3",
"name": "Analyst",
"description": "Read-only project access",
"projectId": "PROJECT-ID",
"policies": [
{
"id": "policy-uuid-1",
"name": "View traces"
}
]
}
]
}
}Headers
CONFIDENT_API_KEYstringRequiredThe organization API key for your Confident AI organization.
Path parameters
projectIdstringRequiredThe unique identifier of the project.
Response
successbooleanIndicates if the request was successful
dataobjectShow 1 propertyHide 1 property
roleslist of objectsList of roles available to the project, including global system roles
Show 5 propertiesHide 5 properties
idstringUnique identifier for the role
namestringName of the role
descriptionstringOptional description of the role
projectIdstringThe owning project id, or
nullfor global, system-defined roles that are available to every project.policieslist of objectsThe policies attached to this role
Show 2 propertiesHide 2 properties
idstringUnique identifier
namestringName