Permissions Service

List Authorized Resources For User

POST
Admin endpoint to list all resources that the specified user is authorized to perform the specified action on.

Request

This endpoint expects an object.
action
enumRequired
The action you want to perform on the resources.
Allowed values: READ
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.
pageSize
integerOptional
The maximum number of resources to return. Defaults to 10.
pageToken
stringOptional
A token provided by the server to request the next page of resources. If not specified, the first page of results will be returned.

Response

This endpoint returns an object
resources
list of objects
nextPageToken
stringOptional
POST
$curl -X POST https://api.credal.ai/api/v0/permissions/listAuthorizedResourcesForUser \
> -H "Authorization: Bearer <apiKey>" \
> -H "Content-Type: application/json" \
> -d '{
> "action": "READ",
> "userEmail": "john.smith@foo.com"
>}'
Response
1{
2 "resources": [
3 {
4 "resourceId": "170NrBm0Do7gdzvr54UvyslPVWkQFOA0lgNycFmdZJQr",
5 "resourceType": "GOOGLE_DRIVE"
6 },
7 {
8 "resourceId": "123456",
9 "resourceType": "ZENDESK_TICKET"
10 }
11 ]
12}