Retrieve project user role
GET/projects/{project_id}/users/{user_id}/roles/{role_id}
Retrieves a project role assigned to a user.
Returns
Retrieve project user role
curl https://api.openai.com/v1/projects/proj_abc123/users/user_abc123/roles/role_01J1F8PROJ \
-H "Authorization: Bearer $OPENAI_ADMIN_KEY" \
-H "Content-Type: application/json"
{
"id": "role_01J1F8PROJ",
"name": "API Project Key Manager",
"permissions": [
"api.organization.projects.api_keys.read",
"api.organization.projects.api_keys.write"
],
"resource_type": "api.project",
"predefined_role": false,
"description": "Allows managing API keys for the project",
"created_at": 1711471533,
"updated_at": 1711472599,
"created_by": "user_abc123",
"created_by_user_obj": null,
"metadata": {},
"assignment_sources": null
}
Returns Examples
{
"id": "role_01J1F8PROJ",
"name": "API Project Key Manager",
"permissions": [
"api.organization.projects.api_keys.read",
"api.organization.projects.api_keys.write"
],
"resource_type": "api.project",
"predefined_role": false,
"description": "Allows managing API keys for the project",
"created_at": 1711471533,
"updated_at": 1711472599,
"created_by": "user_abc123",
"created_by_user_obj": null,
"metadata": {},
"assignment_sources": null
}