Patch API v1 role by ID

Changed on
patch/api/v1/role/{id}

Request

  • The document declares no server URL.
  • Auth: HTTP bearer

Path parameters

idstring required

Request body

$schemastring uri

A URL to the JSON Schema for this object.

namestring

Name of the role

Example request

{
  "$schema": "https://example.com/schemas/UpdateRoleRequest.json",
  "name": "moderator",
  "permissions": [
    {
      "action": "create",
      "resource": "sport"
    }
  ]
}

Response

OK

$schemastring uri

A URL to the JSON Schema for this object.

idstring required

ID of the role

namestring required

Name of the role

Example response

{
  "$schema": "https://example.com/schemas/RoleResponse.json",
  "id": "1",
  "name": "admin",
  "permissions": [
    {
      "$schema": "https://example.com/schemas/PermissionResponse.json",
      "action": "create",
      "id": "1",
      "resource": "user"
    }
  ]
}

Changes