For the complete documentation index, see llms.txt. This page is also available as Markdown.

Importing Using HTTP

This example shows how to create an HTTP / REST API connection and a stream that imports records from an HTTPS source into Emporix.

This example shows how to use the Import Tool with an HTTPS REST API: create an HTTP / REST API connection, discover source fields, then create a stream that calls the endpoint and writes records into Emporix.

The walkthrough uses a public Petstore-style API with connection Petstore, resource findPetsByStatus, and GET /pet/findByStatus. Replace the base URL, path, and target type with your own source when you import production data.

Complete the Emporix Prerequisites for the Import Tool first. For the general UI procedures, see Connections, Imports, and Streams.

Source API requirements

The source must be reachable over HTTPS from the Import Tool.

For this example, the API:

  • Exposes records on an HTTPS Base URL, for example https://petstore.swagger.io/v2.

  • Returns JSON. The records can be the response body itself, or nested under a records path.

  • Provides a stable identifier per record, for example id, so the stream can upsert.

If the API requires credentials, set Authentication on the connection to the method the source uses. This example uses None because the sample Petstore endpoint is public.

Create an HTTP connection

Follow Create a connection and HTTP / REST API. For this example, use:

  • Name – Petstore

  • Source type – HTTP / REST API

  • Base URL – https://petstore.swagger.io/v2

  • Authentication – None for this public example

  • Test endpoint – /pet/findByStatus if you want Test connection to call the list endpoint

Choose Save, then choose Test connection. You can test only after the connection is stored.

For field discovery, leave None — each stream samples its own endpoint, then sample from the stream HTTP endpoint. If the API publishes a specification, choose that format instead, enter the spec location, and choose Discover fields.

Create a stream from the HTTP source

1

Create the stream

Create a stream with name My Pets, connection Petstore, Resource name findPetsByStatus, Method GET, Path /pet/findByStatus, Records path (response is the array), key field id, target emporix.customEntity, and target type PETSTORE_PET.

2

Configure the HTTP endpoint

Expand the stream and open the HTTP endpoint tab. On Endpoint, set:

  • Method – GET

  • Path – /pet/findByStatus

  • Response format – JSON

  • Records path – (response is the array)

Choose Save. For pagination, parameters, and headers, see HTTP endpoint.

3

Complete the stream setup

Complete the stream's source and target configuration, then map and publish its fields. Map from source matches source names to mixin Key values; unmatched fields need + Add row. Publish the mapping before a real run.

Run the HTTP import

In the import details view, choose Dry run to validate without writing. To import records, open Run options and choose the required full or delta mode. Scheduled runs use DELTA mode. See Running and Monitoring Imports.

You can also trigger the same import from the Import Service API after the configuration exists. Use a token with the importtool.import_trigger scope.

To validate without writing:

To run a full import:

List configurations with GET /importtool/{tenant}/configs to obtain {configId}. For monitoring, cancellation, and imported-record search, see the Import Service tutorial.

Next steps

Last updated

Was this helpful?