Skip to main content

users

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

Overview​

Nameusers
TypeResource
Idfivetran.groups.users

Fields​

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringThe unique identifier for the user within the Fivetran system. (example: user_id)
family_namestringThe last name of the user. (example: Doe)
given_namestringThe first name of the user. (example: John)
activebooleanThe field indicates if the user is an active Fivetran account user.
created_atstring (date-time)The timestamp that the user created their Fivetran account (example: 2024-01-01T00:00:00Z)
emailstringThe email address that the user has associated with their user profile. Optional for service accounts (user_type: SERVICE_ACCOUNT). (example: user@email.value)
has_api_keybooleanIndicates whether the user has an assigned API key, including expired keys. Accepted values: true or false.
invitedbooleanThe field indicates whether the user has been invited to your account.
logged_in_atstring (date-time)The last time that the user has logged into their Fivetran account. (example: 2024-01-01T00:00:00Z)
phonestringThe phone number of the user. (example: +1234567890)
picturestringThe user's avatar as a URL link (for example, 'http:<!-- -->//mycompany.com/avatars/john_white.png') or base64 data URI (for example, 'data:image/png;base64,aHR0cDovL215Y29tcGFueS5jb20vYXZhdGFycy9qb2huX3doaXRlLnBuZw==') (example: AFg65aoa7af4r3feaAa6bi7se ... base64 encoded image ... blDFSs87gQ==)
rolestringThe role that you would like to assign to the user (example: Account Administrator)
user_typestringThe type of user. Possible values: REGULAR_USER: A human user who can log in to the Fivetran dashboard and interact with the API, and SERVICE_ACCOUNT: A non-human identity for machine-to-machine API access that cannot log in to the dashboard. (REGULAR_USER, SERVICE_ACCOUNT) (example: SERVICE_ACCOUNT)
verifiedbooleanThe field indicates whether the user has verified their email address in the account creation process.

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
listselectgroup_idcursor, limit, activeReturns a list of information about all users within a group in your Fivetran account.
createinsertgroup_idAdds an existing user to a group in your Fivetran account.
deletedeletegroup_id, user_idRemoves an existing user from a group in your Fivetran account.

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.

NameDatatypeDescription
group_idstringThe unique identifier for the group within the Fivetran system.
user_idstringThe unique identifier for the user within the account.
activebooleanIndicates whether to return only enabled users (true) or not (false). By default, both enabled (allowed to log in) and suspended users are returned.
cursorstringPaging cursor, [read more about pagination](https:​//fivetran.com/docs/rest-api/pagination)
limitinteger (int32)Number of records to fetch per page. Accepts a number in the range 1..1000; the default value is 100.

SELECT examples​

Returns a list of information about all users within a group in your Fivetran account.

SELECT
id,
family_name,
given_name,
active,
created_at,
email,
has_api_key,
invited,
logged_in_at,
phone,
picture,
role,
user_type,
verified
FROM fivetran.groups.users
WHERE group_id = '{{ group_id }}' -- required
AND "limit" = '{{ limit }}'
AND active = '{{ active }}'
;

INSERT examples​

Adds an existing user to a group in your Fivetran account.

INSERT INTO fivetran.groups.users (
email,
role,
group_id
)
SELECT
'{{ email }}',
'{{ role }}',
'{{ group_id }}'
RETURNING
code,
message
;

DELETE examples​

Removes an existing user from a group in your Fivetran account.

DELETE FROM fivetran.groups.users
WHERE group_id = '{{ group_id }}' --required
AND user_id = '{{ user_id }}' --required
;