Observations API Upper limit?

I’m querying the Observations API to look for the next X passes for my station, so I can pre-set my rotator. I use the ‘future’ filter, with a URL like follows:

https://network.satnogs.org/api/observations/?ground_station=232&status=future

Unfortunately, it seems this only returns the ‘last’ 25 observations, where ‘last’ means the ones furthest into the future! As a result, my script thinks the next observation is way into the future and starts turning the rotator to point to the wrong position!

So… how do I query the ‘next’ X observations?

In the headers of the response in the initial request, if there are more than 25 results there is header Link with the link to the next page, for example in the link you pasted there is http://network.satnogs.org/api/observations/?ground_station=232&page=2&status=future.

1 Like

My solution is here: satnogs-unwinder/unwind.py at master · darksidelemm/satnogs-unwinder · GitHub

Thankfully requests can deal with the oddly formatted ‘Link’ header entry and give me something useful.
This would have all been avoided if I could requests the results in ‘ascending’ order of observation ID - currently it’s in descending order, with the highest numbered (usually furthest in the future) observation first, hence causing my issues.

1 Like

How about setting the end parameter to 1 day in the future as an (incomplete) workaround? That would make the list shorter in case observations are scheduled far in the future.

I’m getting Internal Server Error whenever I set end to something though. Will check why when I’m at a computer.

That still doesn’t work, as I had > 25 observations scheduled up within the next ~6 hours or so.