Users API Code Samples
Selection of code samples that demonstrate the use of the Users API. Copy and edit these code samples to suit your needs.
When using the code samples, remember to replace:
- {vanity_name} with your tenant name
- {api_key} with your API key
- {security_token} with a valid security token
These code samples may not include all available parameters and request body fields for each endpoint. For the endpoint's full request schema, see "Users" in API Reference.
Users API V2
Note: Limited Availability This feature is in limited availability. If you are interested, please contact your
Add users
Use this sample request to add new users to your tenant.
curl -X POST --url 'https://{vanity_name}.api.visier.io/v2/admin/users' \
-H 'apikey:{api_key}' \
-H 'Cookie:VisierASIDToken={security_token}' \
-d '{
"userIds": [
"5a4dsasdf55",
"6b5etbteg66"
]
}'
The response returns whether or not the request was successful for each user ID.
Update users
Use this sample request to update one or more users.
curl -X PUT --url 'https://{vanity_name}.api.visier.io/v2/admin/users' \
-H 'apikey:{api_key}' \
-H 'Cookie:VisierASIDToken={security_token}' \
-d {
"users": [
{
"userId": "82424d8b-f99c-cd4d-9ac7-568919d9a0e4",
"displayName": "John Doe",
"employeeId": "Employee-1",
"accountEnabled": "true",
"email": "john@jupiter.com"
},
{
"userId": "93535e9c-g00d-de5e-0bd8-679020e0b1f5",
"displayName": "Jane Smith",
"employeeId": "Employee-2",
"accountEnabled": "true",
"email": "jane@jupiter.com"
}
]
}
The response returns whether the updates were successful.
{
"successes": [
{
"users": [
{
"userId": "82424d8b-f99c-cd4d-9ac7-568919d9a0e4",
"displayName": "John Doe",
"employeeId": "Employee-1",
"accountEnabled": "true",
"email": "john@jupiter.com"
},
{
"userId": "93535e9c-g00d-de5e-0bd8-679020e0b1f5",
"displayName": "Jane Smith",
"employeeId": "Employee-2",
"accountEnabled": "true",
"email": "jane@jupiter.com"
}
]
}
]
"failures": []
}
Delete users
Use this sample request to delete users from your tenant.
curl -X DELETE --url 'https://{vanity_name}.api.visier.io/v2/admin/users' \
-H 'apikey:{api_key}' \
-H 'Cookie:VisierASIDToken={security_token}' \
-d '{
"userIds": [
"5a4dsasdf55",
"6b5etbteg66"
]
}'
The response returns whether or not the deletion was successful for each user ID.
User groups API V2
Note: Alpha This API is in alpha. While in alpha, APIs may change in a breaking way without notice; functionality may be removed, and no deprecation notices will be issued. If you are interested in using this API, please contact your
Retrieve a list of user groups
Use this sample request to retrieve all user groups in your tenant.
curl -X GET --url 'https://{vanity_name}.api.visier.io/v2alpha/admin/user-groups' \
-H 'apikey:{api_key}' \
-H 'Cookie:VisierASIDToken={security_token}'
To retrieve user groups that exist in a project that hasn't been published to production, use the ProjectID request header, as shown in the following sample.
curl -X GET --url 'https://{vanity_name}.api.visier.io/v2alpha/admin/user-groups' \
-H 'apikey:{api_key}' \
-H 'Cookie:VisierASIDToken={security_token}'
-H 'ProjectID:a1a02d74-2c54-40fd-b171-ec7d9a4c0952'
The response returns details about the available user groups.
{
"userGroups": [
{
"userGroupId": "b4d975d0-7001-434e-88d1-e71dc8d589f2",
"displayName": "API - created on admin level",
"description": "created from json/user-groups/permission1-e1a-c1o-j1r-j1r.json",
"tenantCode": "WFF_j1r"
},
...
{
"userGroupId": "4bdfe9af-312f-4d40-9b5a-93833a85f160",
"displayName": "oem_email_push_user_group",
"tenantCode": "WFF_j1r"
},
{
"userGroupId": "8e2a6e78-35b0-439d-87d7-45a950b1b5a3",
"displayName": "second_user_group",
"tenantCode": "WFF_j1r"
},
{
"userGroupId": "de5c72d2-a1b5-4ce1-8f49-bf6e16a45f6b",
"displayName": "third_user_group",
"tenantCode": "WFF_j1r"
}
]
}
Retrieve the details of a user group
By default, retrieving a specific user group returns all details about the user group, such as its display name, description, assigned users, and assigned permissions.
Use this sample request to retrieve information about a specific user group.
curl -X GET --url 'https://{vanity_name}.api.visier.io/v2alpha/admin/user-groups/7a3e1411-5c32-49f0-8715-d529014718fc' \
-H 'apikey:{api_key}' \
-H 'Cookie:VisierASIDToken={security_token}'
The response returns the user group's permissions and users.
{
"userGroupId": "7a3e1411-5c32-49f0-8715-d529014718fc",
"displayName": "Dynamic user population",
"description": "Compound filter for user population",
"permissionIds": {
"ids": [
"9cefbf06-b4b3-490c-bf04-5fbee0ba85b5",
"06a1e2cf-a8e2-4927-92ac-c943a2f4f3e5"
]
},
"users": {
"includeAllUsers": false,
"dynamicFilterDefinition": {
"filters": [
{
"filterId": "b4938c10-bd46-4c38-8908-d48166f407d1",
"analyticObjectId": "Employee",
"dimensionFilters": [
{
"dimensionId": "Organization_Hierarchy",
"memberSelections": [
{
"isExcluded": false,
"namePath": [
"Sales"
]
},
{
"isExcluded": false,
"namePath": [
"IT"
]
}
]
}
]
}
]
}
},
"tenantCode": "WFF_j1r"
}
Create multiple user groups
This endpoint supports the ProjectID request header to make changes in a project. For more information, see Projects API. Use the following sample request to create user groups in a project. If you omit the ProjectID request header, the request is immediately published to your production version.
curl -X POST --url 'https://{vanity_name}.api.visier.io/v2alpha/admin/user-groups' \
-H 'apikey:{api_key}' \
-H 'Cookie:VisierASIDToken={security_token}' \
-H 'ProjectID:5a031f08-5895-4e54-9333-32de249f2e5a' \
-d '{
"userGroups": [
{
"displayName": "Permission for all users",
"description": "User population is all users",
"permissionIds": {
"ids": [
"a117ecb5-2b6f-402e-bcd9-0a5c42adcc76"
]
},
"users": {
"includeAllUsers": true
}
},
{
"displayName": "Dynamic user population",
"description": "Compound filter for user population",
"permissionIds": {
"ids": [
"9cefbf06-b4b3-490c-bf04-5fbee0ba85b5",
"06a1e2cf-a8e2-4927-92ac-c943a2f4f3e5"
]
},
"users": {
"dynamicFilterDefinition": {
"filters": [
{
"dimensionFilters": [
{
"dimensionId": "Organization_Hierarchy",
"memberSelections": [
{
"namePath": [ "Sales" ]
},
{
"namePath": [ "IT" ]
}
]
}
]
}
]
}
}
},
{
"displayName": "Admin tenant level",
"description": "Grants permission to all but a few users",
"permissionIds": {
"ids": [
"cae0d8c1-1278-4900-9297-7ea3e789b169"
]
},
"users": {
"includeAllUsers": true,
"manuallyExcludedIds": {
"ids": [
"7e2809c4-fd3c-6f44-b4f4-95492904bce2",
"72a6c22e-76be-a24a-92f7-7cbbed16fd58",
"02393fdc-3b43-9648-b042-a589a781a9d0"
]
}
}
}
]
}'
Use this sample request to add multiple new user groups
curl -X POST --url 'https://{vanity_name}.api.visier.io/v2alpha/admin/user-groups' \
-H 'apikey:{api_key}' \
-H 'Cookie:VisierASIDToken={security_token}' \
-d '{
"userGroups": [
{
"displayName": "Permission for all users",
"description": "User population is all users",
"permissionIds": {
"ids": [
"a117ecb5-2b6f-402e-bcd9-0a5c42adcc76"
]
},
"users": {
"includeAllUsers": true
}
},
{
"displayName": "Dynamic user population",
"description": "Compound filter for user population",
"permissionIds": {
"ids": [
"9cefbf06-b4b3-490c-bf04-5fbee0ba85b5",
"06a1e2cf-a8e2-4927-92ac-c943a2f4f3e5"
]
},
"users": {
"dynamicFilterDefinition": {
"filters": [
{
"dimensionFilters": [
{
"dimensionId": "Organization_Hierarchy",
"memberSelections": [
{
"namePath": [ "Sales" ]
},
{
"namePath": [ "IT" ]
}
]
}
]
}
]
}
}
},
{
"displayName": "Admin tenant level",
"description": "Grants permission to all but a few users",
"permissionIds": {
"ids": [
"cae0d8c1-1278-4900-9297-7ea3e789b169"
]
},
"users": {
"includeAllUsers": true,
"manuallyExcludedIds": {
"ids": [
"7e2809c4-fd3c-6f44-b4f4-95492904bce2",
"72a6c22e-76be-a24a-92f7-7cbbed16fd58",
"02393fdc-3b43-9648-b042-a589a781a9d0"
]
}
}
}
]
}'
The response returns whether the request was successful.
{
"successes": [
{
"displayName": "Admin tenant level",
"userGroupId": "f9f4af57-ed18-4a69-a9bc-976df6a617e0",
"tenantCode": "WFF_j1r"
},
{
"displayName": "Dynamic user population",
"userGroupId": "7a3e1411-5c32-49f0-8715-d529014718fc",
"tenantCode": "WFF_j1r"
},
{
"displayName": "Permission for all users",
"userGroupId": "ef449425-e5ef-43d0-856e-88e4002741f0",
"tenantCode": "WFF_j1r"
}
],
"failures": []
}
Update multiple user groups
Use the following sample requests to update one or more existing user groups in your tenant. You can update user groups through PUT or PATCH.
- PUT: Use the PUT method to completely replace the definition of a user group. Any fields omitted from the request are removed or replaced by the default value.
- PATCH: Use the PATCH method to change specific fields in the user group without affecting omitted fields.
You can use v2alpha/admin/user-groups to change the display name, description, permissions, and users assigned to a user group.
In this PUT request, the API call replaces a user group's definition to change its display name, description, assigned permissions, and assigned users. Because it's a PUT request, any previously-assigned permissions or users are replaced by the new definition.
curl -X PUT --url 'https://{vanity_name}.api.visier.io/v2alpha/admin/user-groups' \
-H 'apikey:{api_key}' \
-H 'Cookie:VisierASIDToken={security_token}' \
-d '{
"userGroups": [
{
"userGroupId": "7a3e1411-5c32-49f0-8715-d529014718fc",
"displayName": "Dynamic user population - Updated",
"description": "Compound filter for user population. Updated with PUT method",
"permissionIds": {
"ids": [
"9cefbf06-b4b3-490c-bf04-5fbee0ba85b5",
"06a1e2cf-a8e2-4927-92ac-c943a2f4f3e5",
"a117ecb5-2b6f-402e-bcd9-0a5c42adcc76"
]
},
"users": {
"includeAllUsers": false,
"dynamicFilterDefinition": {
"filters": [
{
"filterId": "b4938c10-bd46-4c38-8908-d48166f407d1",
"analyticObjectId": "Employee",
"dimensionFilters": [
{
"dimensionId": "Organization_Hierarchy",
"memberSelections": [
{
"isExcluded": false,
"namePath": [
"Sales"
]
},
{
"isExcluded": false,
"namePath": [
"IT"
]
}
]
}
]
}
]
}
}
}
]
}'
The response returns whether the user group updates were successful.
{
"successes": [
{
"displayName": "Dynamic user population - Updated",
"userGroupId": "7a3e1411-5c32-49f0-8715-d529014718fc",
"tenantCode": "WFF_j1r"
}
],
"failures": []
}
In this PATCH request, the API call updates a user group to change its display name and assigned permissions. Because it's a PATCH request, the permissions defined in the request are added to the user group in addition to any previously-defined permissions.
curl -X PATCH --url 'https://{vanity_name}.api.visier.io/v2alpha/admin/user-groups' \
-H 'apikey:{api_key}' \
-H 'Cookie:VisierASIDToken={security_token}' \
-d '{
"userGroups": [
{
"userGroupId": "7a3e1411-5c32-49f0-8715-d529014718fc",
"displayName": "Dynamic user population",
"description": "Compound filter for user population.",
"permissionIds": {
"ids": [
"9cefbf06-b4b3-490c-bf04-5fbee0ba85b5",
"06a1e2cf-a8e2-4927-92ac-c943a2f4f3e5"
]
}
}
]
}'
The response returns whether the user group updates were successful.
{
"successes": [
{
"displayName": "Dynamic user population",
"userGroupId": "7a3e1411-5c32-49f0-8715-d529014718fc",
"tenantCode": "WFF_j1r"
}
],
"failures": []
}
Delete multiple user groups
Use this sample request to delete a list of user groups.
curl -X DELETE --url 'https://{vanity_name}.api.visier.io/v2alpha/admin/user-groups' \
-H 'apikey:{api_key}' \
-H 'Cookie:VisierASIDToken={security_token}' \
-d '{
"userGroups": [
{
"userGroupId": "9a87669a-01d7-45bc-8176-823a557468d2",
},
{
"userGroupId": "0c14d9fe-e5f7-4eb4-8ccd-ebd4c639da94",
},
{
"userGroupId": "fb861a49-c9e0-4e79-8ccf-3f1156014766",
}
]
}'
The response returns the successfully and unsuccessfully deleted user groups.
{
"successes": [
{
"tenantCode": "WFF_j1r",
"userGroupId": "0c14d9fe-e5f7-4eb4-8ccd-ebd4c639da94"
},
{
"tenantCode": "WFF_j1r",
"userGroupId": "9a87669a-01d7-45bc-8176-823a557468d2"
},
{
"tenantCode": "WFF_j1r",
"userGroupId": "fb861a49-c9e0-4e79-8ccf-3f1156014766"
}
],
"failures": []
}
Delete a user group
Use this sample request to delete a specific user group.
curl -X DELETE --url 'https://{vanity_name}.api.visier.io/v2alpha/admin/user-groups/7a3e1411-5c32-49f0-8715-d529014718fc' \
-H 'apikey:{api_key}' \
-H 'Cookie:VisierASIDToken={security_token}'
The response returns whether the deletion was successful.
{
"successes": [
{
"tenantCode": "WFF_j1r",
"userGroupId": "7a3e1411-5c32-49f0-8715-d529014718fc"
}
],
"failures": []
}
Users API V1
Retrieve a list of all users
Use this sample request to retrieve all the users in your tenant.
curl -X GET --url 'https://{vanity_name}.api.visier.io/v1/admin/users' \
-H 'apikey:{api_key}' \
-H 'Cookie:VisierASIDToken={security_token}'
The response returns details about each user in your tenant.
{
"users": [
{
"userId": "02393fdc-3b43-9648-b042-a589a781a9d0",
"username": "john@jupiter.com",
"displayName": "Test User 000",
"accountEnabled": true,
"employeeId": "",
"email": "john@jupiter.com",
"lastLogin": {
"timestamp": "1633121685629"
},
},
{
"userId": "72a6c22e-76be-a24a-92f7-7cbbed16fd58",
"username": "richard@jupiter.com",
"displayName": "Integration Test User 002",
"accountEnabled": true,
"employeeId": "",
"email": "richard@jupiter.com"
}
]
}
Retrieve a user's details
Use this sample request to retrieve the details of a specific user in your tenant.
curl -X GET --url 'https://{vanity_name}.api.visier.io/v1/admin/users/7f184182-aacc-1f49-85a6-959e8f2f2c7e' \
-H 'apikey:{api_key}' \
-H 'Cookie:VisierASIDToken={security_token}'
To retrieve the details of a user in a project that hasn't been published to production, use the ProjectID request header, as shown in the following sample.
curl -X GET --url 'https://{vanity_name}.api.visier.io/v1/admin/users/984b70fe-08b8-e949-8e74-9162132d9e4e?assignedUserGroups=true&assignedPermissions=true' \
-H 'apikey:{api_key}' \
-H 'Cookie:VisierASIDToken={security_token}' \
-H 'ProjectID:3f441760-85c7-455b-befc-e2e174239a25'
The response returns details about the specified user.
{
"userId": "7f184182-aacc-1f49-85a6-959e8f2f2c7e",
"username": "jupiter_psm@visier.com",
"displayName": "Jupiter Service Manager",
"employeeId": "",
"accountEnabled": true,
"email": "jupiter_psm@visier.com",
"lastLogin": {
"timestamp": "1633121685629"
},
"profiles": {
"assignedProfiles": [
{
"profileId": "e02fa471-9a14-36ba-a927-fc2b248d785c",
"displayName": "Partner Service Manager",
"validityStartTime": "-62167219200000",
"validityEndTime": "253402214400000",
"capabilities": [
{
"capability": "Data",
"accessLevel": "NoAccess",
"viewLevel": "Simple"
},
{
"capability": "Security",
"accessLevel": "NoAccess",
"viewLevel": "Simple"
},
{
"capability": "Model",
"accessLevel": "NoAccess",
"viewLevel": "Simple"
},
{
"capability": "UserManagement",
"accessLevel": "NoAccess",
"viewLevel": "Simple"
},
{
"capability": "TenantManagement",
"accessLevel": "ReadOnly",
"viewLevel": "Detailed"
}
],
"additionalCapabilities": {
"additionalCapabilities": [
"DirectPublish",
"TenantPreview"
]
}
}
]
}
}
Retrieve a list of all user groups
Note: This action is available in Users V1 and User Groups V2. For User Groups V2, see Retrieve a list of user groups above.
Use this sample request to retrieve all user groups in your tenant.
curl -X GET --url 'https://{vanity_name}.api.visier.io/v1/admin/user-groups' \
-H 'apikey:{api_key}' \
-H 'Cookie:VisierASIDToken={security_token}'
The response returns details about the available user groups.
{
"userGroups": [
{
"userGroupId": "b4d975d0-7001-434e-88d1-e71dc8d589f2",
"displayName": "API - created on admin level",
"description": "created from json/user-groups/permission1-e1a-c1o-j1r-j1r.json",
"tenantCode": "WFF_j1r"
},
...
{
"userGroupId": "4bdfe9af-312f-4d40-9b5a-93833a85f160",
"displayName": "oem_email_push_user_group",
"tenantCode": "WFF_j1r"
},
{
"userGroupId": "8e2a6e78-35b0-439d-87d7-45a950b1b5a3",
"displayName": "second_user_group",
"tenantCode": "WFF_j1r"
},
{
"userGroupId": "de5c72d2-a1b5-4ce1-8f49-bf6e16a45f6b",
"displayName": "third_user_group",
"tenantCode": "WFF_j1r"
}
]
}
Retrieve a list of user group users
Note: This action is available in Users V1 and User Groups V2. For User Groups API V2, see Retrieve the details of a user group above.
Use this sample request to retrieve all the users in a specific user group.
curl -X GET --url 'https://{vanity_name}.api.visier.io/v1/admin/user-groups/d2c53a43-b62b-4d18-b95a-345f0a05e1d1/users' \
-H 'apikey:{api_key}' \
-H 'Cookie:VisierASIDToken={security_token}'
To retrieve user groups users that exist in a project that hasn't been published to production, use the ProjectID request header, as shown in the following sample.
curl -X GET --url 'https://{vanity_name}.api.visier.io/v1/admin/user-groups/481daf14-5093-46b0-a168-b4c712aaff0c/users' \
-H 'apikey:{api_key}' \
-H 'Cookie:VisierASIDToken={security_token}' \
-H 'ProjectID:fd2c83f5-440e-4ade-a2bb-7a7c22c95d2c'
The response returns details about the user group users.
{
"tenants": [{
"tenantCode": "WFF_j1r",
"users": [{
"userId": "4c0ad38a-b492-5243-9c96-0b250c475358",
"username": "john@jupiter.com"
}]
},{
"tenantCode": "WFF_j1r",
"users": [{
"userId": "988444af-101f-da4d-b504-d502518ff4e3",
"username": "jane@callisto.com"
}]
}]
}
Retrieve users that are assigned a specific permission
Use this sample request to retrieve all the users assigned to a specified permission.
curl -X GET --url 'https://{vanity_name}.api.visier.io/v1/admin/permissions/cae0d8c1-1278-4900-9297-7ea3e789b169/users' \
-H 'apikey:{api_key}' \
-H 'Cookie:VisierASIDToken={security_token}'
To retrieve users assigned a specific permission in a project that hasn't been published to production, use the ProjectID request header, as shown in the following sample.
curl -X GET --url 'https://{vanity_name}.api.visier.io/v1/admin/permissions/cae0d8c1-1278-4900-9297-7ea3e789b169/users' \
-H 'apikey:{api_key}' \
-H 'Cookie:VisierASIDToken={security_token}' \
-H 'ProjectID:fd2c83f5-440e-4ade-a2bb-7a7c22c95d2c'
The response returns information about the users assigned to the permission, including how the permission was assigned to the user.
{
"tenants": [
{
"tenantCode": "WFF_j1r",
"users": [
{
"userId": "4c0ad38a-b492-5243-9c96-0b250c475358",
"username": "john@jupiter.com",
"permissionFrom": "UserGroup"
},
{
"userId": "fff86c23-bc2d-1d4c-a2ff-39ef1f6aba20",
"username": "abigail@jupiter.com",
"permissionFrom": "User"
},
{
"userId": "0bd2d579-ac7e-7949-8e01-2881ba5f1465",
"username": "robin@jupiter.com",
"permissionFrom": "User"
}
]
}
]
}
Retrieve a list of all permissions in XLSX format
Use this sample request to retrieve all the permissions in your tenant in XLSX format.
curl -X GET --url 'https://{vanity_name}.api.visier.io/v1/admin/users/reports/permissions-list' \
-H 'apikey:{api_key}' \
-H 'Cookie:VisierASIDToken={security_token}'
The response returns information an XLSX file called "permissions_list_<timestamp>.xlsx" that contains the Permission List sheet.
This sheet contains the following information:
Column | Description |
---|---|
Permission Name | The name of the permission. |
Permission Description | An optional statement that explains what the permission is and how to use it. |
Permission ID | The unique identifier of the permission. |
Retrieve user permissions in XLSX format
Use this sample request to retrieve all the permissions assigned to users in your tenant.
curl -X GET --url 'https://{vanity_name}.api.visier.io/v1/admin/users/reports/permission-assignments' \
-H 'apikey:{api_key}' \
-H 'Cookie:VisierASIDToken={security_token}'
The response returns information an XLSX file called "permission_Assignments_<timestamp>.xlsx" that contains the following sheets:
Users Permission Assignment
A list of users and the permissions assigned to them.
This sheet contains the following information:
Column | Description |
---|---|
Username | The email of the user. |
Name | The full name of the user. |
Permission Display Name | The name of the permission. |
User Group | The name of the User Group where the data access comes from. Assigned Directly indicates that data access was granted through an assigned permission and not through the membership in a User Group. |
Full Access | Indicates whether full access to all data is granted by the permission. |
Users Without Permissions
A list of users that do not have any permissions.
This sheet contains the following information:
Column | Description |
---|---|
Username | The email of the user. |
Name | The full name of the user. |
Permission Usage
A summary of the permissions and their usage.
This sheet contains the following information:
Column | Description |
---|---|
Permission Display Name | The name of the permission. |
Users Using Permission | The total number of users assigned this permission. |
User Groups Using Permission | The total number of User Groups using this permission. |
Retrieve user profile assignments in XLSX format
Use this sample request to retrieve all the profiles assigned to users in your tenant.
curl -X GET --url 'https://{vanity_name}.api.visier.io/v1/admin/users/reports/profile-assignments' \
-H 'apikey:{api_key}' \
-H 'Cookie:VisierASIDToken={security_token}'
The response returns information an XLSX file called "profile_Assignments_<timestamp>.xlsx" that contains the following sheets:
Local Profile Assignments
A list of profiles assigned to each user. For administrating tenant users, these are the users assigned administrating tenant profiles. For analytic tenant users, these are all the users assigned profiles in your tenant.
This sheet contains the following information:
Column | Description |
---|---|
User ID | The unique identifier of the user. |
User Name | The full name of the user. |
Profile ID | The unique identifier of the profile. |
Profile Name | The name of the profile. |
Expiry Date | The date that the profile will no longer be valid for the user. If "indefinite", the profile does not expire for the user. |
Status | Indicates whether the profile is enabled for the user. |
System Profile Assignments
A list of analytic tenant profiles assigned to each user in the administrating tenant. This sheet is empty for analytic tenant users.
This sheet contains the following information:
Column | Description |
---|---|
User ID | The unique identifier of the user. |
User Name | The full name of the user. |
Profile ID | The unique identifier of the profile. |
Profile Name | The name of the profile. |
Tenant Name | The tenant that the user has access to with this profile. |
Expiry Date | The date that the profile will no longer be valid for the user. If "indefinite", the profile does not expire for the user. |
Status | Indicates whether the profile is enabled for the user. |
Column | Description |
Retrieve the Application Logs
Use this sample request to retrieve the Application Log for your tenant.
curl -X GET --url 'https://{vanity_name}.api.visier.io/v1/admin/users/reports/application-logs?startTime=1663632418220?endTime=1663632500000' \
-H 'apikey:{api_key}' \
-H 'Cookie:VisierASIDToken={security_token}'
The response returns an XLSX file "application_logs_<timestamp>.xlsx" that contains the Application Logs sheet. The log contains the following information:
Column | Description |
---|---|
Time (UTC) | The time the event occurred. |
Category | The type of event that was logged. |
Functionality | The action that the user performed. |
Description | Whether or not the event was a user logon. |
User | The user who performed the action. |
IP Address | The IP address that the user logged on from. |
Details | Additional information related to the action that was performed. For example, what user was deleted. |
Project ID | The unique identifier of the project that the user performed an action in. |
Project Name | The display name of the project that the user performed an action in. |
Project State | The status of the project. |
Retrieve the Data Security Report
Use this sample request to retrieve the Data Security Report for your tenant.
curl -X GET --url 'https://{vanity_name}.api.visier.io/v1/admin/users/82424d8b-f99c-cd4d-9ac7-568919d9a0e4/reports/data-security' \
-H 'apikey:{api_key}' \
-H 'Cookie:VisierASIDToken={security_token}'
The response returns an XLSX file "data_security_report_<timestamp>.xlsx" that contains the Data Security Report sheet. The log contains the following information:
Column | Description |
---|---|
Username | The email of the user. |
Name | The full name of the user. |
Property Display Name | The name of the property that data security is being defined for. |
Access level | The level of access granted to the property and property values. |
Analytic Object Name | The name of the subject, event, overlay, or related object that data security is being defined for. |
Parent Analytic Object Name | The name of the subject that an event is associated with. This column is only populated when the permission defines data security for an event or related object. |
Path to Property | The subject reference path that shows how two analytic objects are linked. |
Population Access | The population of the analytic object that can be accessed. |
Permission Display Name | The name of the permission where the data access is defined. |
User Group | The name of the User Group where the data access comes from. Assigned Directly indicates that data access was granted through an assigned permission and not through the membership in a User Group. |
Add a user
Note: This action is available in Users V1 and Users V2. You can add users in bulk with Users API V2. For Users V2, see Add users above.
Use this sample request to add a new user to your tenant.
curl -X POST --url 'https://{vanity_name}.api.visier.io/v1/admin/users' \
-H 'apikey:{api_key}' \
-H 'Cookie:VisierASIDToken={security_token}' \
-d 'model= {
"username":"john@jupiter.com",
"displayName":"John Doe"
}'
The response returns details about the created user.
{
"userId": "82424d8b-f99c-cd4d-9ac7-568919d9a0e4",
"username": "john@jupiter.com",
"displayName": "John Doe",
"accountEnabled": "true",
"email": "john@jupiter.com"
}
Update a user
Note: This action is available in Users V1 and Users V2. For Users API V2, see Update users above.
Use this sample request to update an existing user in your tenant.
curl -X PUT --url 'https://{vanity_name}.api.visier.io/v1/admin/users/82424d8b-f99c-cd4d-9ac7-568919d9a0e4' \
-H 'apikey:{api_key}' \
-H 'Cookie:VisierASIDToken={security_token}' \
-d 'model= {
"accountEnabled":"false"
}'
The response returns details about the updated user.
{
"userId": "82424d8b-f99c-cd4d-9ac7-568919d9a0e4",
"username": "john@jupiter.com",
"displayName": "John Doe",
"accountEnabled": "false",
"email": "john@jupiter.com"
}
Assign users to user groups
Note: This action is available in User V1 and User Group V2. For User Group V2, see Update multiple user groups above.
This endpoint supports the ProjectID request header to make changes in a project. For more information, see Projects API. Use the following sample request to assign users to user groups in a project. If you omit the ProjectID request header, the request is immediately published to your production version.
curl -X PUT --url 'https://{vanity_name}.api.visier.io/v1/admin/user-groups/users' \
-H 'apikey:{api_key}' \
-H 'Cookie:VisierASIDToken={security_token}' \
-H 'ProjectID:fd2c83f5-440e-4ade-a2bb-7a7c22c95d2c' \
-d '{
"userGroups": [
{
"userGroupId": "481daf14-5093-46b0-a168-b4c712aaff0c",
"userIds": [
"27c54e86-0cc0-8748-abc6-f6ec2ca62384",
"984b70fe-08b8-e949-8e74-9162132d9e4e",
"74d040ff-858f-d543-9d68-72029c1bc672"
]
},
{
"userGroupId": "a9ec3b4b-94b6-4d01-bbaa-8ba55fc82319",
"userIds": [
"6e09448a-7300-244e-9cfe-7ddebc2c37df"
]
}
]
}'
Use this sample request to add users to a user group.
curl -X PUT --url 'https://{vanity_name}.api.visier.io/v1/admin/user-groups/users' \
-H 'apikey:{api_key}' \
-H 'Cookie:VisierASIDToken={security_token}' \
-d 'model={"userGroups":[{"userGroupId":"d2c53a43-b62b-4d18-b95a-345f0a05e1d1","userIds":["0bd2d579-ac7e-7949-8e01-2881ba5f1465","a46ce914-9928-924b-80a2-4999fb4c923e","6a684bee-0ac4-b24f-a293-2fbcbbc7c354","c713ddaa-147d-9a4c-ae3c-e01913d4a911"]},{"userGroupId":"de5c72d2-a1b5-4ce1-8f49-bf6e16a45f6b","userIds":["c713ddaa-147d-9a4c-ae3c-e01913d4a911"]}]}'
The response returns details about the assignment.
{
"tenants": [
{
"tenantCode": "WFF_j1r~c7o",
"status": "Succeed",
"assignments": [
{
"id": "d2c53a43-b62b-4d18-b95a-345f0a05e1d1",
"name": "HR Analytics Group",
"users": [
{
"userId": "a46ce914-9928-924b-80a2-4999fb4c923e",
"username": "jane@callisto.com"
},
{
"userId": "c713ddaa-147d-9a4c-ae3c-e01913d4a911",
"username": "david@callisto.com"
}
]
}
]
},
{
"tenantCode": "WFF_j1r",
"status": "Failed",
"message": "There were no effective security changes, no assignments occurred"
},
{
"tenantCode": "WFF_j1r~e1a",
"status": "Succeed",
"assignments": [
{
"id": "d2c53a43-b62b-4d18-b95a-345f0a05e1d1",
"name": "HR Analytics Group",
"users": [
{
"userId": "6a684bee-0ac4-b24f-a293-2fbcbbc7c354",
"username": "elliot@europa.com"
}
]
}
]
}
]
}
Assign permissions to users
This endpoint supports the ProjectID request header to make changes in a project. For more information, see Projects API. Use the following sample request to assign permissions to users in a project. If you omit the ProjectID request header, the request is immediately published to your production version.
curl -X PUT --url 'https://{vanity_name}.api.visier.io/v1/admin/permissions/users' \
-H 'apikey:{api_key}' \
-H 'Cookie:VisierASIDToken={security_token}' \
-H 'ProjectID:fd2c83f5-440e-4ade-a2bb-7a7c22c95d2c' \
-d '{
"permissions": [
{
"permissionId": "cae0d8c1-1278-4900-9297-7ea3e789b169",
"userIds": [
"27c54e86-0cc0-8748-abc6-f6ec2ca62384",
"984b70fe-08b8-e949-8e74-9162132d9e4e",
"74d040ff-858f-d543-9d68-72029c1bc672"
]
},
{
"permissionId": "06a1e2cf-a8e2-4927-92ac-c943a2f4f3e5",
"userIds": [
"984b70fe-08b8-e949-8e74-9162132d9e4e"
]
}
],
}'
Use this sample request to assign permissions to a specified user.
curl -X PUT --url 'https://{vanity_name}.api.visier.io/v1/admin/permissions' \
-H 'apikey:{api_key}' \
-H 'Cookie:VisierASIDToken={security_token}' \
-d "permission": "permissionId":"cae0d8c1-1278-4900-9297-7ea3e789b169","userIds":["e52bbbba-8be3-b740-a824-f80c248dc545","fff86c23-bc2d-1d4c-a2ff-39ef1f6aba20","0bd2d579-ac7e-7949-8e01-2881ba5f1465"]}]}'
The response returns details about the permission assignment.
{
"tenants": [
{
"tenantCode": "WFF_j1r~c7o",
"permissions": [
{
"permission": {
"permissionId": "cae0d8c1-1278-4900-9297-7ea3e789b169",
"displayName": "Line Managers"
},
"users": [
{
"userId": "e52bbbba-8be3-b740-a824-f80c248dc545",
"username": "jane@callisto.com"
},
{
"userId": "fff86c23-bc2d-1d4c-a2ff-39ef1f6aba20",
"username": "david@callisto.com"
},
{
"userId": "0bd2d579-ac7e-7949-8e01-2881ba5f1465",
"username": "taylor@callisto.com"
}
]
}
],
"status": "Succeed"
}
}
Assign permissions to user groups
Note: This action is available in Users V1 and User Groups V2. For User Groups V2, see Update multiple user groups above.
Use this sample request to assign permissions to a specified user group.
curl -X PUT --url 'https://{vanity_name}.api.visier.io/v1/admin/user-groups/permissions' \
-H 'apikey:{api_key}' \
-H 'Cookie:VisierASIDToken={security_token}' \
-d 'model={"userGroups":[{"userGroupId":"d2c53a43-b62b-4d18-b95a-345f0a05e1d1","permissionsIds":["9cefbf06-b4b3-490c-bf04-5fbee0ba85b5"]}]}'
The response returns details about the permission assignment.
{
"tenantCode": "WFF_j1r",
"status": "Succeed",
"userGroups": [
{
"userGroupId": "d2c53a43-b62b-4d18-b95a-345f0a05e1d1",
"displayName": "HR Analysts Group",
"permissions": [
{
"permissionId": "9cefbf06-b4b3-490c-bf04-5fbee0ba85b5",
"displayName": "Diversity Access"
}
]
}
]
}
Delete a user
Note: This action is available in Users V1 and Users V2. You can delete users in bulk with Users API V2. For Users V2, see Delete users above.
Use this sample request to delete a user in your tenant.
curl -X DELETE --url 'https://{vanity_name}.api.visier.io/v1/admin/users/82424d8b-f99c-cd4d-9ac7-568919d9a0e4' \
-H 'apikey:{api_key}' \
-H 'Cookie:VisierASIDToken={security_token}'
The response returns whether the deletion was successful or unsuccessful.
Remove users from user groups
Note: This action is available in Users V1 and User Groups V2. For User Groups V2, see Update multiple user groups above.
Use this sample request to remove a list of users from a user group.
curl -X DELETE --url 'https://{vanity_name}.api.visier.io/v1/admin/user-groups/users' \
-H 'apikey:{api_key}' \
-H 'Cookie:VisierASIDToken={security_token}' \
-d 'model={"userGroups":[{"userGroupId":"d2c53a43-b62b-4d18-b95a-345f0a05e1d1","userIds":["0bd2d579-ac7e-7949-8e01-2881ba5f1465","a46ce914-9928-924b-80a2-4999fb4c923e","6a684bee-0ac4-b24f-a293-2fbcbbc7c354","c713ddaa-147d-9a4c-ae3c-e01913d4a911"]},{"userGroupId":"de5c72d2-a1b5-4ce1-8f49-bf6e16a45f6b","userIds":["c713ddaa-147d-9a4c-ae3c-e01913d4a911"]}]}'
The response returns whether the removal was successful or unsuccessful.
{
"tenants": [
{
"tenantCode": "WFF_j1r~c7o",
"status": "Succeed",
"assignments": [
{
"id": "d2c53a43-b62b-4d18-b95a-345f0a05e1d1",
"name": "HR Analytics Group",
"users": [
{
"userId": "a46ce914-9928-924b-80a2-4999fb4c923e",
"username": "jane@callisto.com"
},
{
"userId": "c713ddaa-147d-9a4c-ae3c-e01913d4a911",
"username": "david@callisto.com"
}
]
}
]
},
{
"tenantCode": "WFF_j1r",
"status": "Failed",
"message": "There were no effective security changes, no assignments occurred"
},
{
"tenantCode": "WFF_j1r~e1a",
"status": "Succeed",
"assignments": [
{
"id": "d2c53a43-b62b-4d18-b95a-345f0a05e1d1",
"name": "HR Analytics Group",
"users": [
{
"userId": "6a684bee-0ac4-b24f-a293-2fbcbbc7c354",
"username": "elliot@europa.com"
}
]
}
]
}
]
}
Remove permissions from users
Use this sample request to remove a permission from a list of users.
curl -X DELETE --url 'https://{vanity_name}.api.visier.io/v1/admin/permissions/users \
-H 'apikey:{api_key}' \
-H 'Cookie:VisierASIDToken={security_token}'
-d '{"permissions":[{"permissionId":"cae0d8c1-1278-4900-9297-7ea3e789b169","userIds":["e52bbbba-8be3-b740-a824-f80c248dc545","fff86c23-bc2d-1d4c-a2ff-39ef1f6aba20","0bd2d579-ac7e-7949-8e01-2881ba5f1465","d445efc0-fdde-5d4b-9b3e-586981acf800","94e5e022-a5fb-fe4f-99c9-de981fb87282"]}]}'
The response returns whether the removal was successful or unsuccessful.
{
"tenants": [
{
"tenantCode": "WFF_j1r~c7o",
"permissions": [
{
"permission": {
"permissionId": "cae0d8c1-1278-4900-9297-7ea3e789b169",
"displayName": "Line Managers"
},
"users": [
{
"userId": "e52bbbba-8be3-b740-a824-f80c248dc545",
"username": "jane@callisto.com"
},
{
"userId": "fff86c23-bc2d-1d4c-a2ff-39ef1f6aba20",
"username": "david@callisto.com"
},
{
"userId": "0bd2d579-ac7e-7949-8e01-2881ba5f1465",
"username": "taylor@callisto.com"
},
{
"userId": "d445efc0-fdde-5d4b-9b3e-586981acf800",
"username": "robin@callisto.com"
},
{
"userId": "94e5e022-a5fb-fe4f-99c9-de981fb87282",
"username": "abigail@callisto.com"
}
]
}
]
"status": "Succeed"
}
]
}
Remove permissions from user groups
Note: This action is available in Users V1 and User Groups V2. For User Groups V2, see Update users above.
Use this sample request to remove a permission from a list of user groups.
curl -X DELETE --url 'https://{vanity_name}.api.visier.io/v1/admin/user-groups/permissions' \
-H 'apikey:{api_key}' \
-H 'Cookie:VisierASIDToken={security_token}'
-d 'model={"userGroups":[{"userGroupId":"d2c53a43-b62b-4d18-b95a-345f0a05e1d1","permissionsIds":["9cefbf06-b4b3-490c-bf04-5fbee0ba85b5"]},{"userGroupId":"8e2a6e78-35b0-439d-87d7-45a950b1b5a3","permissionsIds":["9cefbf06-b4b3-490c-bf04-5fbee0ba85b5"]}]}'
The response returns whether the removal was successful or unsuccessful.
{
"tenantCode": "WFF_j1r",
"status": "Succeed",
"userGroups": [
{
"userGroupId": "d2c53a43-b62b-4d18-b95a-345f0a05e1d1",
"displayName": "HR Analysts Group",
"permissions": [
{
"permissionId": "9cefbf06-b4b3-490c-bf04-5fbee0ba85b5",
"displayName": "Diversity Access"
}
]
},
{
"userGroupId": "8e2a6e78-35b0-439d-87d7-45a950b1b5a3",
"displayName": "Sales Group",
"permissions": [
{
"permissionId": "9cefbf06-b4b3-490c-bf04-5fbee0ba85b5",
"displayName": "Workforce Access"
}
]
}
]
}