Use the following APIs to create, fetch, update, and delete users.

Create a User

Required Permissions

You must have the Create User permission to perform this operation.

API
/api/users
Method
POST
Required Parameters
Name Description
userName

string

User name.
displayName

string

User display name.
password

string

The password for the user.
status

string

Status of the user:
  • INACTIVE: The user is inactive.
  • ACTIVE: The user is active.
email

string

Email address of the user.
roles

string

Array of role Ids.
group

string

Array of group Ids.
Input Example
{
  "userName": "",
  "displayName": "",
  "password":"",
  "status":"",
  "email":"",
  "roles":[
  ],
  "groups":[
  ], 
}
Response
{
  "id": "string"
}

Get a User by ID

Required Permissions

You must have the View User permission to perform this operation.

API
/api/users/{id}
Method
GET
Required Parameters
Name Type Description
id string User ID.
Response
{
    "id": "",
    "userName": "",
    "displayName": "",
    "tenantId": "",
    "status": "",
    "email": "",
    "accessToken":"",
    "refreshToken":"",
    "roles":[//Array of role details object],
    "groups": [//Array of role details object],
    "createdTime": "",
    "lastUpdatedTime": "",
    "updateVersion":1
}

Get a List of Users

Required Permissions

You must have the View User permission to perform this operation.

API
/api/users
Method
GET
Parameters
None
Response
{
  "users": [
    {
      "id": "",
      "userName": "",
      "displayName": "",
      "tenantId": "",
      "status": "",
      "email": "",
      "accessToken": "",
      "refreshToken": "",
      "roles": [],
      "groups":[],
      "createdTime": "",
      "lastUpdatedTime": "",
      "updateVersion":1
    }
  ],
  "pageInfo": {
    "page": 1,
    "pageSize": 10,
    "totalElements": "4",
    "totalPages": "1"
  }
}

Update a User

Required Permissions

You must have the Edit User permission to perform this operation.

API
/api/users/{id}
Method
PUT
Required Parameters
Name Description
userName

string

User name.
displayName

string

User display name.
password

string

The password for the user.
status

string

Status of the user:
  • INACTIVE: The user is inactive.
  • ACTIVE: The user is active.
email

string

Email address of the user.
roles

string

Array of role Ids.
group

string

Array of group Ids.
Input Example
{
    "userName": "",
    "displayName": "",
    "password":"VMware1!",
    "status": "",
    "email": "",
    "roles":[],
    "groups":[],
    "updateVersion":1
}
Response
{
  "id": "string"
}

Delete a User

Required Permissions

You must have the Delete User permission to perform this operation.

API
/api/users/{id}
Method
DELETE
Required Parameters
Name Description
id

string

User ID.
Response
{}

Get User Details

Required Permissions

You must have the View User permission to perform this operation.

API
/api/me
Method
GET
Required Parameters
None
Response
{
"userName": "sysadmin@vmware.com",
"displayName": "sysadmin",
"tenantId": "5bc2126a69eac734fe16e9b1",
"permissions": [
"CREATE_TENANT",
"VIEW_TENANT",
"EDIT_TENANT",
"EDIT_TENANT_SETTINGS",
"DELETE_TENANT"

]

}