/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/User
Where 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
The name of the user that you want to add. (The request will fail if a user with this name already exists).
mAdminState
The admin state of the user, can be enabled or disabled.
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 privileged or group-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 off if you do not require the new user to create a new password the first time they log in. Specify on otherwise. The default setting is on.
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.
The caller must be authenticated as an appliance user. See Types of user and how they are authenticated for more information.
403
Not authorized.
The caller is authenticated but does not the authority to perform this action. See User authorization, credential mapping, and access profiles for more information.

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.
The URL of the POST request.
doc
String.
Not currently used.
Location
String.
The URI of the user object created.

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/User
The 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"
    }
  }
}