Update management zones for user group
This API call updates management zone permissions for a single user group.
Authentication
To execute this request, you need the Service Provider API (ServiceProviderAPI
) permission assigned to your API token. Generate your API token via Cluster Management Console (CMC). To learn how to obtain and use it, see Cluster API - Authentication.
Endpoint
/api/v1.0/onpremise/groups/managementZones
Parameter
Parameter | Type | Description | In | Required |
---|---|---|---|---|
body | Mz | - | body | optional |
Request body objects
The MzPermissionsForGroup
object
Element | Type | Description | Required |
---|---|---|---|
groupId | string | Group ID | optional |
mzPermissionsPerEnvironment | Mz | List of management zone permissions per environment | optional |
The MzListForEnvironment
object
Element | Type | Description | Required |
---|---|---|---|
environmentUuid | string | Environment UUID | optional |
mzPermissions | Mz | List of management zone models with permissions | optional |
The MzPermissionsList
object
Element | Type | Description | Required |
---|---|---|---|
mzId | string | The ID of the required management zone | optional |
permissions | string[] | The list of permissions for the required management zone | optional |
Request body JSON model
This is a model of the request body, showing the possible elements. It has to be adjusted for usage in an actual request.
{
"groupId": "string",
"mzPermissionsPerEnvironment": [
{
"environmentUuid": "string",
"mzPermissions": [
{
"mzId": "string",
"permissions": [
"DEMO_USER"
]
}
]
}
]
}
Response
Response codes
Code | Description |
---|---|
200 | Successfully updated |
400 | Provided model is incorrect or is missing required elements |
404 | A group, environment or management zone does not exist |
510 | Operation failed |
Example
In this example, you update the salesgroup
user group to assign permissions to 5c6cf54c-5fe3-47e8-af18-54439090370b
environment's
management zones.
Curl
curl -X 'PUT' \
'https://mymanaged.cluster.com/api/v1.0/onpremise/groups/managementZones' \
-H 'accept: */*' \
-H 'Authorization: Api-Token FG563.LKJHDFLKJHDFHLKJDGV.ABCDEFGHJKLMNOP' \
-H 'Content-Type: application/json' \
-d '{
"groupId": "salesgroup",
"mzPermissionsPerEnvironment": [
{
"environmentUuid": "5c6cf54c-5fe3-47e8-af18-54439090370b",
"mzPermissions": [
{
"mzId": "-3223778520145835472",
"permissions": [
"REPLAY_SESSION_DATA",
"VIEWER",
"MANAGE_SECURITY_PROBLEMS",
"REPLAY_SESSION_DATA_WITHOUT_MASKING"
]
}
]
}
]
}'
Request URL
https://mymanaged.cluster.com/api/v1.0/onpremise/groups/managementZones
Response body
No response body
Response code
200