Update Role

Update Role

Updates a role with a given ID. You can update the assigned groups and accounts, management properties, permissions, ID, name, and description.

Request
URI
PUT
https://{api_host}/api/v2/role/{id}
COPY
Path Parameters
string
id
Required

The ID of the role to update. If you don't know the role's ID, run the Get all roles API call to return all roles and their IDs.


Request Body

You can first run the Get a role by ID API call, and then you can copy and edit the response body. An example body for a role with all permissions:

{
  "id": "Role_ID",
  "name": "Role_name",
  "permissions": [
     "agent_management", "alerts_management",
     "application_management", "batch_query_priority",
     "derived_metrics_management", "dashboard_management",
     "embedded_charts", "events_management",
     "external_links_management", "host_tag_management",
     "ingestion", "metrics_management",
     "monitored_application_service_management", "saml_sso_management",
     "token_management", "user_management"
  ],
  "description": "Role_description"
}
RoleUpdateDTO of type(s) application/json
Required
{
    "permissions": [
        "string"
    ],
    "name": "string",
    "id": "string",
    "description": "string"
}
array of string
permissions
Optional

List of permissions the role has been granted access to

string
name
Optional

The name of the role

string
id
Optional

The unique identifier of the role

string
description
Optional

The description of the role

Authentication
This operation uses the following authentication methods.
Responses
200

successful operation

Returns ResponseContainerRoleDTO of type(s) application/json
{
    "status": {
        "result": "string",
        "message": "string",
        "code": 0
    },
    "response": {
        "sampleLinkedGroups": [
            "UserGroup Object"
        ],
        "linkedGroupsCount": 0,
        "sampleLinkedAccounts": [
            "string"
        ],
        "linkedAccountsCount": 0,
        "restrictedPermissions": [
            "string"
        ],
        "properties": {
            "nameEditable": false,
            "usersRemovable": false,
            "usersAddable": false,
            "permsEditable": false,
            "deletable": false
        },
        "permissions": [
            "string"
        ],
        "name": "string",
        "id": "string",
        "description": "string",
        "createdEpochMillis": 0,
        "lastUpdatedMs": 0,
        "lastUpdatedAccountId": "string",
        "customer": "string"
    }
}
status
Required

status

response
Optional

response