Add User

Add a user

MethodURL
POST/api/v1/users
Request Body
ParameterTypeExampleDescription
Users/user_namestringmyusername 
Users/passwordstring

mypassword

 
Users/activebooleantrue 
Users/adminbooleanfalseShould the user be an Ambari admin?
Request Body Example
{
    "Users/user_name": "myusername",
    "Users/password":  "mypassword",
    "Users/active": true,
    "Users/admin": false
}
Response
StatusBody
201NULL

Grant Privilege

Grant privileges to a user

MethodURL
POST/api/v1/users/username
Request Body Example
[ {
	"PrivilegeInfo": {
            "permission_name":"CLUSTER.READ",
            "principal_name":"myusername",
            "principal_type":"USER"
	}
} ]
Response
StatusBody
201NULL

Change Password

Change password

MethodURL
PUT/api/v1/users/username
Request Body Example
{
    "Users": {
        "user_name": "myusername",
        "old_password": "myoldpassword",
        "password": "mynewpassword"
	}
}
Response
StatusBody
200NULL
  • No labels