The Import:HTTP Request module extends the functionality of Import Feeds and enables you to automate the import process via HTTP requests, such as REST API calls. Data for import is gathered from the API response.
The Import Feeds module is required for this module to work.
Like other import feeds, HTTP Request feeds can be executed periodically using Scheduled Jobs.
Setup
To create an import feed using HTTP Request, select HTTP Request
as the Type. Then proceed with the standard import feed configuration up to the Data Sourcing panel.
For general import feed settings, see Import Feeds.
Data Sourcing
The Data Sourcing panel configures how data is retrieved from the HTTP endpoint.
- Format: Select the response format (JSON, XML, CSV, Excel), usually JSON or XML
- File: Upload a sample file to help the configurator understand the data structure
- Root Node: The element in the JSON/XML response that contains all records to be imported
- Excluded Nodes: Specify JSON/XML elements that should be excluded from source fields
- Array Nodes: Specify JSON/XML nodes that should be treated as leaf nodes—everything beneath each will be considered a single array for import.
- Request Offset: Number of the first record to process (first record is counted as 0)
- Request Limit: Maximum number of records to process in one import job
- Total Request Records: Total number of records to import. Leave blank if unknown - the feed will continue until receiving an empty result
- Method: HTTP request method (GET, POST, PUT, PATCH, DELETE)
- Connection: Select an existing Connection or create a new one for authorization data
- URL: The endpoint URL for the request. Supports Twig syntax for dynamic values Example:
https://demo.atropim.com/api/v1/Product?maxSize={{ limit }}&offset={{ offset }}&sortBy=createdAt&asc=false{% if payload.entityId is not empty %}&where[0][type]=equals&where[0][attribute]=id&where[0][value]={{ payload.entityId }}{% endif %}
- Request Body: Request body content (not required for GET requests)
- Merge Responses: When enabled, all responses are merged before processing in a single Import Job
Headers
In the Headers panel, you can specify custom headers needed to access the import data.
Next Steps
For detailed configuration steps, see Import Feeds.