An Other REST API import brings records into Vega from almost any web system that returns data as JSON. Vega fetches a real response, finds the columns for you, and you map them to Vega fields. You don't need a developer.
In this article
- Before you begin
- Step 1 – Create the connection
- Sign in with OAuth2
- Step 2 – Create the import
- Step 3 – Discover the columns
- Fetch only new records with time windows
- Step 4 – Map, review and run
- Limits
Before you begin
Ask whoever runs the other system for:
- the web address of the API (it must start with
https://) - how to sign in: an API key, a username and password, a token, or OAuth2 details
- the path of the list you want, for example
/v1/supporters - any parameters the list needs, such as a page size or a campaign number
Important: Don't use an Other REST API import for donations, card numbers, bank details or other payment data. Those need a purpose-built connector – contact Vega support at support@vega.works. A run stops before anything reaches Vega if the data looks like card numbers.
Step 1 – Create the connection
- Go to Settings → Connections and select + New connection.
- Enter a Name and choose Other REST API (discovered) as the Kind.
- If you have a full example address, paste it into Paste an API URL (optional) and select Use URL. Vega fills in the Base URL and adds an endpoint when you save. If the address contains a key, Vega removes it and offers to send it as an API key instead: accept this so the key is encrypted.
- Choose the Authentication and enter the details. For an API key, ask the provider whether it goes in A header or A query parameter.
- Add any Custom headers the API needs, marking secret values as sensitive.
- Select Test connection, then Create connection.
- Under Endpoints, check the endpoint, or select + Add endpoint to add one. Leave Records path blank and Vega finds the list of records for you.
Note: The connection test only checks that Vega can reach the API and sign in. Discovering the columns (step 3) proves it returns data.
Sign in with OAuth2
Choose OAuth2 under Authentication, then the Grant type the provider gives you:
| Grant type | What to do |
|---|---|
| client_credentials – one system talks to another | Enter the Token URL, Client ID and Client secret, and a Scope or Token request parameters if the provider asks for them. Select Test connection. |
| authorization_code – a person signs in once and gives access | Enter the Token URL, Authorize URL and Client ID (the Client secret is optional). Select Connect, sign in on the provider's page and approve. Back in Data Exchange, you'll see who authorised it. |
For authorization_code, the provider must allow Data Exchange's sign-in return address. Contact Vega support at support@vega.works for the address to give them.
Vega renews the sign-in by itself, so scheduled runs keep working. If the provider withdraws access, you'll see "The saved authorization expired or was revoked. Reconnect to resume unattended runs." Select Reconnect and sign in again.
Step 2 – Create the import
- Select + New import. Under Start from scratch, choose Other REST API.
- Enter an Import name and select Create import.
- On wizard step 1, pick the Source connection and Source endpoint.
- Check the Source parameters. They are copied from the endpoint, and you can change them here.
- Select Connect & preview →.
Step 3 – Discover the columns
- Under How runs fetch, choose:
- Everything at once (manual runs): each run fetches the whole list. It can't be scheduled. Use it for small lists or one-off loads.
- Time windows (schedulable): each run fetches only what's new. See the next section.
- Select Discover. Vega fetches one real response from the API.
- If the response holds more than one list, choose one under Where are the records?
- Check the columns and the preview. Nested fields show with dots, for example
address.city. - Select Confirm columns, then Map fields →.
Only the column names you confirm are saved. If you discover again later and the new columns would remove some of your mapping uses, Vega warns you before you select Replace anyway.
Fetch only new records with time windows
With Time windows, each run asks the API for one span of time at a time, so it only picks up new records. The API must accept a "from" and a "to" date. Fill in these settings before you select Discover:
| Setting | What it means |
|---|---|
| 'From' parameter and 'To' parameter | The names the API uses for the start and end of the span, for example updated_from and updated_to. Ask the provider. |
| Time format | How the API expects dates and times. |
| Window size | How long each span is, in minutes, hours or days. |
| Each run fetches | Complete windows only (the default), or every window up to now. |
| Windows per run | How many windows one run may fetch. Raise it to catch up faster. |
| First run starts | One window before now, or a date you choose, to load older records. |
| Range ends (optional) | A date to stop at. |
A box under the settings shows exactly what the next run will ask for. Times here are UTC. If the first window has no records, use Probe an earlier window with a date you know has data.
Step 4 – Map, review and run
- On Map fields, the mapping starts empty. Map each column you need. See Mapping fields.
- For the identity entry, use the API's own record ID. Use Row number (generated) only if the API has no ID, because row numbers change between runs.
- On Schedule, choose On a schedule only for a time-window import.
- On Review, choose Review first for the first few runs, then select Create and run →.
On the run in History, Fetched shows the span the run read. Advisories tell you about new columns in the source, or that the import is still catching up. Advisories don't stop the run. To import a new column, edit the import, select Discover again, confirm and map it.
Limits
- A run takes up to 10,000 records. If there are more, the run stops without importing. Add a filter parameter, or use smaller time windows.
- Each run makes one request per window and doesn't follow "next page" links. Set the API's page size high.
- Only GET requests to public
https://addresses are supported, and redirects aren't followed. - Keys and tokens can't go in the parameters. Put them on the connection.
- If you change the endpoint, discover and confirm the columns again before the next run.
Related articles
Some content in this article may have been developed with the assistance of AI tools and reviewed by staff.
Comments
0 comments
Please sign in to leave a comment.