Loading a REST call response JSON with Vega-Lite, is it possible?

Hello,

I started using Vega plugin and trying to load data from a url, which is actually a REST call that returns a json file.

Is it doable?

yes, just unless you need to send some special headers to your endpoint ?

Thanks, no I don't.

Should I just write the get request as

"data": {
"url" : "http://172.........:8086/.............?servletContext=...........&format=json"
}

like this?

I did but nothing happens.

You need to specify format so vega knows where/how to pull rows out of the response.
Checkout the vega documentation for more details https://vega.github.io/vega-lite/docs/data.html#url

"data": {
  "url": "myurlthatreturnsjson",
  "format": {
    "type": "json",
    "property": "path.to.rows"
  }
}

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