Permissions Service

List Authorized Resources

POST
List all resources that the authenticated 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
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/listAuthorizedResources \
> -H "Authorization: Bearer <apiKey>" \
> -H "Content-Type: application/json" \
> -d '{
> "action": "READ"
>}'
Response
1{
2 "resources": [
3 {
4 "resourceId": "170NrBm0Do7gdzvr54UvyslPVWkQFOA0lgNycFmdZJQr",
5 "resourceType": "GOOGLE_DRIVE"
6 },
7 {
8 "resourceId": "123456",
9 "resourceType": "ZENDESK_TICKET"
10 }
11 ]
12}