Updating a role

POST https://{{base_url}}/v6/roles/{{roleId}}/update.json

Updating a role

Modifies a user-defined role by changing the role name or permissions assigned.

Optional (querystring) Parameters

  • format=json|xml optional, specifies the format of output requested. See Output Formats for more information
  • aid={aid} optional, changes the account group context of the current request. If an invalid account group ID is specified as a parameter, the response will come back as an HTTP/400 error

Request

  • {roleId} is the unique ID for the role
  • content-type and accept headers must be set (both to application/json) when using this endpoint.
  • Request body allows update of certain role fields:
    • roleName string optional the name of the role
    • permissions list of permission objects optional see below (and notes below)
    • permissions.permissionId integer required for permissions object system-defined unique ID of the permission

A few notes related to role modifications: * The full list of permissions must be sent, this endpoint does not support a delta-based grant or revocation of permissions. * Permission definitions and details can be obtained from the permissions endpoint.

Request Body

{"roleName"=>"Postman DevNet role", "permissions"=>[{"permissionId"=>1}, {"permissionId"=>2}]}

HEADERS

KeyDatatypeRequiredDescription
Content-Typestring
Acceptstring