Swagger Page


The Swagger page is a no-code, interactive page that allows you to utilize the API endpoints and export the results to google cloud storage. 


Authorization

You authorize your use with a key. A key for non-commercial use can be requested through sending us a message in this site (the blue question mark on the home page). 


Try It Out

To try out an endpoint, scroll to the endpoint of interest. Click the downward facing arrow on the right side of the endpoint to expand the endpoint box. Then click the button labeled Try it out. This allows you to edit the parameters boxes and execute a request. Each endpoint has a different set of parameters it requires, and more details on the different endpoint parameter requirements and options can be found at the docs site

For this example of the export/values endpoint, the first parameter you need to update is the dataset you are interested in. Next, you must input the variable you want to use and the temporal statistic you want to apply. For example. selecting the mean will take the mean of the variable's values over the time period you input. Next, you need to input coordinates of a bounding box for the area you are interested in making a map for. The bounding box should be formatted in [SWLong, NELong. SWLat, NELat] format. Next, you have to give the export path to the google cloud storage bucket you want the map to be sent to. You will need to give the Climate Engine google service account (climate-engine-pro-gcp@climate-engine-pro.iam.gserviceaccount.com) the Storage Object Creator role in your bucket permissions. Adding a mask for the map, defining resolution of the export, and the projection you want to export the map in are optional parameters. Finally, you can input your start and end date for the time frame you want to reduce over. 

Once you click the execute button, you get multiple outputs. The curl and request URL show the request you made. The response body outline the task generated from the parameters you submitted. You can see that the state of the task starts as ready. As the task is completed, the state is updated to "COMPLETE". You can check the state using the /export/task_update endpoint and the task id (which is right above "name" is the response body). 

Once the state is updated to "Complete", you can navigate to your google cloud storage folder where the export will be waiting for you. 

Still need help? Contact Us Contact Us