users
Creates, updates, deletes, gets or lists a users
resource.
Overview
Name | users |
Type | Resource |
Id | openai.users.users |
Fields
Name | Datatype | Description |
---|---|---|
id | string | The identifier, which can be referenced in API endpoints |
name | string | The name of the user |
added_at | integer | The Unix timestamp (in seconds) of when the user was added. |
email | string | The email address of the user |
object | string | The object type, which is always organization.user |
role | string | owner or reader |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
list_users | SELECT |
| |
retrieve_user | SELECT | user_id | |
delete_user | DELETE | user_id | |
modify_user | UPDATE | user_id, data__role |
SELECT
examples
SELECT
id,
name,
added_at,
email,
object,
role
FROM openai.users.users
;
UPDATE
example
Updates a users
resource.
/*+ update */
UPDATE openai.users.users
SET
role = '{{ role }}'
WHERE
user_id = '{{ user_id }}'
AND data__role = '{{ data__role }}';
DELETE
example
Deletes the specified users
resource.
/*+ delete */
DELETE FROM openai.users.users
WHERE user_id = '{{ user_id }}';