Skip to main content

users

Creates, updates, deletes, gets or lists a users resource.

Overview

Nameusers
TypeResource
Idopenai.users.users

Fields

NameDatatypeDescription
idstringThe identifier, which can be referenced in API endpoints
namestringThe name of the user
added_atintegerThe Unix timestamp (in seconds) of when the user was added.
emailstringThe email address of the user
objectstringThe object type, which is always organization.user
rolestringowner or reader

Methods

NameAccessible byRequired ParamsDescription
list_usersSELECT
retrieve_userSELECTuser_id
delete_userDELETEuser_id
modify_userUPDATEuser_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 }}';