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 exampleid,name,username, andemail

DEMO_POST– standalone posts; add mixin attributes for the post fields, for exampleid,userId,title, andbody. Use Text fortitleandbody, and a numeric type foridanduserIdif you prefer.

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/usersGET 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.
Enter the HTTP details
Enter the following connection details:
Name –
Demo UserSource type – HTTP / REST API
Base URL –
https://jsonplaceholder.typicode.comTest endpoint –
/usersAuthentication – 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.

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.
Enter the stream request details
Choose + New stream and enter the following configuration details:
Name –
Demo UserConnection – Demo User
Resource name –
Demo UserMethod – GET
Path –
/usersRecords 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.

Set the key and target
Continue in the same dialog and set:
Key field –
idTarget –
emporix.customEntityTarget type –
DEMO_USER
You can leave Match by, in order, request parameters, and headers empty for this example. Save your configuration.

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 –
/usersResponse format – JSON
Records path – (response is the array)
Choose Save if you change anything.

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.
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.

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.


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.
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.

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.

Reviewing results in Import Tool
After a successful run, check the Import Tool views for run counts, imported records, and dashboard metrics.
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.
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.

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.

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.
Create the Posts stream
On the Demo User import, choose + New stream and enter:
Name –
Demo PostConnection – Demo User
Resource name –
Demo PostMethod – GET
Path –
/postsRecords 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 –
idTarget –
emporix.customEntityTarget type –
DEMO_POST
Save the stream.

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.

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.

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.
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.

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 UserPhotos –
/photos(albumId) as a composite child embedded on albumsTodos –
/todos(userId) as a standalone type that Depends on Demo User
Use the other Import Tool guides for options this trail does not cover:
Importing Using HTTP – pagination, headers, and the Import Service API
Importing from Celonis – Celonis credentials, catalog, and PQL
Configuring Streams – delta fields, composites, deletes, and health
Running and Monitoring Imports – schedules, run modes, and run order
Field Mapping – mapping into existing fields and transforms
Troubleshooting
If a step in this path fails, use the table to match the symptom and what to do next.
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?






