cnHeat API

With the release of cnHeat 2.4.0 users can now control cnHeat programmatically through our API.

Documentation can be found here: Swagger UI

To get started you will first need to create an API key in cnHeat.

  • Click the project configuration icon next to your project name.
  • Click the API Key Management option from the pop-out.

You will use the Client ID and Client Secret to generate your access token. These can be copy/pasted using the clipboard icons next to each.

If you don’t have your own API client and want to look around you can use the API client available in the documentation.

Navigate to the “tokens” endpoint and click the Try it out button.

Paste in your client_id and client_secret (as shown), and click Execute.

Scroll down and copy out the access_token.
Note: The access token will expire after 15 minutes and will need to be refreshed.

Then scroll up to the top of the page and click Authorize button in the top right. Paste in the access_token and click Authorize.


Close this window and start accessing the various endpoints.

Example:
Navigate to “sites” and clicking “Try it out” and “Execute” as shown here.

Scrolling down into the results shows two towers (one called “Ballpark” and one called “Grain Elevator”).

Note: One popular request is to be able to lookup customer locations through the API to determine if a location is covered or not. This feature is not yet available.

2 Likes