JSON Data source
JSON Data source provides a quick and flexible way to issue queries to arbitrary RESTful endpoints that return JSON data.
The first step is to create the data source and provide
basic authcredentials. Note that basic auth credentials are optional, and you can provide a bearer token if that is your means of authenticating against the API
Creating a JSON data source
In the query editor, select the JSON data source created above and enter the query parameters. The query parameters use the YAML syntax. For E.g.
The following HTTP options are used for sending a query
The URL parameter is the only required parameter
url- This is the URL where the RESTful API is exposed
method- the HTTP method to use (default:
headers- a dictionary of headers to send with the request
auth- basic auth username/password (should be passed as an array:
params- a dictionary of query string parameters to add to the URL
data- a dictionary of values to use as the request body
json- same as
dataexcept that it’s being converted to JSON
The response data can be filtered by specifying the
pathfilter allows accessing attributes within the response, for e.g. if a key
fooin the response contains rows of objects you want to access, specifying
foowill convert each of the objects into rows.
In the example below, we are then selecting
fieldsvolumeInfo.authors, volumeInfo.title, volumeInfo.publisher and accessInfo.webReaderLink
The resulting data from the above query is a nicely formatted table that can be searched in Apica Ascent or made available as a widget in a dashboard