Permissions Service

Check Bulk Resources Authorization For User

Beta
POST
Admin endpoint to check whether the specified user is authorized to read the specified set of resources.

Request

This endpoint expects an object.
resourceIdentifiers
list of unionsRequired
The set of resource identifier for which you want to check authorization. Currently limited to 20 resources.
userEmail
stringRequired
The user email to check authorization for.
disableCache
booleanOptional
If specified, Credal will bypass the permissions cache and check current permissions for all resources specified.

Response

This endpoint returns a list of objects
resourceIdentifier
union
authorized
boolean
POST
1curl -X POST https://api.credal.ai/api/v0/permissions/checkBulkResourcesAuthorizationForUser \
2 -H "Authorization: Bearer <apiKey>" \
3 -H "Content-Type: application/json" \
4 -d '{
5 "resourceIdentifiers": [
6 {
7 "type": "external-resource-id",
8 "externalResourceId": "170NrBm0Do7gdzvr54UvyslPVWkQFOA0lgNycFmdZJQr",
9 "resourceType": "GOOGLE_DRIVE_ITEM"
10 },
11 {
12 "type": "external-resource-id",
13 "externalResourceId": "sfsdfvr54UvyslPVWkQFOA0dfsdfsdflgNycFmdZJQr",
14 "resourceType": "ZENDESK_TICKET"
15 }
16 ],
17 "userEmail": "john.smith@foo.com"
18}'
200
Successful
1[
2 {
3 "resourceIdentifier": {
4 "type": "external-resource-id",
5 "externalResourceId": "170NrBm0Do7gdzvr54UvyslPVWkQFOA0lgNycFmdZJQr",
6 "resourceType": "GOOGLE_DRIVE_ITEM"
7 },
8 "authorized": true
9 },
10 {
11 "resourceIdentifier": {
12 "type": "external-resource-id",
13 "externalResourceId": "sfsdfvr54UvyslPVWkQFOA0dfsdfsdflgNycFmdZJQr",
14 "resourceType": "ZENDESK_TICKET"
15 },
16 "authorized": true
17 }
18]