Provide data from an external source
You can create datasets containing data from an external source. This is useful if you want to import data from another system and use it to populate a picklist or display the data in a page or view.
Data from an external source must be supplied in JSON format. You can either add the JSON to the dataset properties, or fetch data in JSON format from an external API. Adding the JSON directly is useful for static data and for testing the format of data supplied by an API.
The JSON should be in one of the following formats:
- Multivalue JSON. For example
{"id":44,"name":"Jamie"}and{"id":45,"name":"Charlie"}as separate items in the multivalue. You can use an inline template to fetch JSON from multivalue casetype attributes. This format cannot be used when fetching data from an external URL. - A JSON array of JSON objects. For example
[{"id":44,"name":"Jamie"}, {"id":45,"name":"Charlie"}] - A JSON object with a key labelled
"results"that contains a JSON array. For example,{"results": [{"id":44,"name":"Jamie"}, {"id":45,"name":"Charlie"}]}
To add columns to a dataset containing data from an external source, set the column Field type to External and enter the JSON key in the External reference field.
Once you have added columns, you can add conditions to filter the data as normal. You can also create aggregate datasets based on the dataset of external data.