To enable the Compliance API, see the setup guide.
Set up the Compliance API列出项目协作者
GET/v1/compliance/apps/projects/{project_id}/collaborators
列出项目上的用户、群组和组织范围的授权。
每个条目代表项目上的一个活跃角色分配。主体以基于 type 的可辨识联合类型返回——可以是单个用户、RBAC 群组、整个组织,或某个组织级角色的所有持有者。
Path parameters
Query parameters
Headers
Returns
列出项目协作者
cURL
curl https://api.anthropic.com/v1/compliance/apps/projects/$PROJECT_ID/collaborators \
-H "Authorization: Bearer $ANTHROPIC_COMPLIANCE_API_KEY"Response 200
{
"data": [
{
"granted_at": "2019-12-27T18:11:19.117Z",
"role": "admin",
"type": "user",
"user_id": "user_id"
}
],
"has_more": true,
"next_page": "next_page"
}Returns Examples
Response 200
{
"data": [
{
"granted_at": "2019-12-27T18:11:19.117Z",
"role": "admin",
"type": "user",
"user_id": "user_id"
}
],
"has_more": true,
"next_page": "next_page"
}