Skip to content
Example scripts for interacting with the Observation Portal API
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
LICENSE
README.md
obtain_auth_token.py
query_ipp.py
query_proposals.py
query_requestgroups.py
submit_cadence_request.py
submit_imaging_requestgroup.py
submit_nonsidereal_target.py
submit_spectrograph_requestgroup.py

README.md

Observation Portal API Examples

This repository contains python scripts demonstrating how to use the Observation Portal API. They can be used as a starting point for writing custom scripts to submit/query observation requests 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 Developers Docs. Check the Observations section for a description of terminology used in this repository.

Authentication

Most (if not all) of the examples require an authentication token. This token is like a password in that it is used to authenticate you with the API and make sure you have permission to perform specific actions. This token must be 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.

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

Examples

You can’t perform that action at this time.