This is a Good question, and you raise a good point.
There is not a good way to query dependencies via the Apigee edge Management API. I think of the Edge data as a graph, and it would be really nice to be able to query it via something like graphQL. That would provide a good, flexible query capability that would satisfy thew general requirement you described.
BUT, even today, while there are no GOOD options, there are options.
Brute force is an option.
The way to do it is to examine each proxy for all proxy endpoints and target endpoints, and examine the flows there to look for references to a FlowCallout policy that specifically references your target sharedflow. To be complete, You’d also need to consider all revisions of each proxy. But maybe you want to examine only the latest revision.
Either way, the approach requires a bunch of distinct API calls (hence it is not a GOOD way to query) but it does work.
For a good example of how this works, you can see this script:
https://github.com/DinoChiesa/apigee-edge-js/blob/master/examples/findPoliciesWithKvmAccess.js
…which relies on a JS wrapper of the Apigee Edge Admin APIs to look for KVM policies, or… to look for KVM policies that connect to a specific, named KVM map.
Using that as a model, It should be pretty easy to build a similar script to look for FlowCallouts, or target alias. . .
EDIT
Here’s a script to find flow callouts.
https://github.com/DinoChiesa/apigee-edge-js/blob/master/examples/findFlowCallouts.js