users
Creates, updates, deletes, gets or lists a users resource.
Overview
| Name | users |
| Type | Resource |
| Id | openai_admin.groups.users |
Fields
The following fields are returned by SELECT queries:
- list
Group users listed successfully.
| Name | Datatype | Description |
|---|---|---|
id | string | The identifier, which can be referenced in API endpoints |
name | string | The name of the user. |
email | string | The email address of the user. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
list | select | group_id | limit, after, order | |
add | insert | group_id, user_id | ||
remove | delete | group_id, user_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 update. |
user_id | string | The ID of the user to remove from the group. |
after | string | A cursor for use in pagination. Provide the ID of the last user from the previous list response to retrieve the next page. |
limit | integer | A limit on the number of users to be returned. Limit can range between 0 and 1000, and the default is 100. |
order | string | Specifies the sort order of users in the list. |
SELECT examples
- list
Group users listed successfully.
SELECT
id,
name,
email
FROM openai_admin.groups.users
WHERE group_id = '{{ group_id }}' -- required
AND limit = '{{ limit }}'
AND after = '{{ after }}'
AND order = '{{ order }}'
;
INSERT examples
- add
- Manifest
No description available.
INSERT INTO openai_admin.groups.users (
user_id,
group_id
)
SELECT
'{{ user_id }}' /* required */,
'{{ group_id }}'
RETURNING
group_id,
user_id,
object
;
# Description fields are for documentation purposes
- name: users
props:
- name: group_id
value: "{{ group_id }}"
description: Required parameter for the users resource.
- name: user_id
value: "{{ user_id }}"
description: |
Identifier of the user to add to the group.
DELETE examples
- remove
No description available.
DELETE FROM openai_admin.groups.users
WHERE group_id = '{{ group_id }}' --required
AND user_id = '{{ user_id }}' --required
;