Skip to main content
POST
/
user
/
privilege-groups-and-resources
/
add-or-update
Add or Update User Privilege Groups And Resources
curl --request POST \
  --url https://apigw.bienport.com/api/user/privilege-groups-and-resources/add-or-update \
  --header 'Authorization: <authorization>' \
  --header 'Content-Type: application/json' \
  --header 'OrganizationId: <organizationid>' \
  --data '{
  "userId": 20199,
  "authorizedResourceIds": [
    170174
  ],
  "privilegeGroups": [
    {
      "privilegeGroupId": 1,
      "authorized": true
    }
  ],
  "organizationId": 31547,
  "expirationTime": 1644466338000,
  "period": [
    {
      "dayOfWeek": 1,
      "start": 125,
      "end": 126
    }
  ],
  "validityStart": 1645466338000
}'
[
  {
    "message": "<string>",
    "success": true
  }
]

Headers

Authorization
string
required

Access Token

OrganizationId
string
required

Organization ID

Body

application/json

addOrUpdateUserPrivilegeGroupRequest

userId
integer

(It can be blank only in user invite request.) User ID

Example:

20199

authorizedResourceIds
integer[]

(Required) Panels you want to be authorized.

Example:
[170174]
privilegeGroups
PrivilegeGroupAuthRequest · object[]

(Required) Access to privilege groups is determined. (Must be filled for all privilege groups.)

organizationId
integer

(Required) Organization ID

Example:

31547

expirationTime
integer

(Optional) Expiration time epoch millis value.

Example:

1644466338000

period
PrivilegeDayRequest · object[]

(Optional) Access day/time information for the privilege group. dayOfWeek: Value for which day of the week the user is authorized ( 1-7 ) start: Privilege start time ( Epoch Millis ) end: Privilege end time ( Epoch Millis )

Example:
[
{ "dayOfWeek": 1, "start": 125, "end": 126 }
]
validityStart
integer

(Optional) The epoch millis value of the date the authorization will start.

Example:

1645466338000

Response

SuccessResult with message.

message
string
success
boolean