NAME
OpenAPI::Client::OpenAI::Path::projects-project_id-roles - Documentation for the /projects/{project_id}/roles path.
OPERATIONS
GET /projects/{project_id}/roles
list-project-roles
$client->list_project_roles({
body => { ... },
});
Lists the roles configured for a project.
Path/query parameters
project_id(in path, required, string) - The ID of the project to inspect.limit(in query, optional, integer) - A limit on the number of roles to return. Defaults to 1000.Default: 1000
after(in query, optional, string) - Cursor for pagination. Provide the value from the previous response'snextfield to continue listing roles.order(in query, optional, string) - Sort order for the returned roles.Allowed values: asc, desc
Default: asc
Responses
200 - Project roles listed successfully.
Content-Type: application/json
Example:
{
"data" : [
{
"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"
}
],
"has_more" : false,
"next" : null,
"object" : "list"
}
POST /projects/{project_id}/roles
create-project-role
$client->create_project_role({
body => { ... },
});
Creates a custom role for a project.
Path/query parameters
project_id(in path, required, string) - The ID of the project to update.
Responses
200 - Project role created successfully.
Content-Type: application/json
Example:
{
"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
PublicCreateOrganizationRoleBody
Properties:
description(anyOf) - Optional description of the role.permissions(array of string, required) - Permissions to grant to the role.role_name(string, required) - Unique name for the role.
PublicRoleListResource
Properties:
data(array of Role, required) - Roles returned in the current page.has_more(boolean, required) - Whether more roles are available when paginating.next(anyOf, required) - Cursor to fetch the next page of results, ornullwhen there are no additional roles.object(string, required) - Alwayslist.Allowed values: list
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).
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.