Search documentation
karat

+

K

User Documentation ↗
Version 2.0

List Executions Resource

POST/api/v2/observability/resources/{resourceRid}/listExecutions
Warning

This endpoint is in preview and may be modified or removed at any time. To use this endpoint, add preview=true to the request query parameters.

List recent executions (function runs, automation runs, etc.) for a given resource. Returns execution summaries ordered by most recent first. Only completed executions are included in the results.

If neither startTime nor endTime is specified, executions from the last 24 hours are returned.

Third-party applications using this endpoint via OAuth2 must request the following operation scope: api:observability-read.

Path parameters

resourceRid
string

The Resource Identifier (RID) of the Foundry resource.

Query parameters

preview
booleanoptional

Enables the use of preview functionality.

Request body

ListExecutionsResourceRequest
object
Hide child attributes

Hide child attributes

startTime
stringoptional

Return executions that started at or after this time. Defaults to 24 hours ago.

endTime
stringoptional

Return executions that started before this time (exclusive). Defaults to now.

where
unionoptional

Optional filter to narrow the execution results.

Show child attributes

Show child attributes

pageSize
integeroptional

The maximum number of executions to return per page. Maximum value is 100.

pageToken
stringoptional

A token to retrieve the next page of results from a previous request.

Response body

ListExecutionsResponse
object

A page of execution results.

Hide child attributes

Hide child attributes

data
list<Execution>optional

The list of executions matching the query.

Show child attributes

Show child attributes

nextPageToken
stringoptional

The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the nextPageToken field of the previous response and use it to populate the pageToken field of the next request.

Examples

Request

Copied!
1 2 3 4 5 curl -X POST \ \t-H "Content-type: application/json" \ \t-H "Authorization: Bearer $TOKEN" \ "https://$HOSTNAME/api/v2/observability/resources/ri.function-registry.main.function.c26f11c8-cdb3-4f44-9f5d-9816ea1c82da/listExecutions?preview=true" \ -d '{"pageSize":100,"pageToken":"v1.QnVpbGQgdGhlIEZ1dHVyZTogaHR0cHM6Ly93d3cucGFsYW50aXIuY29tL2NhcmVlcnMvP2xldmVyLXNvdXJjZSU1YiU1ZD1BUElEb2NzI29wZW4tcG9zaXRpb25z"}'

Response

Copied!
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 { "data": [ { "duration": { "unit": "SECONDS", "value": 30 }, "foundryTraceId": "1f168a0f-8f5a-648c-8ce4-21d9f1ce17c2", "resourceVersion": "1.2.0", "failureReason": "timeout", "traceOwningRid": "ri.object-sentinel.main.monitor.f7c14421-54f4-4e9f-b6f2-1971b79d612b", "resourceRid": "ri.function-registry.main.function.c26f11c8-cdb3-4f44-9f5d-9816ea1c82da", "startTime": "2024-09-25T17:29:35.974Z", "callerRid": "ri.workshop.main.module.f1e2d3c4-b5a6-7890-1234-567890abcdef", "status": "SUCCEEDED" } ], "nextPageToken": "v1.QnVpbGQgdGhlIEZ1dHVyZTogaHR0cHM6Ly93d3cucGFsYW50aXIuY29tL2NhcmVlcnMvP2xldmVyLXNvdXJjZSU1YiU1ZD1BUElEb2NzI29wZW4tcG9zaXRpb25z" }

Error responses

Error Name
InvalidExecutionFilterError CodeINVALID_ARGUMENT
Status Code400
DescriptionThe provided execution filter is invalid. This may be due to missing required fields or other malformed filter parameters.
Parameters
ListExecutionsPermissionDeniedError CodePERMISSION_DENIED
Status Code403
DescriptionThe provided token does not have permission to list executions for this resource.
ParametersresourceRid
ListExecutionsResourcePermissionDeniedError CodePERMISSION_DENIED
Status Code403
DescriptionCould not listExecutions the Resource.
ParametersresourceRid
ResourceNotFoundError CodeNOT_FOUND
Status Code404
DescriptionThe given Resource could not be found.
ParametersresourceRid