https://prefect.io logo
Title
t

Tony Piazza

01/27/2023, 10:33 PM
Not obvious how I get the current status of a flow run via the REST API
z

Zanie

01/27/2023, 10:34 PM
Using the Python client or another HTTP client?
t

Tony Piazza

01/27/2023, 10:34 PM
Another client
So I need raw request
j

James Gatter

01/27/2023, 10:35 PM
I did this in curl:
curl -X GET \
    -H "Accept: application/json" \
    -H "Content-Type: application/json" \
    <http://127.0.0.1:4200/api/health>
Ah sorry that's for my Orion instance, not a flow
z

Zanie

01/27/2023, 10:36 PM
If you’re running the API locally, it’s easy to view the documentation at http://localhost:4200/api/docs
The state is attached to the returned flow run, presumably you’re interested in the state’s type which is an enum.
t

Tony Piazza

01/27/2023, 10:38 PM
We need this on the front end to query the state of the flow launched via a deployment
This is exactly what I needed. Thanks @Zanie and @James Gatter for your fast response. Have an awesome weekend!