Updating Accounts by Account ID
This section explains how to update the description and password of existing users.
Request
PUT https://<hostname>/api/v1/users/{id} |
Request Headers
The request header must contain an authorization token of the current session.
Request Parameters
The following parameters must be posted as URL.
Parameter | Description |
id | The identification number of the user. Can be obtained as described in Getting Users. |
Request Body
Property | Type | Description |
|---|---|---|
description | string | Set the description to be assigned to the user record. |
password | string | Set the password to be assigned to the user record. |
Request Example
Request: PUT https://abc.ukwest.cloudapp.azure.com/api/v1/users/1001
Request Header: Authorization: Bearer <Access-Token>
Request Body: { "description": "New Description via REST", "password": "ZbQIZIjVkEfLBE0y-" } |
Response
The server returns the following response to the client.
Response Codes
A successfully completed operation returns a response code 200 (OK).
Response Headers
The response to this request contains the following headers. The response may also include additional standard HTTPS headers.
Header | Description |
Content-length | The length of the response body. |
Content-type | The media type and syntax of the response body message: application/json; charset=utf-8 |
Response Body
The response contains the following information.
Property | Type | Description |
|---|---|---|
id | string | Shows the identification number of the user record. |
name | string | Shows the name of the user. |
description | string | Shows the description. |
mfaEnabled | boolean | Shows if MFA is enabled for the user. |
isDefault | boolean | Shows if the user is the default one. |
_links | Dictionary of string [key] and Object [value] | Links to related resources (navigation property). |
Response Example
Response: 200 OK
Response Body: { "id": 1001, "name": "Authentication", "description": "New Description via REST", "mfaEnabled": false, "isDefault": false, "_links": {"self": {"href": "https://abc.ukwest.cloudapp.azure.com/api/v1/users/1001"}} } |