Add User
Add a user
Method | URL |
---|
POST | /api/v1/users |
Request Body
Parameter | Type | Example | Description |
---|
Users/user_name | string | myusername | |
Users/password | string | mypassword | |
Users/active | boolean | true | |
Users/admin | boolean | false | Should the user be an Ambari admin? |
Request Body Example
Code Block |
---|
{
"Users/user_name": "myusername",
"Users/password": "mypassword",
"Users/active": true,
"Users/admin": false
} |
Response
Grant Privilege
Grant privileges to a user
Method | URL |
---|
POST | /api/v1/users/username |
Request Body Example
Code Block |
---|
[ {
"PrivilegeInfo": {
"permission_name":"CLUSTER.READ",
"principal_name":"myusername",
"principal_type":"USER"
}
} ] |
Response
Change Password
Change password
Method | URL |
---|
PUT | /api/v1/users/username |
Request Body Example
Code Block |
---|
{
"Users": {
"user_name": "myusername",
"old_password": "myoldpassword",
"password": "mynewpassword"
}
} |
Response