Getting started with the Hyperglance API

Documentation

We use Swagger to document the Hyperglance API.

You can access it on Swagger, or via your Hyperglance instance by visiting https://[ReplaceWithHyperglanceIpAddress]/hgapi/docs/

Generating an API Key

  • Visit Settings > API Keys  (or type: https://YOUR HYPERGLANCE IP/settings/api into the browser)
  • Click 'Create API Key'
  • Provide a unique key identifier that will act like a public-key / username. Also provide some descriptive text to document what the key is for:
  • Click the Create button to generate the private 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.