Skip to content

UpdateRoleOptions

Luis Huertas edited this page Feb 7, 2022 · 1 revision

Update the options of a role

Updates the options where the role is allowed to access

Base Url : http://your-app-base-url.com

Endpoint : /auth/role/:id/option

Method : PUT

Auth required : Yes

header key header value description
Authorization BEARER jwtToken access_token generated using /token

Permissions required : Access string 'OAUTH2_client:update'

Request

type: body

{
  "newAllowedObject": {
    "somePart": [{ "id": 1 }, { "id": 2 }]
  },
  "originalAllowedObject": {
    "somePart": [{ "id": 2 }]
  }
}

Request Fields Description

key value description
newAllowedObject Object An object where the keys are the name of the application parts an each key equals to an array of objects with the id of an option, for the new role options
originalAllowedObject Object An object where the keys are the name of the application parts an each key equals to an array of objects with the id of an option, for the original role options

Response

{
  "code": 200001,
  "message": "Role options updated"
}

Response Fields Description

key value description
code 200001 result code
message Role options updated result message

Response codes

  • If response is success, http status will be 201 and code in body will be 200001
code description
500000 Not categorized error
200001 Role options were updated
Clone this wiki locally