Using the Rest API source provides access to read data from HTTP endpoints such as Rest Web Services. Use the Rest API source component to define the authentication method, request parameters, and response fields to use in the package.
- None - No authentication
- Basic - Use basic authentication (user and/or password).
- Connection - Use an Integrate.io ETL connection to handle authentication automatically.
Request and response
- method - The HTTP method. Select GET (default) or POST.
- URL - Enter the URL of your source endpoint.
- Headers - Optionally add request headers (names and values)
- Body - Optionally add a request body string
Pagination scheme - The method to paginate through response data (e.g. page number, offset+limit, cursor, link headers) and how to detect the final page.
- Automatic (Default) - the source detects the pagination scheme to use by the URL host/path.
- Jira - Use with hosted Jira installations.
- Magento - Use with hosted Magento installations.
- BigCommerce - Use with hosted BigCommerce installations.
- Elasticsearch - Use with hosted Elasticsearch installations.
- Link headers - the fallback option which will be used with the default automatic as well.
- Sleep interval between paginated requests (ms) - use to throttle API requests to avoid rate limitations. Default is 0 (no sleep).
- Maximum paginated requests - use to control the maximum number of pages for the source to go through. Default is unlimited, 0 or 1 means a single request will be made.
Select the response type to determine how to parse the response from the API endpoint.
- Raw - returns 3 fields: status code (integer), body (string) and headers (map).
JSON - Response is processed using a JSONPath expression.
You can use a custom JSONPath expression to extract nested objects and arrays or the presets for object and array. Using the object preset, the response fields are the keys of the JSON object. Using the array preset, the response fields are the keys of the JSON objects within the array and each object is returned as a record in the component's output.
- Line Delimited JSON - Response is a single JSON object per line. Note that the response as a whole is not a valid JSON. The response fields are the keys of the JSON objects and each object is processed as a record.
- Line Delimited raw data - Response is broken to record per line. Useful when data contains records delimited by new line.
After defining the request and the response, select the fields to use in the source.