API aspect

The Application Programming Interface (API) allows users to interact with Rubin’s data services remotely. An API is a structured way for software applications to communicate with each other. It can be thought of as a back-and-forth exchange between a client and a server: one program (the client) makes a request for data, and another program (the server) provides a response.

In the context of the RSP, the API aspect allows access to Rubin data—including images and catalogs—both within the RSP environment (e.g., via the RSP JupyterLab Notebook aspect) and externally (e.g., through the Tool for OPerations on Catalogues And Tables (TOPCAT), a personal computer with the PyVO software, or a PyVO-enabled environment like the National Optical-Infrared Astronomy Research Laboratory’s Astro Data Lab).

Use the API Aspect to:

  • Access Rubin data from outside the RSP.

  • Automate data queries or downloads.

  • Integrate Rubin data access into your own software tools.

  • Access external datasets in addition to Rubin data.

API Services

The API aspect of the RSP supports several types of services, primarily based on the International Virtual Observatory Alliance (IVOA) protocols. These include the Table Access Protocol (TAP), the Observation Table Access Protocol (ObsTAP), the Server-side Operations for Data Access (SODA) service (which provides image cutouts and mosaics), the Simple Image Access Protocol version 2 (SIAv2) for image searches, and the Hierarchical Progressive Survey (HiPS).

By the time of the first data release, the Rubin Science Platform will also support the Simple Cone Search (SCS) for basic catalog queries, and the Virtual Observatory Space (VOSpace)—alongside Web Distributed Authoring and Versioning (WebDAV)—for user file access.

Table Access Protocol (TAP) Service

The Table Access Protocol (TAP) is a specific type of service within the API, implemented according to the IVOA standard.

Internal TAP Access

The primary means of accessing TAP within the RSP is through the RSP’s Portal and Notebook aspects. In the Notebook aspect, a client that’s connected to the TAP service is instantiated within a Python notebook and used to execute an Astronomical Data Query Language (ADQL) query, returning a result set.

External TAP Access

The RSP TAP service is also accessible remotely, from outside the RSP (e.g., from a personal computer), allowing users to query data using external software such as PyVO, TOPCAT, or custom scripts. To access TAP from external software, users must generate an RSP access token.

Authentication and Access Tokens

Access to Rubin data via the API requires authentication. Users must obtain an RSP authentication token, which serves as a credential when making API requests. For internal TAP access, the token is already generated by the RSP, so no additional steps are needed. For external TAP access, instructions on generating and using an RSP access token can be found on the Authentication website.

Additional Resources

For more information about Rubin data access, please refer to the tutorials. For the most recent data releases, visit the Rubin Observatory page.

Questions? Get support.

WebDAV

Note

The WebDAV service is in beta. Details of how or whether this capability is offered may change.

RSP users have the option of starting a WebDAV server within the RSP. This allows you to connect to your RSP home space from your latop. With this capability, you can use your favorite editor locally to edit files on your RSP home, or move files easily between your RSP home and your laptop.

Start your WebDAV server

One-time setup:
  1. Create a token with write:files scope. See Creating user tokens on how to do this. Copy the generated token

  2. (optionally) save your token in a password manager

When you need your server:
  1. Navigate to https://data-dev.lsst.cloud/files/ and wait for the page to load (the delay is the time it takes to start your personal WebDAV server if it’s not running already).

  2. You can now connect to your WebDAV server with the tool of your choice. While there are dedicated clients, most operating systems support WebDAV in their file browsing built-in tools:

  • Mac users can use Finder

  • Linux users can use a file manager such as Nautilus or Dolphin

  • Windows users can use File Explorer

Use https://data-dev.lsst.cloud/files/(your_username) as the server address, and the token you generated in the first step as the password.

To conserve resources for all users, your WebDAV server is shut down after a period of inactivity. To start it again, simply repeat step 3.