Sample - OpenAI API
GET/projects/{project_id}/groups/{group_id}/roles/{role_id}

Retrieve a project group role

Retrieves a project role assigned to a group. Supply project_id, group_id, and role_id to identify the project, group, and role assignment you want to inspect.

  • RetriesRetries up to 2×, 500ms backoff, 30s timeout.

3 parameters
project_idstringrequired
The ID of the project to inspect.
group_idstringrequired
The ID of the group to inspect.
role_idstringrequired
The ID of the project role to retrieve for the group.

2 status codes
200Returns the role assignment details, including its identifier, name, permissions, resource type, predefined status, metadata, and assignment sources.
idstringrequired
Identifier for the role.
namestringrequired
Name of the role.
permissionsarray<string>required
Permissions associated with the role.
resource_typestringrequired
Resource type the role applies to.
predefined_rolebooleanrequired
Whether the role is predefined by OpenAI.
descriptionstringrequired
Description of the role.
created_atintegerrequired
When the role was created.
updated_atintegerrequired
When the role was last updated.
created_bystringrequired
Identifier of the actor who created the role.
created_by_user_objobjectrequired
User details for the actor that created the role, when available.
metadataobjectrequired
Arbitrary metadata stored on the role.
assignment_sourcesarray<object>required
Principals from which the role assignment is inherited, when available.
429Returned when the request was rejected because a rate limit was exceeded.
errorobjectrequired

Error handling

A 429 is returned when the request exceeds the applicable rate limit. project_id, group_id, and role_id must identify the project role assignment you want to retrieve.