Sample Code

Check out our Github repo for sample code and examples for creating PNG and VSDX diagrams and connecting cloud environments up with Hyperglance programmatically.


We also have a set of older sample scripts that you can download for appending new attributes onto resources in Hyperglance:

    • augment_appTags.py
      • Augment application tags when the node_UID is known.
    • augment_attributes1.py
      • Augment attribute when the node_UID is known.
    • augment_attributes2.py
      • Augment attribute when the node_UID is unknown but attribute is known.
    • augment_dependencies.py
      • Augment Dependencies when the node_UID of the dependant and the supporter is known.
    • create_topology.py
      • Create a topology.
    • delete_topology.py
      • Delete a topology.
    • get_network.py
      • Get a list of all the nodes, links and endpoints and their corresponding attributes in the Hyperglance server and output it in JSON.
    • list_topologies.py
      • Get a list of all the topologies in the Hyperglance server and output it in JSON.


    To use these older example scripts:

    • Generate an API key
    • Open config.py in a text editor
    • Set the DATASOURCE and API_KEY values to match the values for the API key you generated earlier.
    • Set the HGS_URL to point to your running Hyperglance instance.