API Reference

Using the 'Find All Stations' Endpoint

What you’ll need: your API Key

Using your public API key, you can use the /stations API endpoint to determine what stations you have API access to and retrieve the latest observations and most up to date metadata for each. You can query the API through the interface here or by making an API request using your preferred method (e.g. curl request, using python code, etc).

To use the readme interface to access the API:

  1. Navigate to the /stations endpoint page
  2. Enter your API key in the box under ‘Credentials’ labeled ‘Header’
    enter your api key in the header box
  3. Click on the 'Try It!' button to send the request
    click the try it button
  4. The ‘Response’ section will show you the metadata for all stations you can access via the API, including their ID’s (e.g. hohonu-160 in the image below)
    returned data will be in the response section
  5. You can also further customize your request by choosing values in the ‘Query Params’ section of the page
    additional options in the query params section
  6. The example request can be easily copied from this page and pasted into your code or your shell terminal
    you can copy the curl request into a shell terminal
  7. You can also get an example request in a variety of formats by selecting a ‘Language’ for ease of integrating this API request into your code
    change the language of the request to copy into your code
  8. If you do not have access to any stations yet, please reach out to [email protected] to request permission for the desired station(s)