Remove role permissions
Removes permissions mapped to a role, if no permissions are passed all permissions mapped to the role are removed
POST
/appid-{appId}/recipe/role/permissions/removeAuthorization
api-keyAPI key · headerrequiredThe core service API token. If you are using a self-hosted core service and you have not generated a token, you can omit the header.
Header parameters
ridstringcdi-versionstringX.Y of the X.Y.Z CDI version.
Request body
application/jsonrolerolerequiredpermissionsstring[]Responses
200The operation was successful
One of:
object
statusstatusOKAllowed:
OKunknownRoleResponse
statusstringAllowed:
UNKNOWN_ROLE_ERROR400error code 400
string401error code 401
string404error code 404
string500error code 500
stringTry it
Server
Authorization
Parameters
Bodyapplication/json
Request
curl -X POST "/appid-{appId}/recipe/role/permissions/remove" \
-H "api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"role": "admin",
"permissions": [
"permission"
]
}'const response = await fetch("/appid-{appId}/recipe/role/permissions/remove", {
method: "POST",
headers: {
"api-key": "YOUR_API_KEY",
"Content-Type": "application/json"
},
body: JSON.stringify({
"role": "admin",
"permissions": [
"permission"
]
})
});import requests
response = requests.post(
"/appid-{appId}/recipe/role/permissions/remove",
headers={
"api-key": "YOUR_API_KEY",
"Content-Type": "application/json"
},
json={
"role": "admin",
"permissions": [
"permission"
]
},
)Response
{
"status": "OK"
}"string""Invalid API key""Not Found""Internal Error"