Looking for a query to get AF values by passing time range.
You might want to take a look at this excellent post by Glenn
PI Web API query examples
and our LiveLibrary online reference guide:
PI Web API
Once you get WebID then you can request via asking
Please refer to this blog post or this one for making bulk calls in order to get compressed values from multiple streams with a single HTTP request.
Hope it helps!
Retrieving data ...