# Inspect raw JSON source data from Vega/Elasticsearch

**URL:** <https://discuss.elastic.co/t/inspect-raw-json-source-data-from-vega-elasticsearch/330629>\
**Category:** Kibana\
**Tags:** vega\
**Created:** [April 24, 2023, 10:02am UTC](https://discuss.elastic.co/t/inspect-raw-json-source-data-from-vega-elasticsearch/330629 "2023-04-24T10:02:32Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![peppar](https://avatars.discourse-cdn.com/v4/letter/p/49beb7/32.png) [@peppar](https://discuss.elastic.co/u/peppar)\
**Post date:** [April 24, 2023, 10:02am UTC](https://discuss.elastic.co/t/inspect-raw-json-source-data-from-vega-elasticsearch/330629/1 "2023-04-24T10:02:32Z")

</div>

I'm trying to create advanced visualizations with Vega, but I'm having the hardest time guessing the dataset names. I'm fetching my data as such:

```auto
{
  "$schema": "https://vega.github.io/schema/vega/v4.json",
  "description": "My visualization",
  "data": {
    "url": {
      "%context%": true,
      "%timefield%": "@timestamp",
      "index": "my-index*",
      "body": {
        "aggs": {
          "time_buckets": {
            "date_histogram": {
              "field": "@timestamp",
              "interval": {"%autointerval%": true},
              "extended_bounds": {
                "min": {"%timefilter%": "min"},
                "max": {"%timefilter%": "max"}
              },
              "min_doc_count": 0
            }
          }
        },
        "size":0 
      }
    }
  }
}

```

I want to do subsequent transforms but I have no way of knowing the dataset names. I keep guessing them, as I cannot penetrate what appears to be a black box, even using `VEGA_DEBUG`.

I'd like to inspect the data, preferably as raw JSON, and then possibly re-inject it as static JSON data for further testing purposes on a limited subset.

In summary:

1. Is there a way to see what datasets are available in Vega v4?
2. Is there a way to export the source data, as seen by Vega v4, that can then replace the original query?

Thanks!

---

<div class="post-metadata">

**Author:** ![peppar](https://avatars.discourse-cdn.com/v4/letter/p/49beb7/32.png) [@peppar](https://discuss.elastic.co/u/peppar)\
**Post date:** [April 25, 2023, 7:58am UTC](https://discuss.elastic.co/t/inspect-raw-json-source-data-from-vega-elasticsearch/330629/2 "2023-04-25T07:58:59Z")

</div>

So embarrassingly there's a super simple way to inspect the data requests using the, erh, `Inspect` tab. This is all mentioned in the documentation at [Vega | Kibana Guide [8.7] | Elastic](https://www.elastic.co/guide/en/kibana/current/vega.html)

I can just copy what's under the `Response` tab into a JSON document for offline work. There are the replies to both my questions.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [May 23, 2023, 7:59am UTC](https://discuss.elastic.co/t/inspect-raw-json-source-data-from-vega-elasticsearch/330629/3 "2023-05-23T07:59:26Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
