Permissions Service

List Cached Authorized Resources For User

Beta
POST
Admin endpoint to list all resources that the specified user is authorized to read. Note this endpoint returns cached results and may not be up-to-date. You can use the checkResourceAuthorizationForUser endpoint with disableCache set to true to get the most up-to-date results.

Request

This endpoint expects an object.
userEmail
stringRequired
The user email to list authorized resources for.
resourceType
enumOptional
The type of resource you want to list. If not specified, all resource types will be listed.
limit
integerOptional
The maximum number of resources to return. Defaults to 100.
offset
integerOptional
The offset to use for pagination. If not specified, the first page of results will be returned.

Response

This endpoint returns an object
resources
list of unions
POST
1curl -X POST https://api.credal.ai/api/v0/permissions/listCachedAuthorizedResourcesForUser \
2 -H "Authorization: Bearer <apiKey>" \
3 -H "Content-Type: application/json" \
4 -d '{
5 "userEmail": "john.smith@foo.com"
6}'
200
Successful
1{
2 "resources": [
3 {
4 "type": "external-resource-id",
5 "externalResourceId": "170NrBm0Do7gdzvr54UvyslPVWkQFOA0lgNycFmdZJQr",
6 "resourceType": "GOOGLE_DRIVE_ITEM"
7 },
8 {
9 "type": "external-resource-id",
10 "externalResourceId": "123456",
11 "resourceType": "ZENDESK_TICKET"
12 }
13 ]
14}