Connect a REST API
Any HTTP(S) endpoint that returns JSON can be a datasource. AI Insights infers the schema from the first response and exposes it as a single virtual table.
What works
- GET endpoints returning a JSON array or an object with an array property
- HTTPS preferred; HTTP is supported for internal services
- Public APIs, private APIs with API-key headers, or APIs behind your gateway
Walkthrough
- Add Datasource → REST API.
- Enter the API URL (full URL including
https://). - (Optional) Add an API Key — sent as the
Authorizationheader. - Pick the HTTP method (default
GET). - Test & Load Fields — fields are inferred from the first response.
Example
URL: https://api.restcountries.com/v3.1/all?fields=name,population,region
Method: GET
AI Insights infers fields like name.common, population, region — usable directly as label/value in charts.
Tips
- Nested objects flatten to dot-notation field names.
- Arrays-of-objects work; arrays of scalars are joined with
,. - For very large responses, the platform stores the first 1,000 rows; for paginated APIs use the file URL connector with a server-side cursor or pre-aggregate.