/mgmt/config/default/UserGroup/name PUT
Use the HTTP PUT method with the
/mgmt/config/default/UserGroup/name
resource to add or amend a
user group.
Resource URL
https://host:port/mgmt/config/default/UserGroup/name
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
- This must be the same name as specified in the resource URL, you cannot use this resource to change the object name.
- mAdminState
- The admin state of the user group, 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
- 200
- An existing user group was successfully updated.
- 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 Group66 is created.
The following URL is used with the HTTP PUT
method:
PUT /mgmt/config/default/User/Group66
The following listing shows the request:
{
"UserGroup": {
"name": "Group66",
"mAdminState": "enabled",
"UserSummary": "another group created with REST",
"AccessPolicies": "*/*/*?Access=r+w"
}
}
After user Group66 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/Group66"
}
},
"Group66" : "Configuration was created."
}