List Cloud Roles (V2)
Lists organization- or project-scoped Cloud ACL roles.
The base URL for this API is in the following format:
https://api.cloud.zilliz.com
The endpoints on the control plane currently supports up to 20 requests per second per user per endpoint.
export BASE_URL="https://api.cloud.zilliz.com"
The authentication token should be an API key with appropriate privileges.
The role scope to filter by.
The project ID used to filter roles.
The page number to return. The first page is 1.
The number of items to return per page.
export TOKEN="YOUR_API_KEY"
curl --request GET \
--url "${BASE_URL}/v2/roles?roleType=org" \
--header "Authorization: Bearer ${TOKEN}" \
--header "Request-Timeout: 5" \
--header "Content-Type: application/json"
Returns a successful result or an error message.
A successful response.
The response code.
The total number of matching items.
The current page number.
The requested page size.
The roles returned on this page.
A Cloud ACL role.
The role ID.
The role display name.
The role scope.
Whether the role is predefined or custom.
The project ID for a project-scoped role. For an organization-scoped role, this field returns an empty string.
The role description.
The policy statements attached to the role.
A policy statement attached to a custom Cloud role.
The second-level resource the statement targets. Organization-level types: org_member, group, api_key, org_role, project_role, project, billing, authentication, org_control_ops, recovery. Project-level types: project_member, security, backup, observability, serving_cluster, on_demand_cluster, volume, storage_integration, model_provider_integration, kms_integration, datadog_integration, serving_cluster_data, on_demand_compute_data, volume_data.
Atomic privileges on that resource, e.g. ["view", "create"].
Which instances the statement covers: * for all, or explicit ids (validated against the role's project). Required on serving_cluster, on_demand_cluster, volume, serving_cluster_data, volume_data, storage_integration, model_provider_integration, kms_integration and datadog_integration, unless the statement's only privilege is create. For on_demand_compute_data, predefined roles return ["*"]; on write this field is rejected and should be omitted. Everywhere else, omit it — it is rejected on write and never returned.
Reserved for future use. Omit this field.
A failure response.
The response code.
The error message.
{
"code": 0,
"data": {
"count": 2,
"currentPage": 1,
"pageSize": 10,
"roles": [
{
"roleId": "r-onpocppupmikjqmildbpbeouxsrwvy",
"roleName": "Project Admin",
"roleType": "project",
"roleKind": "pre-defined",
"projectId": "",
"description": ""
},
{
"roleId": "r-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"roleName": "Data Reader",
"roleType": "project",
"roleKind": "custom",
"projectId": "proj-xxxxxxxx",
"description": ""
}
]
}
}