Overview
The REST API source connects Lens to any vendor that exposes a JSON endpoint, even ones without a dedicated connector. Adthena market share, BrightEdge keyword data, a partner reporting API: if it returns JSON over HTTP, Lens can poll it on a schedule, walk the pages, and load the records into a table.
The setup is a series of panels that describe the request: the URL and method, authentication, pagination, how to pass the date range, and where the records live in the response. A Test and Scan step calls the API live so you can confirm it works and discover the available fields before you save.
Set the URL and method
Open Lens > Tables, click + New Table, and choose REST API. Name the table, then enter the Base URL (without the path) and the Endpoint Path. Use {'{param_name}'} in the path for path parameters, which get filled from the Path Parameters list below. Choose the HTTP Method, GET or POST. For POST, fill in the Request Body (JSON) and use {'{start_date}'} and {'{end_date}'} as date placeholders.
Add Static Query Parameters for values sent on every request, and Extra Headers for anything the API needs beyond auth.
Configure authentication
Under Authentication, pick an Auth Type: None, Use Existing Connection, API Key (Custom Header), Bearer Token, Basic Auth, or API Key (Query Parameter). Header and query-param keys take a name and value; Bearer takes a token; Basic takes a username and password. Connection mode pulls stored credentials from your Security and Access connections so secrets aren't duplicated on the table.
Pagination and date parameters
Under Pagination, choose None for a single request, or Page-based or Offset-based to walk multiple pages. For paged modes set the Page Parameter, Page Size Parameter, and Page Size (default 1000). Under Date Parameters, set the Start Date Parameter, End Date Parameter, and Date Format (YYYY-MM-DD, YYYYMMDD, YYYYMM, or ISO 8601). Leave these blank if the API doesn't filter by date. Set Backfill Days (default 30) for how much history a full sync fetches.
Map the response and sync
Under Response Mapping, set the Data Path, the dot-notation path to the array of records (for example results or data.items). Leave it blank if the response is a root-level array. Choose Full Refresh or Incremental. Then open Column Mapping and click Test and Scan Fields to call the API, confirm it works, and list the fields it found. Use + Add Custom Field for anything the scan misses. Pick a schedule, then Save and Sync.
Use the Test and Scan step before saving. It calls the live endpoint with your auth and pagination settings, so a green scan confirms the whole request is wired correctly, not just the URL.
A mismatched Date Format silently sends the wrong date strings, which often returns an empty or wrong-range response with no error. If a sync comes back empty, check the Date Format matches exactly what the API documents.
Troubleshooting
Test and Scan returns no fields
The Data Path is probably wrong. If the records are nested under a key like results or data.items, set that dot-path. If the response is a bare top-level array, leave Data Path blank. A path that points at an object rather than an array yields nothing to scan.
The scan fails with an auth error
Recheck the Auth Type and credentials. Header and query-param keys need both the correct name and value; Bearer needs a valid token; Connection mode needs the right stored connection selected. Some APIs also require a specific Accept or content-type header, which goes in Extra Headers.
Only the first page of data loads
Pagination is set to None, or the page parameters don't match the API. Set Page-based or Offset-based and confirm the Page Parameter and Page Size Parameter names match what the API expects.