Roles

Update a role

patch/roles/{id}

Request

  • Base URL
    https://api-staging.fanheroapi.com
  • URL
    https://api-staging.fanheroapi.com/roles/{id}
  • Auth
    API key in header apiKey

Request body

namestring

Role name

descriptionstring

Role description

publicboolean

If True, this role is available to all user, including those that are not logged it.

defaultboolean

If true, this user role is granted to any newly created organization.

permissionsstring[]

An array of permission IDs

Example request

{
  "name": "DEFAULT-USER",
  "description": "This role allows user basic functionalities",
  "default": true,
  "permissions": [
    "615c506f758c89a94f7652fa",
    "615c50757e2f119ae8ece09e"
  ]
}

Response

Role updated

idstring required

Role ID

namestring required

Role name

descriptionstring required

Role description

publicboolean required

If True, this role is available to all user, including those that are not logged it.

defaultboolean required

If True, this role is assigned to any newly created organization.

Example response

{
  "permissions": [
    {
      "subject": {
        "id": "896632c05f1a59b6d395b963",
        "fields": [
          "name",
          "address"
        ],
        "entity": "accountstatuses"
      }
    }
  ],
  "name": "DEFAULT-USER",
  "description": "This role allows user basic functionalities",
  "default": true
}

Changes

No recorded changes to this operation across all 1 revision of this API.