NAME
OpenAPI::Client::OpenAI::Path::organization-groups-group_id-roles - Documentation for the /organization/groups/{group_id}/roles path.
OPERATIONS
GET /organization/groups/{group_id}/roles
list-group-role-assignments
$client->list_group_role_assignments({
body => { ... },
});
Lists the organization roles assigned to a group within the organization.
Path/query parameters
group_id(in path, required, string) - The ID of the group whose organization role assignments you want to list.limit(in query, optional, integer) - A limit on the number of organization role assignments to return.after(in query, optional, string) - Cursor for pagination. Provide the value from the previous response'snextfield to continue listing organization roles.order(in query, optional, string) - Sort order for the returned organization roles.Allowed values: asc, desc
Responses
200 - Group organization role assignments listed successfully.
Content-Type: application/json
Example:
{
"data" : [
{
"assignment_sources" : null,
"created_at" : 1711471533,
"created_by" : "user_abc123",
"created_by_user_obj" : {
"email" : "ada@example.com",
"id" : "user_abc123",
"name" : "Ada Lovelace"
},
"description" : "Allows managing organization groups",
"id" : "role_01J1F8ROLE01",
"metadata" : {},
"name" : "API Group Manager",
"permissions" : [
"api.groups.read",
"api.groups.write"
],
"predefined_role" : false,
"resource_type" : "api.organization",
"updated_at" : 1711472599
}
],
"has_more" : false,
"next" : null,
"object" : "list"
}
POST /organization/groups/{group_id}/roles
assign-group-role
$client->assign_group_role({
body => { ... },
});
Assigns an organization role to a group within the organization.
Path/query parameters
group_id(in path, required, string) - The ID of the group that should receive the organization role.
Responses
200 - Organization role assigned to the group successfully.
Content-Type: application/json
Example:
{
"group" : {
"created_at" : 1711471533,
"id" : "group_01J1F8ABCDXYZ",
"name" : "Support Team",
"object" : "group",
"scim_managed" : false
},
"object" : "group.role",
"role" : {
"description" : "Allows managing organization groups",
"id" : "role_01J1F8ROLE01",
"name" : "API Group Manager",
"object" : "role",
"permissions" : [
"api.groups.read",
"api.groups.write"
],
"predefined_role" : false,
"resource_type" : "api.organization"
}
}
SCHEMAS
AssignedRoleDetails
Properties:
assignment_sources(anyOf, required) - Principals from which the role assignment is inherited, when available.created_at(anyOf, required) - When the role was created.created_by(anyOf, required) - Identifier of the actor who created the role.created_by_user_obj(anyOf, required) - User details for the actor that created the role, when available.description(anyOf, required) - Description of the role.id(string, required) - Identifier for the role.metadata(anyOf, required) - Arbitrary metadata stored on the role.name(string, required) - Name of the role.permissions(array of string, required) - Permissions associated with the role.predefined_role(boolean, required) - Whether the role is predefined by OpenAI.resource_type(string, required) - Resource type the role applies to.updated_at(anyOf, required) - When the role was last updated.
Group
Properties:
created_at(integer, required) - Unix timestamp (in seconds) when the group was created.id(string, required) - Identifier for the group.name(string, required) - Display name of the group.object(string, required) - Alwaysgroup.Allowed values: group
scim_managed(boolean, required) - Whether the group is managed through SCIM.
GroupRoleAssignment
Properties:
group(Group, required)See "Group" below for shape.
object(string, required) - Alwaysgroup.role.Allowed values: group.role
role(Role, required)See "Role" below for shape.
PublicAssignOrganizationGroupRoleBody
Properties:
role_id(string, required) - Identifier of the role to assign.
Role
Properties:
description(anyOf, required) - Optional description of the role.id(string, required) - Identifier for the role.name(string, required) - Unique name for the role.object(string, required) - Alwaysrole.Allowed values: role
permissions(array of string, required) - Permissions granted by the role.predefined_role(boolean, required) - Whether the role is predefined and managed by OpenAI.resource_type(string, required) - Resource type the role is bound to (for exampleapi.organizationorapi.project).
RoleListResource
Properties:
data(array of AssignedRoleDetails, required) - Role assignments returned in the current page.has_more(boolean, required) - Whether additional assignments are available when paginating.next(anyOf, required) - Cursor to fetch the next page of results, ornullwhen there are no more assignments.object(string, required) - Alwayslist.Allowed values: list
SEE ALSO
COPYRIGHT AND LICENSE
Copyright (C) 2023-2026 by Nelson Ferraz
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.14.0 or, at your option, any later version of Perl 5 you may have available.