Update a data node user: Request

Prev Next

To update a data node user with details such as password and groups to which the user belongs, send the following request:

PUT https://<IA_director_node_IP_address>/config/v1/users/<user>\n

Note

To use this request, you must belong to the sudo group.

Required header:

--user <username>:<password>

Request body:

{\nname: 'TEXT',\ngroup: 'TEXT',\nia: 'string'\n}

Options

  • IA_director_node_IP_address—IP address of the director node NDR appliance running the NDR API.

  • username—Administrator username for the director node.

  • password—Administrator password for the director node.

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.

  • ia (query parameter)—The IP address of a data node whose user you wish to update. You can also specify multiple IP addresses to update the details of the specified user that is also a user across other data nodes.

Example

PUT https://xxx.xxx.xxx.xxx/config/v1/users/JDoe

Required header:

--user npadmin:hammerhead

Request body:

{\n   group: klish,\n   password: Tstatater@1234,  \n   ia: yyy.yyy.yyy.yy,\n   ia: zzz.zzz.zzz.zz\n}

Update a data node user: Response

HTTP/1.1 [Response Code] [Response Message]\nDate: [Date]\nContent-Type: [Content Type]\n\nusername: [User Name]\nname: [Full Name]\t\t\ngroups: [Groups]\n}

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\n\nHTTP/1.1 200 OK\nDate: Tue, 24 Jan 2017 21:29:13 GMT\nContent-Type: application/json; charset=utf-8\n\n{\n   "username": "jdoe",\n   "name": "Jane Doe",\n   "groups": [\n\t"klish"\n   ]\n},\n{\n   "username": "jdoe",\n   "name": "Jane Doe",\n   "groups": [\n\t"klish"\n   ]\n}

cURL code sample: Update a data node 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 \npassword=Tstatater@1234 -d ia="yy.yyy.yy.yyy" -d ia="zz.zzz.zz.zzz"

This cURL sample includes the following options:

  • -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.

  • --user npadmin:hammerhead—Replace npadmin with the administrator username for the director node. Replace hammerhead with the corresponding administrator password for the director node.

  • https://xxx.xxx.xxx.xxx/config/v1/users/jsmith—Replace xxx.xxx.xxx.xxx with the IP address of the director node NDR appliance. Replace jsmith with the user name of the user whose details you want to update.

  • -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.

  • d ia="yy.yyy.yy.yyy" -d ia="yy.yyy.yy.yyy—Replace yy.yyy.yy.yyy and zz.zzz.zz.zzz with IP addresses of the data nodes to update the details of the specified user for both NDR data nodes.

Results

This example updates the password of the user and the groups to which the user belongs. The output is in JSON format.