Example scripts for querying the LCO Request service https://developers.lco.global
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
LICENSE Examples for new Valhalla api May 3, 2017
README.md
obtain_auth_token.py Change from observe-beta to prod Jun 13, 2017
query_ipp.py Change from observe-beta to prod Jun 13, 2017
query_proposals.py
query_requests.py Change from observe-beta to prod Jun 13, 2017
submit_cadence_request.py Change from observe-beta to prod Jun 13, 2017
submit_request.py Change from observe-beta to prod Jun 13, 2017
submit_spectrograph_request.py Change from observe-beta to prod Jun 13, 2017

README.md

Observation API Examples

This repository contains python scripts demonstrating the use of the LCO Request API. They may be used as a starting point for writing custom scripts for submitting/querying observations on the LCO network programatically.

All scripts assume the requests library is installed.

Full Documentation

The example scripts included here are basic. To view the full API documentation, please see the LCO Developers Page.

Authentication

Most (if not all) examples require the use of an authentication token. This token is similar to a password: it is used to authenticate you with the API and make sure you have permission to perform specific actions. This token is placed in the HTTP Authorization header and is valid forever (or until you revoke it).

You can obtain your authentication token from your profile page on the observation portal.

If for some reason you are unable to access your profile page (on a server without a graphical interface, for example) you can also obtain your token via API. The obtain_auth_token.py example does just that.

Examples