API Documentation
You can use the GTN-P Application Programming Interface (API) to programmatically access all permafrost data stored in the GTN-P database. The API enables querying and retrieving data for integration with other software systems and automated workflows. The API is built using FastAPI and follows RESTful principles. It provides endpoints for accessing Permafrost Temperature (PT) and Active Layer Thickness (ALT) data, as well as associated metadata.
Please use the interactive Swagger documentation to explore the available endpoints, parameters, and response formats. You can also test API calls directly within the documentation interface:
https://data.gtn-p.org/api/swagger
All data downloads from the GTN-P Data Platform – including direct downloads of individual datasets and downloads via the download basket – are powered by this API.
Example API Calls
Get Permafrost Temperature Metadata (for a specific PT site)
Retrieve metadata for a specific Permafrost Temperature (PT) site using its unique site ID.
Returns a JSON file.
| Endpoint | /api/pt/{site_id} |
|---|---|
| Example Request | GET https://data.gtn-p.org/api/pt/123 |
Get Active Layer Thickness Data (for a specific dataset)
Retrieve Active Layer Thickness (ALT) data for a specific dataset using its unique dataset ID.
Returns a zipped CSV file with metadata in JSON format.
| Endpoint | /api/data/?alt_data={dataset_id}&combined=false |
|---|---|
| Example Request | GET https://data.gtn-p.org/api/data/?alt_data=228&combined=false |
Get a list of research sites (for a specific country, with PT data)
Retrieve a list of research sites located in a specific country that have Permafrost Temperature (PT) data available.
Returns a JSON file.
| Endpoint | /api/list-sites?country={country}&borehole_data=true&metadata=true |
|---|---|
| Example Request | GET https://data.gtn-p.org/api/list-sites?country=Canada&borehole_data=true&metadata=true |