/mgmt/config/default/UserGroup POST

Use the HTTP POST method with the /mgmt/config/default/UserGroup resource to add a new user group.

Resource URL

https://host:port/mgmt/config/default/UserGroup
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 group that you want to add. (The request will fail if a user group with this name already exists).
mAdminState
The admin state of the user, can be enabled or disabled.
UserSummary
An optional comment for the user group being defined, such as a description of the group (defaults to a blank string for a new user group if not specified).
AccessPolicies
One or more access policies that apply to the user group. Specify a single policy as a string. For example:
"AccessPolicies": "*/*/*?Access=r+w+a+d"
To specify multiple policies, specify comma-separated strings enclosed in square brackets. For example:
 "AccessPolicies": ["*/*/*?Access=r+w+a+d+x", "*/*/mgmt/rest-mgmt?Access=NONE"]
For more details about access policies, see Access policies.

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 group 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 group object created.

Examples

The following example requests that the user group NewGroup is created.

The following URL is used with the HTTP POST method:
POST /mgmt/config/default/User
The following listing shows the request:
{
  "UserGroup": {
    "name": "NewGroup",
    "mAdminState": "enabled",
    "UserSummary": "Added via REST call",
    "AccessPolicies": ["*/*/*?Access=r+w+a+d+x", "*/*/mgmt/rest-mgmt?Access=NONE"]
  }
}
After user group NewGroup is successfully created, the following response is returned:
{
  "_links": {
    "self": {
      "href": "/mgmt/config/default/UserGroup"
    }, 
    "doc": {
      "href" : "/mgmt/docs/config/UserGroup"
    }, 
    "location": {
      "href": "/mgmt/config/default/UserGroup/NewGroup"
    }
  },
  "NewGroup" : "Configuration was created."
}