As with other data sources, Polytomic enables syncing from arbitrary HTTP APIs using a data model.
Polytomic supports the following when extracting data from HTTP APIs:
- GET and POST requests
- JSON responses
- Pagination ("next page" tokens or URIs; page size support)
- Extracting elements based on a JSONPath expression
- Custom HTTP headers/parameters
- In Polytomic, go to Connections → Add Connection → HTTP API.
- Fill in the config fields. Here is a brief explanation of the various fields:
- Base URL: the API's base URL. This can be a host (e.g. https://api.service.com) and can include a path if needed (e.g. https://service.com/api). To avoid having to revise your models, try to pick the shortest common path for your endpoints.
- Headers/Query String Parameters (optional): any parameter that you need to include on every request can be put here. For example: a header containing your authorization key or token.
- Healthcheck endpoint (optional): a path that Polytomic will use to check if it can reach your API. Polytomic will periodically ping this endpoint with your included headers. A good option is a path that requires authentication. For example, many APIs supply a
/tokeninfothat you can use to make sure your authentication is working. Enter the path only (e.g.
- Click Save.
Updated 4 months ago