https://flyte.org logo
#announcements
Title
# announcements
a

Alex Pozimenko

05/02/2022, 6:17 PM
hi team, is it possible to get recent failed executions across all projects using flyte admin api?
k

katrina

05/02/2022, 11:01 PM
yes you can filter by updated_at timestamp and phase, check out the detailed instructions here: https://docs.flyte.org/en/latest/concepts/admin.html#adding-request-filters
a

Alex Pozimenko

05/04/2022, 9:12 PM
thanks @katrina. Are there any sample queries? I tried adminhttp API and flytectl, but both seem to require project and domain:
Copy code
<https://avflyteadminhttp.pdx.l5.woven-planet.tech/api/v1/executions/avbasemap/dev?filters=value_in(phase,FAILED)&token=&limit=100&sort_by.direction=DESCENDING&sort_by.key=created_at>
Copy code
flytectl get execution -p avflytesim -d prod --admin.endpoint avflyteadmin.pdx.l5.woven-planet.tech:443 --filter.fieldSelector="phase=FAILED" --filter.limit=10 --filter.sortBy=updated_at
k

katrina

05/04/2022, 9:14 PM
ah sorry I missed that. all the control plane entities are scoped by project and domain, but you can programmatically get the list of project-domain combos by querying the projects endpoint: https://github.com/flyteorg/flyteidl/blob/master/protos/flyteidl/service/admin.proto#L389
👍 1
a

Alex Pozimenko

05/05/2022, 11:38 PM
another question. So I'm able to get FAILED executions using this query:
Copy code
curl -s <https://avflyteadminhttp>.../api/v1/executions/project/prod?filters=value_in(phase,FAILED)&limit=5&sort_by.direction=DESCENDING&sort_by.key=updated_at
is there a way to add error kind to the filter? If I add
closure.error.kind
I get this error:
failed database operation with column executions.kind does not exist"
k

katrina

05/06/2022, 12:12 AM
ah you can filter by error_kind (sorry this should be added to the docs!)
a

Alex Pozimenko

05/09/2022, 7:14 PM
this worked, thanks!
73 Views