Is there any API etiquette or policy?

Affiliation
Svensk Amator Astronomisk Forening, variabelsektionen (Sweden) (SAAF)
Thu, 03/22/2018 - 09:57

Hi,

I wrote a few programs that interact with AAVSO's API's. One of them downloads observations from the stars in my observing program and plots light curves for them; another checks whether a given star is within the range of my instruments; and another requests a chart if there is none in my computer for a given star.

I wouldn't like my programs to behave in a way that can be considered rude to AAVSO's servers, and even less that they could will be blocked if classified as malicious robots (they aren't). I therefore wonder if AAVSO has an API policy in place for this type of requests. I would gladly implement any restriction you may have on access frequency, etc.

Thanks in advance

Hernán

 

Affiliation
American Association of Variable Star Observers (AAVSO)
API Policy

Hernán,

This is an excellent question. Thank you!

- The API's are published/documented in the https://www.aavso.org/apis-aavso-resources thread to encourage members to use them, to write useful applications. Please share these applications in the forums and we can explore hosting their distribution from the AAVSO website.

- Software developers are encouraged to subscribe to the above thread and also the Developer Announcements thread ( https://www.aavso.org/introducing-software-developer-announcements ). The DevAnn mechanism will be used to announce changes to API's that might break software that is dependent.

- Issues of use/abuse? The guide is: be reasonable. Don't create a load/problem to the AAVSO servers. For instance, HQ is trying to track down the use of an APASS access API that is being called over 20,000 times a month. That is probably a bit much.

- I would encourage code that is calling an API include a URL tag like "&caller=" where the caller identifies the application doing the calling. That would help us track use.

Let's discuss this topic and see if we can formalize a rule like the &caller string.

And keep on programming!

Cheers,
George

Affiliation
Svensk Amator Astronomisk Forening, variabelsektionen (Sweden) (SAAF)
API policy

Thanks you for your answer, George.

Regarding my programs: I will gladly share my code with anyone, just with the caveat that these programs are rather simple Perl scripts and not anything too elaborate with advanced GUIs. They are also written to interact with my logging database (whose basic design and code you can find here, but this needs to be updated too) and are therefore pretty idiosyncratic. I can certainly post the code in the above repository (figshare).

A crude estimate of the upper limit for how often my programs make calls to the API is somewhere between 1000-2500 times a month (*). If this is too much just tell me. A way to control the load to the servers would be to put limits to the frequency of requests, or how long a delay should be between each request.

I believe the "&caller" tag is a useful thing. Would you think one can use her/is observer code, for example, or something more elaborate like an API key? This is an important consideration and may lead to a broader discussion about the concept of "open data", licenses and how to manage and distribute data that is crowdsourced like AAVSO's. Perhaps there is already a body of discussion about this and I just do not know about it. Thankful for any reference.

Best,

Hernán

 

(*) For each of the the ~80 stars in my program, the observability planning script calls the API for the estimates in the last 10 days to evaluate if the star is within the range of the instrument; another similar script does the same for ~20 stars that are potentially interesting; and lastly another script plots light curves for the ~80 stars in my program, calling the API for estimates in the last year or so. This mades up to ~200 calls for a complete run of these three scripts. I run these programs between 1 and 3 times a week. This puts the estimate for the number of weekly API calls between 200 - 600 times, and the monthly estimate to about 800 - 2400, or say 1000 - 2500.