API Stability |
Long-Term
|
The addUserV2() GraphQL mutation may be used to add or invite a new user. Using this with an invitation token will activate the account. By activating the account, the client accepts LogScale's Terms and Conditions.
For more information on user authorization, see the Manage users & permissions documentation page. For information on access tokens of various types, see the Ingest Tokens documentation page.
Syntax
Below is the syntax for the addUserV2()
mutation field. Input would be given within the parentheses. The
resulting changes will occur within LogScale, but can be returned
and captured by specifying the elements desired within the
userOrPendingUser
type.
addUserV2(
input: AddUserInputV2!
): userOrPendingUser!
The AddUserInputV2
above
would be replaced by parameters with their values, in a
comma-separated list, all within a pair of curly brackets. See the
examples below for a better understanding.
mutation {
addUserV2 (
input: {
username: "steve"
sendInvite: true
email: "steve@company.com"
}
) {__typename ... on User {id, username}}
}
{
"data": {
"addUserV2": {
"__typename": "User",
"id": "mQ2oDkHSLhTG6l6ppsmxJYHJ",
"username": "steve"
}
}
}
This is a simple example of how to add a new user to LogScale
— and to have the system send that user an invitation by
email. To capture and confirm some of the results, the
User
return type was added with a couple of
parameters. You can see this in the results.
Given Datatypes
For AddUserInputV2
,
there are several parameters that may be given. Below is a list of
them along with their data type and a description of each:
Table: AddUserInputV2
Parameter | Type | Required | Default | Stability | Description |
---|---|---|---|---|---|
Some arguments may be required, as indicated in the Required column. For some fields, this column indicates that a result will always be returned for this column. | |||||
Table last updated: Sep 17, 2024 | |||||
company | string | Long-Term | The name of the company associated with the user. | ||
countryCode | string | Long-Term | The two-letter ISO 3166-1 Alpha-2 code for the country of residence (e.g., us). | ||
email | type | Long-Term | The user's email address for communications from LogScale. Required when using sendInvite. | ||
firstName | string | Long-Term | The user's actual first name (e.g., Rob). Don't use with fullName. | ||
fullName | string | Long-Term | The user's full name (e.g., Rob U. Blindman). Don't use if using other name parameters. | ||
isOrgOwner | boolean | Long-Term | Whether the user account is the organization owner. | ||
isRoot | boolean | Long-Term | Whether the user account is granted root access. | ||
lastName | string | Long-Term | The user's actual last name or family name (e.g., Blindman). Don't use with fullName. | ||
picture | type | Long-Term | The file name of an image file for the user. | ||
sendInvite | boolean | Long-Term | Whether LogScale should send an email providing the user with information to login. | ||
stateCode | string | Long-Term | The two-letter, ISO 3166-2 country sub-division code for the state of residence (e.g., ny). | ||
username | string | yes | Long-Term | User name for the login account. | |
verificationToken | string | Long-Term | The verification token for the user account. |
As mentioned previously, the addition of a user account and
setting of attributes related to that account are made in
LogScale, but some values may be captured in return by the
application by specifying the desired fields based on the
userOrPendingUser
schema.
Returned Datatypes
As mentioned previously, the addition of a user account and
setting of attributes related to that account are made in
LogScale, but some values may be captured in return by the
application by specifying the desired fields based on the
userOrPendingUser
schema. Depending on what is given, this includes two possible
specialized datatypes: User() or
PendingUser
The fields available depend on whether the user has been created,
or is instead a pending user. This is determined based on whether
the input parameters include not sending an invitation (i.e.,
sendInvite
is set to
false
). So what's
pending is the user acceptance of the invitation.
The schema for the User() possibility includes all of the user account attributes. They are listed in the table below, along with their data type and a description of each. Additionally, the Resultant column is used to indicate whether the respective field is always created and filled with a value.
Table: User
Parameter | Type | Required | Default | Stability | Description |
---|---|---|---|---|---|
Some arguments may be required, as indicated in the Required column. For some fields, this column indicates that a result will always be returned for this column. | |||||
Table last updated: Mar 25, 2025 | |||||
allowedAssetActionsBySource | multiple | yes | Preview | Get allowed asset actions for the user on a specific asset and explain how these actions have been granted. The multiple datatype consists of (assetId: string!, assetType: AssetPermissionsAssetType!, searchDomainId: string): [AssetActionsBySource]!. | |
allowedOrganizationActions | [OrganizationAction ] | yes | Long-Term | Returns the actions the user is allowed to perform in the organization. See OrganizationAction . | |
allowedSystemActions | [SystemAction ] | yes | Long-Term | Returns the actions the user is allowed to perform in the system. See SystemAction Table. | |
company | string | Long-Term | The name of the company for the user account. | ||
countryCode | string | Long-Term | The two-letter ISO 3166-1 Alpha-2 code for the country of residence (e.g., us). | ||
createdAt | datetime | yes | Long-Term | The data and time the account was created. | |
displayName | string | yes | Long-Term | The value of the fullName if used, otherwise the username. | |
email | string | Long-Term | The user account's email address for communications from LogScale. | ||
firstName | string | Long-Term | The user's actual first name (e.g., Bob). Don't use with fullName. | ||
fullName | string | Long-Term | The user's full name (e.g., Bob Smith). Don't use if using other name parameters. | ||
groups | [Group ] | yes | Long-Term | The groups of which the user is a member. See Group . | |
groupSearchDomainRoles | [GroupSearchDomainRole ] | yes | Long-Term | The group search domain roles. See GroupSearchDomainRole . | |
groupsV2 | multiple | Preview | The groups of which the user is a member. This is a preview and subject to change. The multiple datatype consists of (search: string, typeFilter: [PermissionType], limit: integer, skip: integer, searchInRoles: boolean): GroupResultSetType. See | ||
id | string | yes | Long-Term | The identifier or token for the user. | |
isOrgRoot | boolean | yes | Long-Term | Whether the organization is granted root access. | |
isRoot | boolean | yes | Long-Term | Whether the user account is granted root access. | |
lastName | string | Long-Term | The user's actual last name or family name (e.g., Smith). Don't use with fullName. | ||
permissions | multiple | yes | Long-Term | Permissions of the user. The multiple datatype consists of (viewName: string): [UserPermissions]. See UserPermissions . | |
permissionsPage | multiple | yes | Deprecated | A page of user permissions. The multiple datatype consists of (search: string, pageNumber: integer, pageSize: integer): UserPermissionsPage. See UserPermissionsPage . This field is no longer used. It will be removed at the earliest in version 1.208. | |
phoneNumber | string | Long-Term | The telephone number for LogScale to use for telephone text messages. | ||
picture | string | Long-Term | File name of an image file for the account. | ||
searchAssetPermissions | multiple | Preview | Search for asset permissions for the user. This is a preview and subject to change. The multiple datatype consists of (searchFilter: string, skip: integer, limit: integer, orderBy: OrderBy, sortBy: SortBy, assetTypes: [AssetPermissionsAssetType], searchDomainIds: [string], permissions: [AssetAction], searchDomainIds: [string], permissions: [AssetAction!]): AssetPermissionSearchResultSet. See | ||
searchDomainRoles | multiple | Long-Term | The search domain roles assigned to the user. The multiple datatype consists of (searchDomainId: string): [SearchDomainRole]. See SearchDomainRole . | ||
searchDomainRolesByName | multiple | yes | Deprecated | The search domain roles for the user, by name. The multiple datatype consists of (searchDomainName: string): SearchDomainRole. See This is deprecated because when multiple roles per view is enabled, this field will return only the first of possibly multiple roles matching the name for the view. Therefore, use instead searchDomainRoles or searchDomainRolesBySearchDomainName. | |
searchDomainRolesBySearchDomainName | multiple | Long-Term | The search domain roles assigned to the user by search domain name. The multiple datatype consists of (searchDomainName: string): [SearchDomainRole]. See SearchDomainRole . | ||
stateCode | string | Long-Term | The two-letter, ISO 3166-2 country sub-division code for the state of residence (e.g., ny). | ||
rolesV2 | multiple | Preview | The roles assigned to the user through a group. This is a preview and subject to change. The multiple datatype consists of (search: string, typeFilter: [PermissionType], limit: integer, skip: integer, searchInGroups: boolean): RolesResultSetType. See | ||
username | string | yes | Long-Term | The user name for the account. | |
userOrGroupSearchDomainRoles | multiple | yes | Long-Term | The user or group search domain roles. The multiple datatype consists of (search: string, skip: integer, limit: integer, totalSearchDomains: integer): UserOrGroupSearchDomainRoleResultSet. See UserOrGroupSearchDomainRoleResultSet . |
The schema for the
PendingUser
possibility
includes several fields based on the minimal data collected thus
far. They are listed in the table below, along with their data
type and a description of each, as well as whether the respective
field will always result in it being created and filled with a
value.
Table: PendingUser
Parameter | Type | Required | Default | Stability | Description |
---|---|---|---|---|---|
Some arguments may be required, as indicated in the Required column. For some fields, this column indicates that a result will always be returned for this column. | |||||
Table last updated: Mar 26, 2025 | |||||
createdAt | long | yes | Long-Term | The time the pending user was created. | |
id | string | yes | Long-Term | The identifier or token for the pending user. | |
idp | boolean | yes | Long-Term | Whether IdP is enabled for the organization. | |
invitedByEmail | string | yes | Long-Term | The email address of the user that invited the pending user. | |
invitedByName | string | yes | Long-Term | The name of the user that invited the pending user. | |
newUserEmail | string | yes | Long-Term | The email of the pending user. | |
orgName | string | yes | Long-Term | The name of the organization for the pending user. | |
pendingUserState | PendingUserState | yes | Long-Term | The current organization state for the user. See PendingUserState . |