---
title: NerdGraph tutorial: Create and configure dashboard widgets
source: https://docs.newrelic.com/docs/apis/nerdgraph/examples/create-widgets-dashboards-api
---

With the New Relic dashboards API you can use [NerdGraph](https://api.newrelic.com/graphiql) to build your [dashboards](https://docs.newrelic.com/docs/query-your-data/explore-query-data/dashboards/introduction-dashboards). This document explains the different types of widgets you can add to your dashboards, and how to create and get them using the API.

## Widget schema and types [#widget-schema]

The widget GraphQL schema for query and mutation outputs looks like this:

```graphql
type Widget {
  id
  visualization
  layout
  title
  linkedEntities
  configuration
  rawConfiguration
  description
  link
}
```

Where:

-   `id`: The id of the widget.
-   `visualization`: The widget's visualization type, as a string. For example: `viz.line`, `viz.area`. See the [examples below](#typed-widget-data).
-   `layout`: The widget's position and size in the dashboard. The maximum amount of columns is 12.
-   `title`: The title of the widget.
-   `linkedEntities`: Dashboard Entities related to the widget. Currently it only supports dashboard entities. It is used by the [facet linking feature](https://docs.newrelic.com/docs/query-your-data/explore-query-data/dashboards/filter-new-relic-one-dashboards-facets).
-   `configuration`: The [typed configuration](#widget-typed) of the widget. It's a conveniently typed GraphQL representation of the most common widgets: [area](#area), [bar](#bar), [billboard](#billboard), [line](#line), [markdown](#markdown), [pie](#pie), and [table](#table).
-   `rawConfiguration`: The [untyped configuration](#widget-untyped) of the widget. It's a free-form way (JSON scalar) of storing widget properties not covered by the typed configuration such as [heatmap](#heatmap), [histogram](#histogram), [bullet](#bullet), [funnel](#funnel), etc. In this case `configuration` is null and `rawConfiguration` holds all the data required by the widget.
-   `description`: Optional text that provides additional context about the widget, displayed as a tooltip when users point to the widget.
-   `link`: Optional URL that makes the widget title clickable, allowing navigation to related dashboards, documentation, or external resources. Must use `http://` or `https://` protocol and can't exceed 2,048 characters.

### Types of widgets [#types-widget]

The dashboards API supports typed and untyped widgets:

**Typed widgets**

Typed widgets are [area](#area), [bar](#bar), [billboard](#billboard), [line](#line), [markdown](#markdown), [pie](#pie), and [table](#table). They can be built directly using NerdGraph, which provides assistance with the required fields.

As an input:

-   You only need to provide the `configuration`.
-   `visualization` can be null as long as it can be inferred from the provided configuration.

    As an output, the API will provide the configuration you provided plus the raw representation in JSON at `rawConfiguration`. Therefore, `rawConfiguration` is always a superset of all widget configurations.

**Untyped widgets**

Untyped widgets are all other widgets, such as [bullet](#bullet), [histogram](#histogram), [inventory](#inventory), etc.

For untyped widgets, we know and validate the shape of the JSON provided. For example, a [heatmap](#heatmap) has a specific configuration we know in advance, so we can validate it.

As an input:

-   `configuration` is not considered in this case.
-   `rawConfiguration` must be provided. See the [examples below](#untyped-widget-data).
-   `visualization` cannot be null and it should be a fixed string like `viz.heatmap` or `viz.bullet`.

    As an output, the API answers exactly with what was provided in the input.

## Typed widget definitions [#typed-widget-data]

### Area

Area supports multiple nrql queries.

| Widget data element   | Description                                                                                                                                                                                   |
| --------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `accountId` _Integer_ | Source account to fetch data from.                                                                                                                                                            |
| `query` _String_      | The [NRQL query](https://docs.newrelic.com/docs/query-your-data/nrql-new-relic-query-language/get-started/introduction-nrql-new-relics-query-language) that provides the data for the widget. |

**Input**

````graphql
{
  widgets: {
    configuration: {
      area: {
        nrqlQueries: {
          accountId: 12345678,
          query: "SELECT count(*) FROM Transaction FACET appName TIMESERIES"
        }
      }
    }
    rawConfiguration: null
  }
}
```

````

**Output**

````json
{
  "visualization": "viz.area",
  "configuration": {
    "area": {
      "nrqlQueries": [
        {
          "accountId": 12345678,
          "query": "SELECT count(*) FROM Transaction FACET appName TIMESERIES"
        }
      ]
    },
    "bar": null,
    "billboard": null,
    "line": null,
    "markdown": null,
    "pie": null,
    "table": null
  },
  "rawConfiguration": {
    "nrqlQueries": [
      {
        "accountId": 12345678,
        "query": "SELECT count(*) FROM Transaction FACET appName TIMESERIES"
      }
    ]
  }
}
```

````

### Bar

| Widget data element   | Description                                                                                                                                                                                   |
| --------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `accountId` _Integer_ | Source account to fetch data from.                                                                                                                                                            |
| `query` _String_      | The [NRQL query](https://docs.newrelic.com/docs/query-your-data/nrql-new-relic-query-language/get-started/introduction-nrql-new-relics-query-language) that provides the data for the widget. |

**Input**

````graphql
{  
  widgets: {
    configuration: {
      bar: {
        nrqlQueries: {
          accountId: 12345678,
          query: "SELECT count(*) FROM Transaction FACET appName"
        }
      }
    }
    rawConfiguration: null
  }  
}
```

````

**Output**

````json
{
  "visualization": "viz.bar",
  "configuration": {
    "area": null,
    "bar": {
      "nrqlQueries": [
        {
          "accountId": 12345678,
          "query": "SELECT count(*) FROM Transaction FACET appName"
        }
      ]
    },
    "billboard": null,
    "line": null,
    "markdown": null,
    "pie": null,
    "table": null
  },
  "rawConfiguration": {
    "nrqlQueries": [
      {
        "accountId": 12345678,
        "query": "SELECT count(*) FROM Transaction FACET appName"
      }
    ]
  }
}
```

````

### Billboard

| Widget data element      | Description                                                                                                                                                                                                          |
| ------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `accountId` _Integer_    | Source account to fetch data from.                                                                                                                                                                                   |
| `query` _String_         | The [NRQL query](https://docs.newrelic.com/docs/query-your-data/nrql-new-relic-query-language/get-started/introduction-nrql-new-relics-query-language) that provides the data for the widget.                        |
| `thresholds` _\[Object]_ | Optional. Array of thresholds to categorize the results of the query in different groups: - `alertSeverity`: It can be `NOT_ALERTING`, `WARNING`, and `CRITICAL`. - `value`: Threshold value for the alerting group. |

**Input**

````graphql
{  
  widgets: {
    configuration: {
      billboard: {
        nrqlQueries: {
          accountId: 12345678,
          query: "SELECT count(*) FROM Transaction FACET appName"
        }
        thresholds: {
          alertSeverity: CRITICAL
          value: 3
        }
      }
    }
    rawConfiguration: null
  }
}
```

````

**Output**

````json
{
  "visualization": "viz.billboard",
  "configuration": {
    "area": null,
    "bar": null,
    "billboard": {
      "nrqlQueries": [
        {
          "accountId": 12345678,
          "query": "SELECT count(*) FROM Transaction FACET appName"
        }
      ],
      "thresholds": [
        {
          "alertSeverity": "CRITICAL",
          "value": 3
        }
      ]
    },
    "line": null,
    "markdown": null,
    "pie": null,
    "table": null
  },
  "rawConfiguration": {
    "nrqlQueries": [
      {
        "accountId": 12345678,
        "query": "SELECT count(*) FROM Transaction FACET appName"
      }
    ],
    "thresholds": [
      {
        "alertSeverity": "CRITICAL",
        "value": 3
      }
    ]
  }
}
```

````

### Line

Line supports multiple nrql queries.

| Widget data element   | Description                                                                                                                                                                                   |
| --------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `accountId` _Integer_ | Source account to fetch data from.                                                                                                                                                            |
| `query` _String_      | The [NRQL query](https://docs.newrelic.com/docs/query-your-data/nrql-new-relic-query-language/get-started/introduction-nrql-new-relics-query-language) that provides the data for the widget. |

**Input**

````graphql
{
  widgets: {
    configuration: {
      line: {
        nrqlQueries: {
          accountId: 12345678,
          query: "SELECT count(*) FROM Transaction FACET appName TIMESERIES"
        }
      }
    }
    rawConfiguration: null
  }
}
```

````

**Output**

````json
{
  "visualization": "viz.line",
  "configuration": {
    "area": null,
    "bar": null,
    "billboard": null,
    "line": {
      "nrqlQueries": [
        {
          "accountId": 12345678,
          "query": "SELECT count(*) FROM Transaction FACET appName TIMESERIES"
        }
      ]
    },
    "markdown": null,
    "pie": null,
    "table": null
  },
  "rawConfiguration": {
    "nrqlQueries": [
      {
        "accountId": 12345678,
        "query": "SELECT count(*) FROM Transaction FACET appName TIMESERIES"
      }
    ]
  }
}
```

````

### Markdown

| Widget data element | Description                                 |
| ------------------- | ------------------------------------------- |
| `text` _String_     | Content to be added in the markdown widget. |

**Input**

````graphql
{
  widgets: {
    configuration: {
      markdown: {
        text: "My markdown"
      }
    }
    rawConfiguration: null
  }  
}
```

````

**Output**

````json
{
  "visualization": "viz.markdown",
  "configuration": {
    "area": null,
    "bar": null,
    "billboard": null,
    "line": null,
    "markdown": {
      "text": "My markdown"
    },
    "pie": null,
    "table": null
  },
  "rawConfiguration": {
    "text": "My markdown"
  }
}
```

````

### Pie

| Widget data element   | Description                                                                                                                                                                                   |
| --------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `accountId` _Integer_ | Source account to fetch data from.                                                                                                                                                            |
| `query` _String_      | The [NRQL query](https://docs.newrelic.com/docs/query-your-data/nrql-new-relic-query-language/get-started/introduction-nrql-new-relics-query-language) that provides the data for the widget. |

**Input**

````graphql
{
  widgets: {
    configuration: {
      pie: {
        nrqlQueries: {
          accountId: 12345678,
          query: "SELECT count(*) FROM Transaction FACET appName"
        }
      }
    }
    rawConfiguration: null
  }  
}
```

````

**Output**

````json
{
  "visualization": "viz.pie",
  "configuration": {
    "area": null,
    "bar": null,
    "billboard": null,
    "line": null,
    "markdown": null,
    "pie": {
      "nrqlQueries": [
        {
          "accountId": 12345678,
          "query": "SELECT count(*) FROM Transaction FACET appName"
        }
      ]
    },
    "table": null
  },
  "rawConfiguration": {
    "nrqlQueries": [
      {
        "accountId": 12345678,
        "query": "SELECT count(*) FROM Transaction FACET appName"
      }
    ]
  }
}
```

````

### Table

| Widget data element   | Description                                                                                                                                                                                   |
| --------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `accountId` _Integer_ | Source account to fetch data from.                                                                                                                                                            |
| `query` _String_      | The [NRQL query](https://docs.newrelic.com/docs/query-your-data/nrql-new-relic-query-language/get-started/introduction-nrql-new-relics-query-language) that provides the data for the widget. |

**Input**

````graphql
{
  widgets: {
    configuration: {
      table: {
        nrqlQueries: {
          accountId: 12345678,
          query: "SELECT count(*) FROM Transaction"
        }
      }
    }
    rawConfiguration: null
  }
}
```

````

**Output**

````json
{
  "visualization": "viz.table",
  "configuration": {
    "area": null,
    "bar": null,
    "billboard": null,
    "line": null,
    "markdown": null,
    "pie": null,
    "table": {
      "nrqlQueries": [
        {
          "accountId": 12345678,
          "query": "SELECT count(*) FROM Transaction"
        }
      ]
    }
  },
  "rawConfiguration": {
    "nrqlQueries": [
      {
        "accountId": 12345678,
        "query": "SELECT count(*) FROM Transaction"
      }
    ]
  }
}
```

````

## Untyped widget definitions [#untyped-widget-data]

### Area (predefined metrics) [#areap]

| Widget data element      | Description                                                                                                                                                                                                                                                       |
| ------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `duration` _Long_        | Duration of the requested time window, in milliseconds. - When provided with `endTime`, the time window is set to the last `x` milliseconds ending at the specified time. - If `endTime` is null, the time window is set to the last `x` milliseconds ending now. |
| `endTime` _Long_         | Optional. End of the time window, in milliseconds.                                                                                                                                                                                                                |
| `entityIds` _\[Integer]_ | Array of source agent Ids to fetch data from.                                                                                                                                                                                                                     |
| `metrics` _\[Object]_    | For `type` `SCOPE_BREAKDOWN` only. List of metrics to be fetched.                                                                                                                                                                                                 |
| `type` _String_          | Type of the predefined chart. It can be: `APPLICATION_BREAKDOWN`, `BACKGROUND_BREAKDOWN`, `BROWSER_BREAKDOWN`, `GC_RUNS_BREAKDOWN`, `SCOPE_BREAKDOWN`, `SOLR_BREAKDOWN.`                                                                                          |

**Input**

````graphql
{
  widgets: {
    visualization: "viz.area"
    configuration: null
    rawConfiguration: {
      type:SCOPE_BREAKDOWN
      endTime: null
      entityIds: [1]
      metrics: [{
        name: "Mobile/Activity/Name/Display"
      }]
      duration: 3600
    }
  }
}
```

````

**Output**

````json
{
  "visualization": "viz.area",
  "configuration": null,
  "rawConfiguration": {
    "type": "SCOPE_BREAKDOWN",
    "endTime": null,
    "entityIds": [
      1
    ],
    "metrics": [
      {
        "name": "Mobile/Activity/Name/Display"
      }
    ],
    "duration": 3600
  }
}
```

````

### Bullet

| Widget data element   | Description                                                                                                                                                                                   |
| --------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `accountId` _Integer_ | Source account to fetch data from.                                                                                                                                                            |
| `query` _String_      | The [NRQL query](https://docs.newrelic.com/docs/query-your-data/nrql-new-relic-query-language/get-started/introduction-nrql-new-relics-query-language) that provides the data for the widget. |
| `limit` _Float_       | Goal against which all query results are compared to.                                                                                                                                         |

**Input**

````graphql
{
  widgets: {
    visualization: "viz.bullet"
    configuration: null
    rawConfiguration: {
      nrqlQueries: [
        {
          accountId: 12345678,
          query: "SELECT count(*) FROM Transaction"
        }
      ]
      limit: 2.4
    }
  }
}
```

````

**Output**

````json
{
  "visualization": "viz.bullet",
  "configuration": null,
  "rawConfiguration": {
    "nrqlQueries": [
      {
        "accountId": 12345678,
        "query": "SELECT count(*) FROM Transaction"
      }
    ],
    "limit": 2.4
  }
}
```

````

### Event feed

| Widget data element   | Description                                                                                                                                                                                   |
| --------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `accountId` _Integer_ | Source account to fetch data from.                                                                                                                                                            |
| `query` _String_      | The [NRQL query](https://docs.newrelic.com/docs/query-your-data/nrql-new-relic-query-language/get-started/introduction-nrql-new-relics-query-language) that provides the data for the widget. |

**Input**

````graphql
{
  widgets: {
    visualization: "viz.event-feed"
    configuration: null
    rawConfiguration: {
      nrqlQueries: [      
        {
          accountId: 12345678,
          query: "SELECT * FROM InfrastructureEvent"
        }
      ]    
    }
  }
}
```

````

**Output**

````json
{
  "visualization": "viz.event-feed",
  "configuration": null,
  "rawConfiguration": {
    "nrqlQueries": [
      {
        "accountId": 12345678,
        "query": "SELECT * FROM InfrastructureEvent"
      }
    ]
  }
}
```

````

### Funnel

| Widget data element   | Description                                                                                                                                                                                   |
| --------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `accountId` _Integer_ | Source account to fetch data from.                                                                                                                                                            |
| `query` _String_      | The [NRQL query](https://docs.newrelic.com/docs/query-your-data/nrql-new-relic-query-language/get-started/introduction-nrql-new-relics-query-language) that provides the data for the widget. |

**Input**

````graphql
{
  widgets: {
    visualization: "viz.funnel"
    configuration: null
    rawConfiguration: {
      nrqlQueries: [      
        {
          accountId: 12345678,
          query: "SELECT funnel(SESSION,
            WHERE name ='Controller/about/main' AS 'Step 1',
            WHERE name ='Controller/about/careers' AS 'Step 2')
            FROM PageView"
        }
      ]
    }
  }
}
```

````

**Output**

````json
{
  "visualization": "viz.funnel",
  "configuration": null,
  "rawConfiguration": {
    "nrqlQueries": [
      {
        "accountId": 12345678,
        "query": "SELECT funnel(SESSION, \n WHERE name ='Controller/about/main' AS 'Step 1', \n WHERE name ='Controller/about/careers' AS 'Step 2') \n FROM PageView"
      }
    ]
  }
}
```

````

### Heatmap

| Widget data element   | Description                                                                                                                                                                                   |
| --------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `accountId` _Integer_ | Source account to fetch data from.                                                                                                                                                            |
| `query` _String_      | The [NRQL query](https://docs.newrelic.com/docs/query-your-data/nrql-new-relic-query-language/get-started/introduction-nrql-new-relics-query-language) that provides the data for the widget. |

**Input**

````graphql
{
  widgets: {
    visualization: "viz.heatmap"
    configuration: null
    rawConfiguration: {
      nrqlQueries: [      
        {
          accountId: 12345678,
          query: "SELECT histogram(duration) FROM Transaction Facet appName"
        }
      ]
    }
  }
}
```

````

**Output**

````json
{
  "visualization": "viz.heatmap",
  "configuration": null,
  "rawConfiguration": {
    "nrqlQueries": [
      {
        "accountId": 12345678,
        "query": "SELECT histogram(duration) FROM Transaction Facet appName"
      }
    ]
  }
}
```

````

### Histogram

| Widget data element   | Description                                                                                                                                                                                   |
| --------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `accountId` _Integer_ | Source account to fetch data from.                                                                                                                                                            |
| `query` _String_      | The [NRQL query](https://docs.newrelic.com/docs/query-your-data/nrql-new-relic-query-language/get-started/introduction-nrql-new-relics-query-language) that provides the data for the widget. |

**Input**

````graphql
{
  widgets: {
    visualization: "viz.histogram"
    configuration: null
    rawConfiguration: {
      nrqlQueries: [      
        {
          accountId: 12345678,
          query: "SELECT histogram(duration) FROM Transaction"
        }
      ]
    }
  }
}
```

````

**Output**

````json
{
  "visualization": "viz.histogram",
  "configuration": null,
  "rawConfiguration": {
    "nrqlQueries": [
      {
        "accountId": 12345678,
        "query": "SELECT histogram(duration) FROM Transaction"
      }
    ]
  }
}
```

````

### Inventory

| Widget data element   | Description                                                                                                                                                                                                                                                                        |
| --------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `accountId` _Integer_ | Source account to fetch data from.                                                                                                                                                                                                                                                 |
| `filters` _Object_    | Map of the filters to be applied to the infrastructure sources.                                                                                                                                                                                                                    |
| `sources` _\[String]_ | List of the infrastructure sources to get data from. For more information see our docs on [how inventory entries look like](https://docs.newrelic.com/docs/infrastructure/infrastructure-ui-pages/infra-ui-pages/infrastructure-inventory-page-search-your-entire-infrastructure). |

**Input**

````graphql
{
  widgets: {
    visualization: "infra.inventory"
    configuration: null
    rawConfiguration: {
      accountId: 12345678,  
      filters: {
        providerAccountId: "1"
      }
      sources: [ "aws/elastocache/cluster", "aws/elasticache/node" ]
    }
  }
}
```

````

**Output**

````json
{
  "visualization": "infra.inventory",
  "configuration": null,
  "rawConfiguration": {
    "accountId": 12345678,
    "filters": {
      "providerAccountId": "1"
    },
    "sources": [
      "aws/elastocache/cluster",
      "aws/elasticache/node"
    ]
  }
}
```

````

### JSON

| Widget data element   | Description                                                                                                                                                                                   |
| --------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `accountId` _Integer_ | Source account to fetch data from.                                                                                                                                                            |
| `query` _String_      | The [NRQL query](https://docs.newrelic.com/docs/query-your-data/nrql-new-relic-query-language/get-started/introduction-nrql-new-relics-query-language) that provides the data for the widget. |

**Input**

````graphql
{
  widgets: {
    visualization: "viz.json"
    configuration: null
    rawConfiguration: {
      nrqlQueries: [      
        {
          accountId: 12345678,
          query: "SELECT * FROM Transaction"
        }
      ]
    }
  }
}
```

````

**Output**

````json
{
  "visualization": "viz.json",
  "configuration": null,
  "rawConfiguration": {
    "nrqlQueries": [
      {
        "accountId": 12345678,
        "query": "SELECT * FROM Transaction"
      }
    ]
  }
}
```

````

### Line (metrics) [#linem]

| Widget data element      | Description                                                                                                                                                                                                                                                       |
| ------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `accountId` _Integer_    | Source account to fetch data from.                                                                                                                                                                                                                                |
| `compareWith` _Object_   | Optional. Additional time window to query. For example: ````graphql {   offsetDuration: 86400000   presentation: { "#c001", "Yesterday" } } ```  ````                                                                                                             |
| `duration` _Long_        | Duration of the requested time window, in milliseconds. - When provided with `endTime`, the time window is set to the last `x` milliseconds ending at the specified time. - If `endTime` is null, the time window is set to the last `x` milliseconds ending now. |
| `endTime` _Long_         | End of the time window, in milliseconds.                                                                                                                                                                                                                          |
| `entityIds` _\[Integer]_ | Array of source agent Ids to fetch data from.                                                                                                                                                                                                                     |
| `facet` _String_         | Optional. Facet the data by the given attribute. It can be `host`, `agent`, `application`, or `mobile_version`.                                                                                                                                                   |
| `limit` _Integer_        | Optional. Maximum amount of series to be returned.                                                                                                                                                                                                                |
| `metrics` _\[Object]_    | List of metrics to be fetched.                                                                                                                                                                                                                                    |
| `orderBy` _String_       | Optional. Used to sort the results in descending order.                                                                                                                                                                                                           |

**Input**

````graphql
{
  widgets: {
    visualization: "viz.line"
    configuration: null
    rawConfiguration: {
      accountId: 12345678,      
      duration: 36000
      endTime: null
      entityIds: [ 100 ]
      facet: null
      limit: null
      metrics: [{
        name: "Errors/all"
        values: [ "error_rate" ]
      }]
      orderBy: null
      compareWith: []
      rawMetricName: "Errors/all"
    }
  }
}
```

````

**Output**

````json
{
  "visualization": "viz.line",
  "configuration": null,
  "rawConfiguration": {
    "accountId": 12345678,
    "duration": 36000,
    "endTime": null,
    "entityIds": [
      100
    ],
    "facet": null,
    "limit": null,
    "metrics": [
      {
        "name": "Errors/all",
        "values": [
          "error_rate"
        ]
      }
    ],
    "orderBy": null,
    "compareWith": [],
    "rawMetricName": "Errors/all"
  }
}
```

````

### Service map

| Widget data element                  | Description                                                                                                                                                                     |
| ------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `accountId` _Integer_                | Source account to fetch data from.                                                                                                                                              |
| `additionalEntities` _\[Object]_     | Optional. An array of additional entities to include. The target is the entity downstream, while the source is upstream. `Type`, `vendor`, `target`, and `source` are optional. |
| `deemphasizedConditions` _\[Object]_ | Optional. Entities with these conditions have a faded appearance in the map.                                                                                                    |
| `hiddenEntities` _\[Object]_         | Optional. Entities to be excluded from the map.                                                                                                                                 |
| `primaryEntities` _\[Object]_        | The primary entities which start the map (most upstream).                                                                                                                       |

**Input**

````graphql
{
  widgets: {
    visualization: "topology.service-map"
    configuration: null
    rawConfiguration: {
      accountId: 12345678,       
      entitySearchQuery: "alertStatus IN ('RED')"
      additionalEntities: [{
        guid: "AAA"
        type: "APPLICATION"
        vendor: "Company inc."
        sourceGuid: "BBB"
        targetGuid: "CCC"
      }]
      deemphasizedConditions: {
        alertStatus: [ GREEN ]
        entityType: [ APM_APPLICATION_ENTITY ]
      }
      hiddenEntities: [{
        guid: "XXX_2"
        sourceGuid: "YYY_2"
        targetGuid: "ZZZ_2"
      }]
      primaryEntities: [{
        guid: "AAA"
      }]
    }
  }
}
```

````

**Output**

````json
{
  "visualization": "topology.service-map",
  "configuration": null,
  "rawConfiguration": {
    "accountId": 12345678,
    "entitySearchQuery": "alertStatus IN ('RED')",
    "additionalEntities": [
      {
        "guid": "AAA",
        "type": "APPLICATION",
        "vendor": "Company inc.",
        "sourceGuid": "BBB",
        "targetGuid": "CCC"
      }
    ],
    "deemphasizedConditions": {
      "alertStatus": [
        "GREEN"
      ],
      "entityType": [
        "APM_APPLICATION_ENTITY"
      ]
    },
    "hiddenEntities": [
      {
        "guid": "XXX_2",
        "sourceGuid": "YYY_2",
        "targetGuid": "ZZZ_2"
      }
    ],
    "primaryEntities": [
      {
        "guid": "AAA"
      }
    ]
  }
}
```

````
