Getting started with the Hyperglance API

Generate an API Key

  • Visit: https://IP_Address/#/admin/hgapi
  • Click 'New API Key'
  • Give the key a short name (this will act like a username in API requests) and any descriptive label you like:
  • Click Submit to generate the API Key itself (this will act like a password in API requests).
    • Make a note of this and keep it safe, it is NOT possible to recover this later, you would have to delete and recreate a whole new API key.

Get Started With A Simple Example: Export diagram to PNG

Make sure Hyperglance is already diagramming an AWS or Azure cloud environment and run the relevant CURL command.

You need to set your API key's name and secret accordingly in these examples as the --user value and note that the name and secret key must be separated by a colon.

Export AWS to a PNG:

curl -fk https://10.0.0.1/hgapi/export-png \
--output hyperglance.png \
--user my-api-user:77415974-1b16-4ee8-af98-6be979611158 \
--data '{ "datasource":"Datasource_Group", "account":"Amazon", "id":"Amazon" }' \
--request POST --header "Content-Type: application/json"

Export Azure to PNG:

curl -fk https://10.0.0.1/hgapi/export-png \
--output hyperglance.png \
--user my-api-user:77415974-1b16-4ee8-af98-6be979611158 \
--data '{ "datasource":"Datasource_Group", "account":"Azure", "id":"Azure" }' \
--request POST --header "Content-Type: application/json"

And if you want to export to VSDX just change the URL from /export-png to /export-vsdx.

Find more CURL examples on our Github repo.

API Samples & Examples

Check out our Github repository of samples.

There you can find examples for CURL, Python or Postman.