Hi,
On Tue, 27 Dec 2016, John Reyes wrote:
> I'm running into an issue with the API not returning all results. If I query like this:
>
> but if I query this:
>
>
http://api.aprs.fi/api/get?name=SARRT7-i&what=loc&apikey=[API KEY]&format=json
>
> I get this even though I can search for it through the web interface:
>
> {"command":"get","result":"ok","what":"loc","found":0,"entries":[]}
> Does anyone know what would cause one callsign to show up via the API but not another?
The catch here is that SARRT7-i is a "web station", and the names of those
are not unique, much like the names of AIS vessels. There can be multiple
SARRT7-i's out there, and the api/get endpoint is for getting information
about a specific station, not for searching stations.
When you look up SARRT7-i on the web site and browse around, you'll notice
the web site URLs refer to it as w/
3397515266, which is an unique
identifier for that station, and it'll continue to work even if you
*rename* that station to SARRT9-Ö later on. Also, if someone else decides
to beacon as SARRT7-i using the app at the same tiem, their positions will
not be interfering with yours.
http://aprs.fi/info/w/3397515266
http://aprs.fi/#!call=w%2F3397515266&timerange=3600&tail=3600
So, try name=w%2F3397515266 instead (note, URL parameter encoding for the
'/' of course).
This is a bit of a FAQ item, a few people have asked along the lines of
"I'm trying to use the API try fetch the position of the boat named
VIKING" (
http://aprs.fi/#!call=viking). For AIS, they need to use the MMSI
number to query as it is a bit more unique.
- Hessu