Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3

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
Code Block
{
    "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
Code Block
[ {
	"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
Code Block
{
    "Users": {
        "user_name": "myusername",
        "old_password": "myoldpassword",
        "password": "mynewpassword"
	}
}
Response
StatusBody
200NULL