15.3 RESTful API Endpoints
This page contains the high-level overviews & the functionalities offered by the different RESTful endpoints of the PEcAn API.
For the most up-to-date documentation, you can visit the PEcAn API Documentation.
The currently implemented functionalities include:
- General:
GET /api/ping: Ping the server to check if it is liveGET /api/status: Obtain general information about PEcAn & the details of the database host
- Models:
GET /api/models/: Search for model(s) using search pattern based on model name & revisionGET /api/models/{model_id}: Fetch the details of specific model
- Sites:
GET /api/sites/: Search for site(s) using search pattern based on site nameGET /api/sites/{site_id}: Fetch the details of specific site
- PFTs:
GET /api/pfts/: Search for PFT(s) using search pattern based on PFT name, PFT type & Model typeGET /api/pfts/{pft_id}: Fetch the details of specific PFT
- Formats:
GET /api/formats/: Search for format(s) using search pattern based on format name & mime typeGET /api/formats/{format_id}: Fetch the details of specific Format
- Inputs:
GET /api/inputs/: Search for inputs needed for a PEcAn workflow based onmodel_id,site_id,format_id&host_id.GET /api/inputs/{input_id}*: Download the desired input file (if theinput_idcorresponds to a folder, an optionalfilenameargument must be provided)
- Workflows:
GET /api/workflows/: Retrieve a list of PEcAn workflowsPOST /api/workflows/: Submit a new PEcAn workflowGET /api/workflows/{id}: Obtain the details of a particular PEcAn workflow by supplying its IDGET /api/workflows/{id}/status: Obtain the status of a particular PEcAn workflowGET /api/workflows/{id}/file/{filename}: Download the desired file from a PEcAn workflow
- Runs:
GET /api/runs: Get the list of all the runsGET /api/runs/{run_id}: Fetch the details of a specified PEcAn runGET /api/runs/{run_id}/input/{filename}: Download the desired input file for a runGET /api/runs/{run_id}/output/{filename}: Download the desired output file for a runGET /api/runs/{run_id}/graph/{year}/{y_var}: Plot the graph of desired output variables for a run
* indicates that the particular API is under development & may not be ready for use