user_invitations
Creates, updates, deletes, gets or lists a user_invitations resource.
Overview​
| Name | user_invitations |
| Type | Resource |
| Id | nvidia.orgs.user_invitations |
Fields​
The following fields are returned by SELECT queries:
- list
| Name | Datatype | Description |
|---|---|---|
id | string | Unique invitation ID |
name | string | user name |
created_date | string | Date on which the invitation was created. (ISO-8601 format) (wire: createdDate) |
email | string | Email address of the user. |
is_processed | boolean | Flag indicating if the invitation has already been accepted by the user. (wire: isProcessed) |
org | string | Org to which a user was invited. |
roles | array | List of roles that the user have. |
team | string | Team to which a user was invited. |
type | string | Type of invitation. The invitation is either to an organization or to a team within organization. (ORGANIZATION, TEAM) |
Methods​
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
list | select | page_number, page_size, order_by, q | List invitations in an org. (Org User Admin privileges required) | |
create_nca | insert | Invites and creates a User in org | ||
delete | delete | id | Delete a specific invitation in an org. (Org User Admin privileges required) | |
resend_email | exec | id | Resend email of a specific invitation in an org (Org User Admin privileges required). |
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 |
|---|---|---|
id | string | |
order_by | string | (wire: orderBy) |
page_number | integer (int32) | The page number of result |
page_size | integer (int32) | The page size of result |
q | object | User Search Parameters |
SELECT examples​
- list
List invitations in an org. (Org User Admin privileges required)
SELECT
id,
name,
created_date,
email,
is_processed,
org,
roles,
team,
type
FROM nvidia.orgs.user_invitations
WHERE page_number = '{{ page_number }}'
AND page_size = '{{ page_size }}'
AND order_by = '{{ order_by }}'
AND q = '{{ q }}'
;
INSERT examples​
- create_nca
- Manifest
Invites and creates a User in org
INSERT INTO nvidia.orgs.user_invitations (
email,
invitation_expiration_in,
invite_as,
message
)
SELECT
'{{ email }}',
{{ invitation_expiration_in }},
'{{ invite_as }}',
'{{ message }}'
RETURNING
activation_token,
nca_role,
request_status,
user,
user_roles
;
# Description fields are for documentation purposes
- name: user_invitations
props:
- name: email
value: "{{ email }}"
description: |
Is the user email
- name: invitation_expiration_in
value: {{ invitation_expiration_in }}
description: |
Is the numbers of days the invitation will expire
- name: invite_as
value: "{{ invite_as }}"
description: |
Nca allow users to be invited as Admin and as Member
valid_values: ['ADMIN', 'MEMBER']
- name: message
value: "{{ message }}"
description: |
Is a message to the new user
DELETE examples​
- delete
Delete a specific invitation in an org. (Org User Admin privileges required)
DELETE FROM nvidia.orgs.user_invitations
WHERE id = '{{ id }}' --required
;
Lifecycle Methods​
EXEC variables use wire (API) names.
- resend_email
Resend email of a specific invitation in an org (Org User Admin privileges required).
EXEC nvidia.orgs.user_invitations.resend_email
@id='{{ id }}' --required
;