Permissions Service

Check Resource Authorization For User

Beta
POST
Admin endpoint to check whether the specified user is authorized to read the specified resource.

Request

This endpoint expects an object.
resourceIdentifier
unionRequired
The resource identifier for which you want to check authorization.
userEmail
stringRequired
The user email to check authorization for.
disableCache
booleanOptional
If specified, Credal will bypass the permissions cache and check current permissions for this resource

Response

This endpoint returns an object
authorized
boolean
POST
1curl -X POST https://api.credal.ai/api/v0/permissions/checkResourceAuthorizationForUser \
2 -H "Authorization: Bearer <apiKey>" \
3 -H "Content-Type: application/json" \
4 -d '{
5 "resourceIdentifier": {
6 "type": "external-resource-id",
7 "externalResourceId": "170NrBm0Do7gdzvr54UvyslPVWkQFOA0lgNycFmdZJQr",
8 "resourceType": "GOOGLE_DRIVE_ITEM"
9 },
10 "userEmail": "john.smith@foo.com"
11}'
200
Successful
1{
2 "authorized": true
3}