/mgmt/config/default/User POST
Use the HTTP POST method with the /mgmt/config/default/User resource to
add a new administrative user.
Resource URL
https://host:port/mgmt/config/default/UserWhere
port is 5554 by default.Request headers
The following header must be sent with the request:
- Authorization
- This header must be sent to perform authentication.
Request body format
The request is in JSON format. It contains the following fields:
- Name
- String
- mAdminState
- The admin state of the user, can be
enabledordisabled.
- UserSummary
- An optional comment for the user being defined, such as a description of who they are (defaults to a blank string for a new user if not specified).
- AccessLevel
- The access level for the user. Can be either
privilegedorgroup-defined.
- GroupName
- The user group for the user. This parameter is only valid when the access level is
group-defined. It is a reference to an existing group object and is specified as a JSON object (see the example).
- SuppressPasswordChange
- Specify
offif you do not require the new user to create a new password the first time they log in. Specifyonotherwise. The default setting ison.
- Password
- The initial password for the user being created. The maximum length is 128 characters.
Security requirements
The caller must be authenticated as an appliance user with sufficient authority. For more information about security, see Types of user and how they are authenticated and User authorization, credential mapping, and access profiles.
Response status codes
- 201
- The user was created.
- 400
- Invalid data provided.
- 401
- Not authenticated.
- 403
- Not authorized.
Response headers
- Content-Type
- This header is returned with a value of
application/json.
Response body format
The response is in JSON format. Each object contains the following fields:
- self
- String.
- doc
- String.
- Location
- String.
Examples
The following example requests that the privileged user Alice is created.
The following URL is used with the HTTP POST
method:
POST /mgmt/config/default/UserThe following listing shows the request:
{
"User": {
"name": "alice",
"mAdminState": "enabled",
"UserSummary": "Alice",
"Password": "ABCD-12345-wxyz",
"AccessLevel": "privileged"
}
}
After user Alice is successfully created, the following response is
returned:{
"_links": {
"self": {
"href": "/mgmt/config/default/User"
},
"doc": {
"href" : "/mgmt/docs/config/User"
},
"location": {
"href": "/mgmt/config/default/User/alice"
}
},
"alice" : "Configuration was created."
}
The following example requests that a group-defined user named charlie is created. The user does not need to change their password at first login.
The following listing shows the request:
{
"User" : {
"name" : "charlie",
"mAdminState" : "enabled",
"UserSummary" : "Charlie",
"Password" : "ABCD-12345-wxyz",
"SuppressPasswordChange": "on",
"AccessLevel" : "group-defined",
"GroupName" : {
"value" : "mqadmin"
}
}
}