It seems like the Prefect documentation doesn't directly answer your question about querying the REST API for the flow run success rate shown on the dashboard. However, it does mention that metrics are aggregated views of events running through Prefect and can be used to monitor various statistical data such as success rates.
To get a more direct answer to your question, I would suggest approaching the Prefect community, asking for specifics about accessing these metrics through the API. Unfortunately, I couldn't find a specific REST API endpoint for your exact requirement in the documentation provided. You might wish to look into the GraphQL API, which could potentially be used to fetch this information by querying flow and task run data.
For further assistance, you might want to reach out to Prefect support at
help@prefect.io or explore their
changelog on metrics for more information on the topic.