Remove Bulk Members from Role Developing
Run in Apidog
Removes multiple users from a role in a single operation. Can be used to remove a single user by passing an array with one ID. Returns the count of successfully removed members.
Request Body Params application/json
{
"userIds" : [
"da6bdcdfcd145ce505c9a7bd" ,
"2f8d337dd3c4abed67d8738b" ,
"dcfadcb9f294d3d629ce4bba"
]
} Request Code Samples
curl --location -g --request DELETE 'https://sims.sman1samarinda.sch.id/api/roles/{{$database.mongodbObjectId}}/members' \
--header 'Content-Type: application/json' \
--data-raw '{
"userIds": [
"da6bdcdfcd145ce505c9a7bd",
"2f8d337dd3c4abed67d8738b",
"dcfadcb9f294d3d629ce4bba"
]
}' Responses application/json Generate Code
{
"success" : true ,
"message" : "OK." ,
"meta" : {
"page" : 11 ,
"limit" : 2 ,
"total" : 2212
} ,
"errors" : [ ] ,
"result" : {
"removed" : 2
}
}
Modified at 2026-01-09 06:32:50