Skip to content

Commit

Permalink
Data access api (#720)
Browse files Browse the repository at this point in the history
* Making the Data Access API documentation clearer, and updating information.
  • Loading branch information
anamanica committed Aug 7, 2024
1 parent b9abcb3 commit 8222c1b
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 3 deletions.
18 changes: 16 additions & 2 deletions docs/source/data-access-api/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,21 @@ The SDC provides a REST API that allows users to upload and download files, as
well as query for file metadata. The following documentation describes the
various endpoints that are supported and how to use them.

The API can be accessed from the following URL: https://api.dev.imap-mission.com

*Note: Several sections and links begin with* [WIP]. *As development on the API is ongoing, this indicates
that the full implementation of the functionality is yet to be completed.*

The API can be accessed from the following URL [WIP]: https://api.dev.imap-mission.com

.. openapi:: openapi.yml
:group:
:include: /upload

When uploading files to the API, ensure these files are stored properly in a ``data`` directory. Then,
ensure your working directory is one level above the ``data`` directory in order to properly upload files.

[WIP] Certain ancillary files can also be uploaded to the API. For more specific information regarding these files, visit
`Ancillary Files <https://imap-processing.readthedocs.io/en/latest/data-access-api/calibration-files.html>`_

**Example Usage:**

.. code-block:: bash
Expand All @@ -45,6 +52,13 @@ The API can be accessed from the following URL: https://api.dev.imap-mission.com
:group:
:include: /download

It is important to note that your working directory will be established as the default directory. I.e, the ``data``
directory--which files are downloaded to--will automatically be placed in this file path. Choose your working directory
accordingly to suit your desires.

When downloading a file from the API, different folders within the ``data`` directory will be made to better
organize the files. See the example file path: ``data/imap/swe/l0/2024/01/imap_swe_l0_sci_20240105_20240105_v00-01.pkts``

**Example Usage:**

.. code-block:: bash
Expand Down
4 changes: 3 additions & 1 deletion docs/source/data-access-api/openapi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ paths:
items:
type: string


'/download/{filepath}':
get:
tags:
Expand Down Expand Up @@ -143,7 +144,8 @@ paths:
type: string
- in: query
name: version
description: The version of data product in the format ``vXX-YY`` (e.g. ``v01-01``).
description: The version of data product in the format ``vNNN`` (e.g. ``v001``). You can also choose to
query ``--version latest`` in order to receive the most recent version of a file.
required: false
schema:
type: string
Expand Down

0 comments on commit 8222c1b

Please sign in to comment.