Description | Update a specific user. |
Resource Path | /users |
HTTP Method | PUT |
Request/Response Format | application/json |
The user's username can not be changed in the updating process.
{ "userName": "kim", "credential": "kim12345", "role": "admin", "firstName": "Frank", "lastName": "Myers", "email": "foo@bar.com" }
For information on all the properties that can be used in a user definition, see the User Resource Definition.
> PUT /api/users HTTP/1.1
> Authorization: Basic YWRtaW46YWRtaW4=
> User-Agent: curl/7.24.0 (x86_64-apple-darwin12.0) libcurl/7.24.0 OpenSSL/0.9.8| zlib/1.2.5
> Host: localhost:9443
> Accept: */*
> Content-Type: application/json
> Content-Length: 134
>
* upload completely sent off: 134 out of 134 bytes
< HTTP/1.1 200 OK
< Date: Tue, 17 Mar 2015 12:55:10 GMT
< Content-Type: application/json
< Transfer-Encoding: chunked
< Server: WSO2 Carbon Server
<
{"status":"success","message":"User updated successfully: [user] jim"}
curl -X PUT -H "Content-Type: application/json" -d @'<JSON_PAYLOAD>' -k -v -u admin:admin https://<STRATOS_HOST>:<STRATOS_HTTPS_PORT>/api/users
<JSON_PAYLOAD>
value.
<STRATOS_HOST>
is localhost.
However, if you are using a public IP, the respective IP address or domain needs to be specified.<STRATOS_HTTPS_PORT>
has been set to 9443. However, if the port offset has been incremented by n
, the default port value needs to be incremented by n
.
CLI command | update-user |
Description | Update a specific user. |
Command format | update-user -u <USERNAME> -p <PASSWORD> -r <ROLE_NAME> -f <FIRST_NAME> -l <LAST_NAME> -e <EMAIL> -pr <PROFILE_NAME> |
HTTP status code | 200, 404, 500 See the descriptions of the HTTP status codes here. |