/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
- mAdminState
- The admin state of the user, can be
enabled
ordisabled
.
- 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"
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.
- 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 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."
}