---
title: Hyperglance Diagram API Reference
description: "The Hyperglance API is exposed on: https://&lt;host&gt;/hgapi All paths in this document are relative to that root URL. To use this API you must generate an API key and use it to authenticate by passing it"
---

[Skip to content](https://support.hyperglance.com/knowledge/hyperglance-diagram-api-reference#main-content)

English

Show submenu for translations

[More support](https://support.hyperglance.com/knowledge/kb-tickets/new?hsLang=en)

![](https://support.hyperglance.com/hs-fs/hubfs/hyperglance.png?width=100&height=75&name=hyperglance.png)

Open main navigation

Close main navigation

- English
  
  Show submenu for translations
- [More support](https://support.hyperglance.com/knowledge/kb-tickets/new)
- [Contact Us](https://www.hyperglance.com/contact/)

[Contact Us](https://www.hyperglance.com/contact/)

 How can we help you?

- There are no suggestions because the search field is empty.

1. [Hyperglance Support](https://support.hyperglance.com/knowledge?hsLang=en)
2. [Setup & Configuration](https://support.hyperglance.com/knowledge/setup-configuration?hsLang=en)
3. [API](https://support.hyperglance.com/knowledge/setup-configuration?hsLang=en#api)

# Hyperglance Diagram API Reference

The Hyperglance API is exposed on: **https://\<host\>/hgapi**  
All paths in this document are relative to that root URL.

To use this API you must [generate an API key](https://support.hyperglance.com/knowledge/getting-started-with-the-hyperglance-api?hsLang=en) and use it to authenticate by passing it as an HTTP Authorization header (for details see [Authentication)](https://support.hyperglance.com/knowledge/authentication?hsLang=en).

#### Export Diagram to PNG

***POST /export-png***

Returns a screenshot of the diagram in png format based on the json parameters. If you want a tag views diagram, you will need to make the id parameter blank.

**Normal response codes:** 200 OK  
**Error response codes:** 400 Bad Request, 401 Unauthorized, 403 Forbidden, 404 Not Found

**JSON parameters:**

| **datasource** (required) | The unique name identifier of a datasource (e.g. Amazon or Azure) to constrain the response to. (See also [Finding the Hyperglance ID](https://support.hyperglance.com/knowledge/hyperglance-diagram-api-reference#find-hg-id)). |
| --- | --- |
| **account** | The AWS Account Alias or Azure Subscription Alias (See also [Finding the Hyperglance ID](https://support.hyperglance.com/knowledge/hyperglance-diagram-api-reference#find-hg-id)). |
| **id** (Required if exporting Groups or Entities. Must be excluded if exporting tag views) | The entity ID/Key (See also [Finding the Hyperglance ID](https://support.hyperglance.com/knowledge/hyperglance-diagram-api-reference#find-hg-id)). |
| **tagViewIds** (Required if exporting [apptag views](https://support.hyperglance.com/knowledge/tag-view?hsLang=en)) | The AppTag views in the Diagram to export. Multiple apptag views can be included. |
| **tags** | A list of {"key":"some key", "value":"some value"} tags to filter the diagram according to resource that have those tags. |
| **includeDependencies** (default: true) | A boolean flag to say whether Hyperglance should include dependent resources as well as the tagged ones. Works in conjunction with either **tagViewIds** or **tags**. |

#### Export Diagram to VSDX

***POST /export-vsdx***

Returns a screenshot of the diagram in vsdx format based on the json parameters. If you want a tag views diagram, you will need to make the id parameter blank.

**Normal response codes:** 200 OK  
**Error response codes:** 400 Bad Request, 401 Unauthorized, 403 Forbidden, 404 Not Found

**JSON Parameters:**

| **datasource** (required) | The unique name identifier of a datasource (e.g. Amazon or Azure) to constrain the response to. (See also [Finding the Hyperglance ID](https://support.hyperglance.com/knowledge/hyperglance-diagram-api-reference#find-hg-id)). |
| --- | --- |
| **account** | The AWS Account Alias or Azure Subscription Alias (See also [Finding the Hyperglance ID](https://support.hyperglance.com/knowledge/hyperglance-diagram-api-reference#find-hg-id)). |
| **id** (Required if exporting Groups or Entities. Must be excluded if exporting tag views) | The entity ID/Key (See also [Finding the Hyperglance ID](https://support.hyperglance.com/knowledge/hyperglance-diagram-api-reference#find-hg-id)). |
| **tagViewIds** (Required if exporting [apptag views](https://support.hyperglance.com/knowledge/tag-view?hsLang=en)) | The AppTag views in the Diagram to export. Multiple apptag views can be included. |
| **tags** | A list of {"key":"some key", "value":"some value"} tags to filter the diagram according to resource that have those tags. |
| **includeDependencies**(default: true) | A boolean flag to say whether Hyperglance should include dependent resources as well as the tagged ones. Works in conjunction with either **tagViewIds** or **tags**. |

#### Error Messages

Following are the error messages returned to the client application.

**Missing id and tagViewIds:**

```
{    "message": "Validation error: Either id or tagViewIds must have entry."}
```

**Missing account:**

```
{    "message": "Validation error: Missing required property: account"}
```

**Missing datasource:**

```
{    "message": "Validation error: Missing required property: datasource"}
```

### Finding the Hyperglance ID of a resource

1\. Click on any resource in the Hyperglance user interface.

2\. Switch to its **Summary**

3\. The ID, Datasource and Account will be found at the bottom in **Hyperglance Information**:

![aws-resource-summary](https://support.hyperglance.com/hs-fs/hubfs/aws-resource-summary.png?width=236&name=aws-resource-summary.png)

 

- [Before You Start](https://support.hyperglance.com/knowledge/before-you-start?hsLang=en#main-content)

    - [Kubernetes](https://support.hyperglance.com/knowledge/before-you-start?hsLang=en#kubernetes)
    - [GCP](https://support.hyperglance.com/knowledge/before-you-start?hsLang=en#gcp)
    - [AWS](https://support.hyperglance.com/knowledge/before-you-start?hsLang=en#aws)
    - [Azure](https://support.hyperglance.com/knowledge/before-you-start?hsLang=en#azure)
- [Using Hyperglance](https://support.hyperglance.com/knowledge/using-hyperglance?hsLang=en#main-content)

    - [Automations](https://support.hyperglance.com/knowledge/using-hyperglance?hsLang=en#automations)
    - [Inventory & Diagrams](https://support.hyperglance.com/knowledge/using-hyperglance?hsLang=en#inventory-diagrams)
    - [Rules](https://support.hyperglance.com/knowledge/using-hyperglance?hsLang=en#rules)
    - [Cost Management](https://support.hyperglance.com/knowledge/using-hyperglance?hsLang=en#cost-management)
    - [Dashboards](https://support.hyperglance.com/knowledge/using-hyperglance?hsLang=en#dashboards)
    - [Security & Compliance](https://support.hyperglance.com/knowledge/using-hyperglance?hsLang=en#security-compliance)
- [Setup & Configuration](https://support.hyperglance.com/knowledge/setup-configuration?hsLang=en#main-content)

    - [Updating & Migrating](https://support.hyperglance.com/knowledge/setup-configuration?hsLang=en#updating-migrating)
    - [General](https://support.hyperglance.com/knowledge/setup-configuration?hsLang=en#general)
    - [RBAC & Users](https://support.hyperglance.com/knowledge/setup-configuration?hsLang=en#rbac-users)
    - [STIGS & FIPS](https://support.hyperglance.com/knowledge/setup-configuration?hsLang=en#stigs-fips)
    - [AWS](https://support.hyperglance.com/knowledge/setup-configuration?hsLang=en#aws)
    - [Azure](https://support.hyperglance.com/knowledge/setup-configuration?hsLang=en#azure)
    - [Kubernetes](https://support.hyperglance.com/knowledge/setup-configuration?hsLang=en#kubernetes)
    - [GCP](https://support.hyperglance.com/knowledge/setup-configuration?hsLang=en#gcp)
    - [API](https://support.hyperglance.com/knowledge/setup-configuration?hsLang=en#api)
    - [Legacy Docker-based deployments](https://support.hyperglance.com/knowledge/setup-configuration?hsLang=en#legacy-docker-based-deployments)
    - [AI](https://support.hyperglance.com/knowledge/setup-configuration?hsLang=en#ai)

[![Chill listening crop-3](https://support.hyperglance.com/hs-fs/hubfs/hyperglance.png?width=134&height=24&name=hyperglance.png "Chill listening crop-3")](https://www.hyperglance.com/)

2880 Zanker Road, Suite 203, San Jose, CA 95134

<https://www.linkedin.com/company/hyperglance/>

Copyright © 2025 Hyperglance. All rights reserved.