Launch Week 02 wrapped — explore all five launches

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.

GET/v2/projects/{projectId}/policies
curl -X GET "https://api.confident-ai.com/v2/projects/{projectId}/policies" \
  -H "CONFIDENT_API_KEY: <ORGANIZATION-API-KEY>"
200
{
  "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_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 Policies succeeded.

  • successboolean

    Indicates if the request was successful.

  • dataobject

    The policies available to attach to the roles of the same organization or project.

    Show 1 propertyHide 1 property
    • policieslist of objects

      The custom policies the organization or project owns.

      Show 4 propertiesHide 4 properties
      • idstring

        The id of the policy, generated by Confident AI.

      • namestring

        The name of the policy.

      • descriptionstring | null

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

      • permissionslist of objects

        The permissions this policy grants.

        Show 2 propertiesHide 2 properties
        • idstring

          The id of the permission, generated by Confident AI.

        • namestring

          The permission, written as resource:action — the resource it applies to, then what it allows on it.

  • deprecatedboolean

    Indicates if this endpoint is deprecated.

Built byConfident AI