users
Creates, updates, deletes, gets or lists a users resource.
Overview
| Name | users |
| Type | Resource |
| Id | fivetran.groups.users |
Fields
The following fields are returned by SELECT queries:
- list
| Name | Datatype | Description |
|---|---|---|
id | string | The unique identifier for the user within the Fivetran system. (example: user_id) |
family_name | string | The last name of the user. (example: Doe) |
given_name | string | The first name of the user. (example: John) |
active | boolean | The field indicates if the user is an active Fivetran account user. |
created_at | string (date-time) | The timestamp that the user created their Fivetran account (example: 2024-01-01T00:00:00Z) |
email | string | The 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_key | boolean | Indicates whether the user has an assigned API key, including expired keys. Accepted values: true or false. |
invited | boolean | The field indicates whether the user has been invited to your account. |
logged_in_at | string (date-time) | The last time that the user has logged into their Fivetran account. (example: 2024-01-01T00:00:00Z) |
phone | string | The phone number of the user. (example: +1234567890) |
picture | string | The 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==) |
role | string | The role that you would like to assign to the user (example: Account Administrator) |
user_type | string | The 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) |
verified | boolean | The field indicates whether the user has verified their email address in the account creation process. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
list | select | group_id | cursor, limit, active | Returns a list of information about all users within a group in your Fivetran account. |
create | insert | group_id | Adds an existing user to a group in your Fivetran account. | |
delete | delete | group_id, user_id | Removes 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.
| Name | Datatype | Description |
|---|---|---|
group_id | string | The unique identifier for the group within the Fivetran system. |
user_id | string | The unique identifier for the user within the account. |
active | boolean | Indicates whether to return only enabled users (true) or not (false). By default, both enabled (allowed to log in) and suspended users are returned. |
cursor | string | Paging cursor, [read more about pagination](https://fivetran.com/docs/rest-api/pagination) |
limit | integer (int32) | Number of records to fetch per page. Accepts a number in the range 1..1000; the default value is 100. |
SELECT examples
- list
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
- create
- Manifest
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
;
# Description fields are for documentation purposes
- name: users
props:
- name: group_id
value: "{{ group_id }}"
description: Required parameter for the users resource.
- name: email
value: "{{ email }}"
description: |
The email address that the user has associated with their user profile.
- name: role
value: "{{ role }}"
description: |
The group role that you would like to assign this new user to. Supported group roles: ‘Manage Destination‘, ‘View Destination‘, ‘Edit Destination‘, ‘Create Connection‘, or a custom destination role
DELETE examples
- delete
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
;