Launch Week 02 wrapped — explore all five launches

List Roles

GEThttps://api.confident-ai.com/v2/projects/{projectId}/roles

Lists every role a member of this project can be given: the custom roles the project owns, plus the global, system-defined roles (projectId is null) that every project can assign. Each role is returned with the project 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. Project roles govern access inside this project only; access to organization-wide settings comes from the member's organization role.

GET/v2/projects/{projectId}/roles
curl -X GET "https://api.confident-ai.com/v2/projects/{projectId}/roles" \
  -H "CONFIDENT_API_KEY: <ORGANIZATION-API-KEY>"
200
{
  "success": true,
  "data": {
    "roles": [
      {
        "id": "<ROLE-ID>",
        "name": "Release Manager",
        "description": "Can publish prompts and run evaluations, but not delete data.",
        "policies": [
          {
            "id": "<POLICY-ID>",
            "name": "Billing read-only"
          }
        ],
        "projectId": "<PROJECT-ID>"
      }
    ]
  },
  "deprecated": false
}

Headers

  • CONFIDENT_API_KEYstringRequired

    The organization API key for your Confident AI organization.

Path parameters

  • projectIdstringRequired

    The id of the project, which must belong to your organization.

Response

List Roles succeeded.

  • successboolean

    Indicates if the request was successful.

  • dataobject

    Every project role a member can be given in this project, owned and global together.

    Show 1 propertyHide 1 property
    • roleslist of objects

      The roles this project can assign: the roles it owns, plus the global, system-defined roles available to every project.

      Show 5 propertiesHide 5 properties
      • idstring

        The id of the role, generated by Confident AI.

      • namestring

        The name of the role.

      • descriptionstring | null

        What the role is for, or null when it has no description.

      • policieslist of objects

        The project policies attached to the role, whose permissions together are everything a member holding it can do in the project. A global role's permissions are system-defined rather than drawn from policies, so its list is empty.

        Show 2 propertiesHide 2 properties
        • idstring

          The id of the policy, generated by Confident AI.

        • namestring

          The name of the policy.

      • projectIdstring | null

  • deprecatedboolean

    Indicates if this endpoint is deprecated.

Built byConfident AI