List groups
admin.organization.groups.list(**kwargs) -> NextCursorPage<Group { id, created_at, group_type, 2 more } >
GET/organization/groups
Lists all groups in the organization.
Parameters
after: String
A cursor for use in pagination. after is a group ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with group_abc, your subsequent call can include after=group_abc in order to fetch the next page of the list.
List groups
require "openai"
openai = OpenAI::Client.new(admin_api_key: "My Admin API Key")
page = openai.admin.organization.groups.list
puts(page){
"object": "list",
"data": [
{
"object": "group",
"id": "group_01J1F8ABCDXYZ",
"name": "Support Team",
"created_at": 1711471533,
"is_scim_managed": false
}
],
"has_more": false,
"next": null
}
Returns Examples
{
"object": "list",
"data": [
{
"object": "group",
"id": "group_01J1F8ABCDXYZ",
"name": "Support Team",
"created_at": 1711471533,
"is_scim_managed": false
}
],
"has_more": false,
"next": null
}