Welcome to TERN Knowledge Base

EcoPlots API - autogenerating queries

The easiest method to create queries for use in API requests is by building the query through the EcoPlots Portal. This method allows users to build a query visually and dynamically. The API code generator tool generates the complete code needed to make the request in multiple programming languages. The generated code can be directly copied and used as part of a script.


Overview

Once you have used the filters to refine the data search within the portal, click the API button at the top of the left toolbar.

On clicking the button, a dialog box will appear containing various options, including what programming language that the query should be generated using, the endpoint to be queried, and the output format desired.


Step-by-step instructions

The faceted search that the portal provides can be used to refine the filters and inspect the results visually in the data table. Once refined, the query can be accessed within the API request dialog.

  1. Define the filter or filters via the facets menu.

  2. Inspect the returned data. Polish the query by changing filter values dynamically and clicking in the “Show results” buttons.

  3. Click on the API button.

  1. Copy the query dictionary using the copy button and use it directly in any API request.

 

 

 

 

Provide your feedback about the experience with Knowledge base