To update a user of the NDR appliance with details such as password and groups to which the user belongs, send the following request:
PUT https://<IA_IP_address>/config/v1/users/<user>
Note
To use this request, you must belong to the sudo group.
Required header:
--user <username>:<password>
Query parameters:
{
group: 'TEXT',
password: 'TEXT'
}Options
IA_IP_address—IP address of the NDR appliance running the NDR API.
username—Administrator username.
password—Administrator password.
Parameters
user(path parameter)—User name of the user whose details you want to update.password(query parameter)—Optional. The new password for the user account you want to update.group(query parameter)—Optional. Group to which you want to add the specified user. You can specify multiple groups. Valid values are uiapi, klish, and wheel.
Example
PUT https://xxx.xxx.xxx.xxx/config/v1/users/JDoe
Required header:
--user npadmin:hammerhead
Request body:
{
group: klish,
password: Tstatater@1234
}Update a user: Response
HTTP/1.1 [Response Code] [Response Message] Date: [Date] Content-Type: [Content Type] username: [User Name] name: [Full Name] groups: [Groups] }
Response fields
Response Code—A standard HTTP response code.
Response Message—A standard HTTP response message.
Date—Standard HTML date format.
Content Type—The response format.
User Name—The username of the user whose details you updated.
Full Name—The full name of the user whose details you updated.
Groups—Groups of NDR appliance users that include the specified user.
Example
HTTP/1.1 100 Continue
HTTP/1.1 200 OK
Date: Tue, 24 Jan 2017 21:29:13 GMT
Content-Type: application/json; charset=utf-8
{
"username": "jdoe",
"name": "Jane Doe",
"groups": [
"klish"
]
}cURL code sample: Update a user
The code sample was run with cURL 7.57.0.
curl -k --user npadmin:hammerhead https://xxx.xxx.xxx.xxx/config/v1/users/jsmith -X PUT -d group=klish -d password=Tstatater@1234
This cURL sample includes the following options:
--user npadmin:hammerhead—Replacenpadminwith administrator username. Replacehammerheadwith administrator password.https://xxx.xxx.xxx.xxx/config/v1/users/jsmith—Replacexxx.xxx.xxx.xxxwith the IP address of your NDR appliance. Replacejsmithwith the user name of the user whose details you want to update.-k—This option explicitly allows cURL to perform insecure SSL connections and transfers, which allows you to test your SSL connection without installing a CA certificate.-X PUT—This option specifies using the PUT method.-d group=klish—Replace klish with the group to which you want to add the user.-d password=Tstatater@1234—Replace Tstatater@1234 with the password you wish to update for the user account.
Results
This example updates the password of the user and the groups to which the user belongs. The output is in JSON format.