groups
Creates, updates, deletes, gets or lists a groups resource.
Overview
| Name | groups |
| Type | Resource |
| Id | openai_admin.projects.groups |
Fields
The following fields are returned by SELECT queries:
- list
Project groups listed successfully.
| Name | Datatype | Description |
|---|---|---|
group_id | string | Identifier of the group that has access to the project. |
project_id | string | Identifier of the project. |
group_name | string | Display name of the group. |
created_at | integer (unixtime) | Unix timestamp (in seconds) when the group was granted project access. |
group_type | string | The type of the group. |
object | string | Always project.group. (project.group) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
list | select | project_id | limit, after, order | |
add | insert | project_id, group_id, role | ||
remove | delete | project_id, group_id |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
group_id | string | The ID of the group to remove from the project. |
project_id | string | The ID of the project to update. |
after | string | Cursor for pagination. Provide the ID of the last group from the previous response to fetch the next page. |
limit | integer | A limit on the number of project groups to return. Defaults to 20. |
order | string | Sort order for the returned groups. |
SELECT examples
- list
Project groups listed successfully.
SELECT
group_id,
project_id,
group_name,
created_at,
group_type,
object
FROM openai_admin.projects.groups
WHERE project_id = '{{ project_id }}' -- required
AND limit = '{{ limit }}'
AND after = '{{ after }}'
AND order = '{{ order }}'
;
INSERT examples
- add
- Manifest
No description available.
INSERT INTO openai_admin.projects.groups (
group_id,
role,
project_id
)
SELECT
'{{ group_id }}' /* required */,
'{{ role }}' /* required */,
'{{ project_id }}'
RETURNING
group_id,
project_id,
group_name,
created_at,
group_type,
object
;
# Description fields are for documentation purposes
- name: groups
props:
- name: project_id
value: "{{ project_id }}"
description: Required parameter for the groups resource.
- name: group_id
value: "{{ group_id }}"
description: |
Identifier of the group to add to the project.
- name: role
value: "{{ role }}"
description: |
Identifier of the project role to grant to the group.
DELETE examples
- remove
No description available.
DELETE FROM openai_admin.projects.groups
WHERE project_id = '{{ project_id }}' --required
AND group_id = '{{ group_id }}' --required
;