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

Importing Users and Posts

Import related user and post records with the Import Tool from a public HTTP API. Use JSONPlaceholder as a demo source.

This path is an HTTP API example. You create a connection to a public REST API, import users, then add posts that depend on those users. It is separate from Importing Sample Products.

Work through each section in order from top to bottom. When you finish, continue with Embedding Comments on Posts to embed comments as a composite child on each post.

Before you start

See Access preparations for optional Import Tool access setup. For the full procedure, see Prerequisites for the Import Tool. JSONPlaceholder needs no API key.

Custom entities for this example

Create two custom entity types before you map fields. The entity ID must be capitalized.

  • DEMO_USER – standalone users; add mixin attributes whose Key values match the JSONPlaceholder user fields you want to import, for example id, name, username, and email

DEMO_USER mixin Fields tab with id name username and email
Mixin fields for `DEMO_USER`. Set custom **Key** values that match the JSONPlaceholder field names.
  • DEMO_POST – standalone posts; add mixin attributes for the post fields, for example id, userId, title, and body. Use Text for title and body, and a numeric type for id and userId if you prefer.

DEMO_POST mixin Fields tab with id userId title and body
Mixin fields for `DEMO_POST`. Set custom **Key** values that match the JSONPlaceholder field names.

Map from source matches source field names to mixin Key values. Keys are case-sensitive. Create the attributes first, then choose the matching Target schema version in Field Mapping.

For more details, see Custom Entities and Mixin Schemas.

Example data import preparation

This example reads the public JSONPlaceholder REST API. No authentication is required. The list endpoints return a JSON array:

  • GET https://jsonplaceholder.typicode.com/users

  • GET https://jsonplaceholder.typicode.com/posts

Users own posts (userId). See the JSONPlaceholder guide for the resource graph, including comments, albums, photos, and todos that you can add later.

Creating a connection

Store one HTTP connection named Demo User so every stream can call a list path on the JSONPlaceholder host.

1

Create the Demo User connection

In Management Dashboard, open the Import Tool perspective from the drop-down. In the sidebar, go to Connections and choose + New connection.

2

Enter the HTTP details

Enter the following connection details:

  • Name – Demo User

  • Source type – HTTP / REST API

  • Base URL – https://jsonplaceholder.typicode.com

  • Test endpoint – /users

  • Authentication – None

  • Field discovery – Choose None — each stream samples its own endpoint.

Save your configuration and then Test connection. When the connection is confirmed, you get a Connection OK notification.

Edit Connection dialog for HTTP / REST API with test endpoint and Connection OK
HTTP / REST API connection with Demo User base URL, test endpoint, and a successful connection test

Creating an import and the Demo User stream

Create the Demo User import, then add the Demo User stream that writes into DEMO_USER. Finish this stream before you add posts and comments.

1

Create the import

Go to Imports and choose + New import. Enter Demo User in Name and a short Description, then continue to the import details view.

2

Enter the stream request details

Choose + New stream and enter the following configuration details:

  • Name – Demo User

  • Connection – Demo User

  • Resource name – Demo User

  • Method – GET

  • Path – /users

  • Records path – (response is the array)

  • Response format – JSON

  • Pagination method – None (single request)

Choose Sample endpoint to call the path once and list the fields returned for the key picker.

New Stream dialog with HTTP request fields for Demo User
New Stream request details. Enter **Path** `/users` and **Records path** **(response is the array)**, then choose **Sample endpoint**.
3

Set the key and target

Continue in the same dialog and set:

  • Key field – id

  • Target – emporix.customEntity

  • Target type – DEMO_USER

You can leave Match by, in order, request parameters, and headers empty for this example. Save your configuration.

New Stream dialog with key field id and target type DEMO_USER
Key field, target, and target type for the Demo User stream

The stream appears on the Demo User import. You can review its Source, Target, HTTP endpoint, and Key resolution tabs before you map fields.

Configuring the HTTP endpoint

The stream HTTP endpoint tab holds the request the import sends. Confirm the method, path, and records path match the JSONPlaceholder users list before you map fields.

On the stream row, choose the edit icon. Open the HTTP endpoint tab. On Endpoint, confirm that these values match what you set when you created the stream:

  • Method – GET

  • Path – /users

  • Response format – JSON

  • Records path – (response is the array)

Choose Save if you change anything.

HTTP endpoint tab with GET path and records path for Demo User
HTTP endpoint settings for the Demo User stream

Mapping and publishing fields

Field mapping tells the import how source fields become DEMO_USER attributes. Fetch a sample, map the fields, then publish before you run a real import.

1

Open the field mapping editor

On the stream row, open the Edit mapping by choosing the pencil icon.

2

Fetch a sample and map fields

Choose the Target schema version for your DEMO_USER type. Choose Fetch sample to load sample source records for preview.

Choose Map from source. When source field names match attributes on the target schema (defined by Key on the Emporix mixin schema), the Import Tool adds those mappings automatically.

If the fields differ, choose + Add row and then select the Source Field and Target Field manually. Nested objects such as address and company often need manual rows or can stay unmapped for this first import.

Target Field lists mixin schema attributes only. You cannot map into the instance Name on the General tab. The Custom Instances list Id and Name stay key-based, for example id-1. The person's name from JSONPlaceholder appears on the mixin tab after you open the instance.

Field Mapping with source fields mapped to DEMO_USER target attributes
Field Mapping after fetching a sample and mapping source fields to the DEMO_USER schema
3

Preview, save, and publish

Choose Save and then Preview to check the mapped values. If the values are OK, Publish the stream mapping.

Until you publish, the mapping stays a draft. Real runs use the last published version, or fail if nothing is published yet. Publish again after every mapping change you want real imports to use.

Field Mapping preview with sample user record values
Mapping preview for a sample JSONPlaceholder user
Publish Mappings dialog
Publish Mappings dialog that makes the draft live for real runs

Return to the import details view before you run the import.

Running the Demo User import

Preview the mapped output with a dry run, then run a full import to write the user records.

1

Preview with a dry run

In the import details view, choose Dry run. Keep Published mappings selected, choose a sample size, then choose Run dry run.

Dry run dialog for the Demo User import
Dry run options for a safe preview without writing to the target

After the dry run finishes, choose Dry run again, then choose View mapped sample. The dialog shows the mapped output that the import would write, without writing it.

Dry-Run Mapped Sample dialog with mapped user records
Mapped sample from a dry run for the Demo User stream
2

Run a full import

Choose Run options and then Run Full. Confirm the stream selection, then choose Run streams.

Run Options dialog with Run Delta, Run Full, and Run Full Force
Run Options with full, delta, and force modes. Choose **Run Full** for this learning path.

Go to the Imports view and choose Refresh to update the import status and error counts.

Reviewing results in Import Tool

After a successful run, check the Import Tool views for run counts, imported records, and dashboard metrics.

1

Review run history

From the import actions menu, choose Run history. You can expand the run and check the record counts and logs for each stream.

Import actions menu with Run history highlighted
Import actions menu with Run history
Run history with succeeded full and dry runs
Run history with per-stream logs and record counts
2

Inspect imported records

From the stream actions menu, choose View imported data. Each row shows the source Key, the target Emporix ID, Outcome (for example UPSERTED), and Imported At.

Stream actions menu with View imported data highlighted
Stream actions menu with View imported data
Imported Data list with keys, Emporix IDs, and UPSERTED outcomes
Imported data for the Demo User stream
3

View the job results on the Import Tool Dashboard

From the import actions menu, choose View this job in the dashboard, or open the Dashboard view.

Reviewing results in Management Dashboard

The Import Tool writes the users as custom entity instances. Check the same records in the Management Dashboard, outside of the Import Tool perspective.

1

Open the DEMO_USER instances

In Management Dashboard, go to Custom Instances and open the list for your DEMO_USER type. The list shows the imported instances with each record's Id, Name, and Created At.

The Id and list Name values come from the stream key, for example id-1 when Key field is id. They match the Emporix ID values from Imported Data. Field Mapping cannot write the JSONPlaceholder person name into those columns because Target Field only offers mixin schema attributes.

Custom Instances list of DEMO_USER records with id-based names
Imported DEMO_USER instances. List **Id** and **Name** use the stream key, for example `id-1`.
2

Open an imported user

Open one instance, for example id-1. On the mixin tab, for example Demo User, check that the mapped attributes show the imported values. For user 1, Name is Leanne Graham and Email is Sincere@april.biz.

The mixin Name is the mapped source field. It is separate from the instance Name on General, which Field Mapping cannot target.

DEMO_USER instance id-1 with mapped Name and Email on the Users tab
Mapped attributes on instance **id-1**. Mixin **Name** shows Leanne Graham.

Adding posts that depend on users

JSONPlaceholder posts point at a user through userId. Add a second standalone stream so posts wait for users, then map into DEMO_POST.

1

Create the Posts stream

On the Demo User import, choose + New stream and enter:

  • Name – Demo Post

  • Connection – Demo User

  • Resource name – Demo Post

  • Method – GET

  • Path – /posts

  • Records path – (response is the array)

  • Response format – JSON

  • Pagination method – None (single request)

Choose Sample endpoint to call the path once and list the fields returned for the key picker. Then set:

  • Key field – id

  • Target – emporix.customEntity

  • Target type – DEMO_POST

Save the stream.

New Stream dialog for the Demo Post stream with DEMO_POST target
Demo Post stream with path `/posts`, key field `id`, and target type `DEMO_POST`. Choose **Sample endpoint** before you pick the key field.
2

Set the Demo User dependency

On the Demo Post stream row, open the Target tab. In Depends on, choose the Demo User stream, then Save.

Demo Post stream Target tab with Depends on set to Demo User
Target settings for Demo Post with **Depends on** set to the Demo User stream

The parent stream must run first. You can confirm the order from the import actions menu under Run order, or on the Dependency graph tab. See Configuring Streams.

Import Demo User with Demo Post Depends on Demo User and Run order in the actions menu
Demo Post depends on Demo User. Use **Run order** in the import actions menu to confirm the sequence.
3

Check key resolution

Open the Demo Post stream Key resolution tab.

4

Map and publish Demo Post

Choose Edit mapping. Select the DEMO_POST Target schema, choose Fetch sample, then Map from source. If mixin keys match the sample (id, userId, title, body), those rows appear automatically. Use + Add row only for fields that did not match.

Save and Publish the Demo Post mapping before you run again.

5

Run Full again

Choose Run options and Run Full. Demo User records upsert in place and Demo Post records are created or updated.

Open a DEMO_POST instance in Custom Instances and check that the mapped attributes show values such as Title, Body, and userId.

DEMO_POST instance id-1 with mapped Demo Post attributes
Mapped attributes on a `DEMO_POST` instance after the full run.

What to do next

Continue with Embedding Comments on Posts to add a composite child stream that embeds JSONPlaceholder comments on each post.

JSONPlaceholder has the same parent and child pattern for other resources. You can add streams later without changing the connection:

  • Albums – /albums (userId) as another standalone type that Depends on Demo User

  • Photos – /photos (albumId) as a composite child embedded on albums

  • Todos – /todos (userId) as a standalone type that Depends on Demo User

Use the other Import Tool guides for options this trail does not cover:

Troubleshooting

If a step in this path fails, use the table to match the symptom and what to do next.

Problem
What to do

Test connection is unavailable

Choose Save first. You can test only after the connection is stored.

Test connection fails

Confirm Base URL is https://jsonplaceholder.typicode.com, Test endpoint is /users, and Authentication is None.

Fetch sample returns no records

Confirm Path is /users or /posts, and Records path is (response is the array).

Key field picker is empty

Choose Sample endpoint after you set Path and Records path, then select id from the returned fields.

Map from source adds no rows

Confirm the DEMO_USER or DEMO_POST custom entity and its attributes exist, then choose the correct Target schema version. Add unmatched fields with + Add row.

Dry run or Full run fails, or Field Mapping shows Never published

Choose Publish on each stream mapping, then open Run history for the per-stream error.

View mapped sample is unavailable

Run a Dry run first, then open View mapped sample.

Imported Data is empty

Confirm you opened View imported data for this stream, and that the last full run created or upserted records. Dry runs do not write target records.

Demo Post runs before Demo User

Set Demo Post Depends on Demo User, then check Run order.

Custom Instances shows no users or posts

Confirm the full run succeeded in Run history, then open Custom Instances for DEMO_USER or DEMO_POST. Check Target type on each stream.

Last updated

Was this helpful?