From ef3542a8fc2bb1506b1d2384c7307b97ad32be72 Mon Sep 17 00:00:00 2001 From: Nicolas Schmid <nicolas@breiten.ch> Date: Fri, 26 Apr 2024 14:42:01 +0200 Subject: [PATCH] docs: add a kind of quick access docs --- README.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/README.md b/README.md index 6c62d97..e89fc32 100644 --- a/README.md +++ b/README.md @@ -6,6 +6,17 @@ REST webservice allowing access to hydraulic data. Instructions for installation and examples of usage may be found below. +## Quickly Accessing Data + +If you are using Python, use the [hydws-client](https://gitlab.seismo.ethz.ch/indu/hydws-client) library to access the data. Alternatively you can simply request the data directly (eg. curl or browser). The resulting data is accessed per default in JSON format, **hydraulics data of a single section can also be accessed in CSV format.** + +Use the following example to get started quickly using curl or a simple web browser: +1. Navigate to /hydws/v1/boreholes and copy the `publicid` of the `borehole`, and the `section` you are interested in. +2. Navigating to /hydws/v1/boreholes/`borehole_publicid`/section/`section_publicid`/hydraulics would return ALL the hydraulic data for that section. +3. Navigating to /hydws/v1/boreholes/`borehole_publicid`/section/`section_publicid`/hydraulics?starttime=2021-01-01T00:00:00&endtime=2021-01-02T00:00:00 would return the hydraulic data for that section between the specified times. +4. Adding `&format=csv` to the end of the URL returns the data in CSV format. + + ## Installation Using [Docker](https://docs.docker.com/engine/) allows for an easy setup of the webservice, the database and the required dependencies. Manual installation is also possible, but requires some manual steps to prepare the database. -- GitLab