This article describes how you can add Cloud users to a System using the Cloud DB API. The Cloud user must be authenticated before making the API request. See “Cloud Authentication API” for details.
The POST API request that shares the specified System with the desired cloud user is https://nxvms.com/cdb/systems/{CloudSystemId}/users
Begin by replacing {CloudSystemId}
with the Cloud System ID of the System you want to share with a user as a string value. See "Cloud Connect" more information on finding your Cloud System ID.
The API request requires a JSON payload that contains the following information:
accountEmail
- The cloud account you want to share System access with.accessRole
- The System access role to give to the account. Possible string values are none, disabled, custom, liveViewer, viewer, advancedViewer, localAdmin, cloudAdmin, maintenance, owner, system.userRoleId
- VMS-specific user role ID. For the Cloud, this is an opaque string that is sent to the VMS server when adding a user.customPermissions
- VMS-specific permissions. For the Cloud, this is an opaque string that is sent to the VMS server when adding a user.isEnabled
- A Boolean value that sets the account to an active or inactive state.vmsUserId
- VMS-specific user ID (string value).
Example API Request in Python:
import requests cloud_system_id = “76cce8ca-d7c5-4172-93da-7f9749eb1db6” url = f"https://nxvms.com/cdb/systems/{cloud_system_id}/users" payload = { "accountEmail": "exampleuser@gmail.com", "accessRole": "advancedViewer", "userRoleId": "", "customPermissions": "", "isEnabled": True, "vmsUserId": "" } header = { 'Content-Type': 'application/json' } response = requests.request("POST", url, json=payload, headers=header) print(response.json())
An invitation email to join the System is sent out to the Cloud user, If an account with the specified email does not exist, they will also receive an email to create an Nx Cloud account first before accessing the Cloud System.
Comments
0 comments
Article is closed for comments.