This repository contains example code to demonstrate how the Watershed API can be used.
Watershed Access
- Make sure you have access to a staging or test Watershed environment. The training will upload data to Watershed, so we don't want to disrupt a production measurement.
- Log into Watershed at dashboard.watershedclimate.com
- Create an API key in the Organization Settings page
Training Repo Setup
- Make sure your system has poetry installed
- Clone this repository locally
- Run
./scripts/setup
- Enter your API key when prompted. This will be saved to a
secrets.env
file so that your API scripts can use it later.
- Open
upload_dataset.py
, which has some sample code for sending API requests, as well as an example request at the bottom. - Run
./scripts/run
to executeupload_dataset.py
- Refer to Watershed's API documentation
- Fill out the remaining functionality specified in the comments
- Watershed's learning hub
- API Documentation
- How to upload data API Guide
- Please contact api-support@watershedclimate.com for any questions