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

Streams

Read the streams of a configuration.

Retrieving all streams of a configuration

get

Retrieves the streams belonging to a configuration, ordered by seq.

Required scopes
This endpoint requires the following scopes:
  • : Needed to trigger, schedule, monitor, and cancel import runs; to manage a file-based stream's file queue; and to read configurations, streams, schedules, runs, and imported data.
Authorizations
OAuth2clientCredentialsRequired
Token URL:
Path parameters
tenantstringRequired

The tenant you want to access.

Example: mytenant
configIdstring · uuidRequired

The configuration identifier.

Example: 7c9e6679-7425-40de-944b-e07fc1f90ae7
Responses
200

The request was successful. The streams are returned.

application/json

A stream that extracts from a source, maps fields, and upserts into an Emporix target type.

idstring · uuidOptional

The stream identifier.

Example: 3fa85f64-5717-4562-b3fc-2c963f66afa6
configIdstring · uuidOptional

The parent configuration.

Example: 7c9e6679-7425-40de-944b-e07fc1f90ae7
namestringOptional

The stream name.

Example: Products
sourceEntitystringOptional

The logical source entity or record.

Example: PRODUCT
targetWriterstringOptional

Where the stream writes. Possible values:

  • emporix.customEntity – instances of a custom entity type, named by targetType.
  • emporix.product – products, including parents and variants. STANDALONE streams only.
  • emporix.category – categories of the tenant's category tree. STANDALONE streams only.
  • emporix.price – prices of products.
  • emporix.availability – stock of products at a site.
  • emporix.media – images of products, linked by URL. The images stay where they are hosted.
  • emporix.categoryAssignment – assignments of products to existing categories.

The price, availability, media, and category assignment writers are normally used by a FAN_OUT stream whose parent is a product stream. The FAN_OUT stream supplies each product's identifier as productId. A STANDALONE stream that uses them maps productId itself.

The writers other than emporix.customEntity are catalog writers. The Management Dashboard offers them only to tenants for which Emporix has enabled catalog targets. To have them enabled, contact Emporix support.

Example: emporix.customEntity
targetTypestringOptional

For emporix.customEntity, the custom entity type the stream writes to. For the other writers, a label that groups the stream's imported records, for example in imported data and statistics. Defaults to PRODUCT for emporix.product and CATEGORY for emporix.category. For a FAN_OUT stream into a catalog writer, the service sets the label.

Example: product
seqintegerOptional

The stream's position in the configuration. Streams are listed in this order. When dependencies do not decide the run order, streams run in this order.

Example: 0
modestring · enumOptional

How the stream contributes to the target. Possible values:

  • STANDALONE – reads its source and writes its own target objects.
  • COMPOSITE_CHILD – reads its source and writes into the objects of the stream named in compositeParent.
  • COMPOSITE_MERGE – reads its source and adds fields to the objects of the stream named in compositeParent.
  • FAN_OUT – has no source of its own. It reads the records the stream named in compositeParent wrote in the same run, and writes further objects for each of them, for example a product's prices. It runs after that stream. Objects it created earlier for a record that no longer lists them are removed.
Example: STANDALONEPossible values:
fanOutPathstringOptional

FAN_OUT only. The array in the parent record whose elements each produce one target object, for example prices[]. When omitted, one target object is written per parent record.

Example: prices[]
fanOutKeystringOptional

FAN_OUT only. The element field that identifies an element of fanOutPath, for example currency, so that a target object keeps its identity when the elements change order. When omitted, a scalar element identifies itself and an object element is identified by its position.

Example: currency
fanOutbooleanRead-onlyOptional

Whether the stream is a FAN_OUT stream with a parent. Derived from mode and compositeParent.

Example: false
deltaFieldstringOptional

The source field whose value is tracked as the delta watermark. A delta run extracts only the records whose value is newer than the last run's.

Example: LASTCHANGEDATE
deltaFieldFormatstring · enumOptional

How the delta field's values are formatted, so they can be compared correctly.

Example: DATEPossible values:
compositeParentstringOptional

For a COMPOSITE_CHILD, COMPOSITE_MERGE, or FAN_OUT stream, the name of the stream it contributes to or fans out from.

Example: invoices
linkingFieldstringOptional

For a composite child stream, the source field holding its parent's key.

Example: INVOICE_ID
embedAttributestringOptional

For a composite child stream, the parent attribute its records are embedded into.

Example: lineItems
childStrategystring · enumOptional

How a composite child's records reach the parent object.

Example: EMBEDPossible values:
writeStrategystring · enumOptional

How an existing target object is updated. Possible values:

  • PATCH – changes only the mapped fields and keeps everything else.
  • MERGE_PUT – reads the object, merges the mapped fields into it, and writes it back whole.
  • REPLACE_PUT – replaces the whole object, so fields this import does not manage are cleared.

The values a stream can use depend on its target writer. The following values are available per writer, with the default listed first:

  • emporix.customEntity – PATCH, MERGE_PUT, REPLACE_PUT.
  • emporix.product and emporix.category – PATCH.
  • emporix.media – PATCH, REPLACE_PUT.
  • emporix.price, emporix.availability, and emporix.categoryAssignment – REPLACE_PUT.
Example: PATCHPossible values:
discriminatorFieldstringOptional

A source field whose value routes each record to a different target type, as defined by discriminatorMap.

Example: DOCUMENT_TYPE
createdAtstring · date-timeOptional

When the stream was created.

Example: 2024-05-01T09:00:00.000Z
enabledbooleanOptional

Whether the stream is active.

Example: true
connectionIdstring · uuidOptional

The source connection this stream reads from, when it has its own. Omitted means the configuration's default connection is used. One configuration can therefore mix sources.

Example: 2b069ad4-ee40-4c1d-9151-898ad59bd88a
fileModestring · enumOptional

For a file-based source, what one file represents. SNAPSHOT: each file is the whole picture, so only the most recently arrived one is read, and the per-record content hash decides what is written. A record missing from a newer file is not deleted. INCREMENTAL: each file is a change set, so every queued file is read in order and a later file's values win. Defaults to SNAPSHOT.

Example: SNAPSHOTPossible values:
snapshotFilesbooleanRead-onlyOptional

Whether the stream treats each file as a snapshot. true unless fileMode is INCREMENTAL.

Example: true
parentKeyFieldstringOptional

For an EMBED composite child, the source column its parent matches records by. Required for such a stream: without it the parent cannot find its children and writes an empty array.

Example: INVOICE_ID
hashIncludesDeltaFieldbooleanOptional

Whether the delta field counts as content when deciding a record has changed. Off by default: a modified timestamp is metadata about a change, not content, and a source that restamps every row on reload would otherwise make every run rewrite the whole table. Turn it on only when the timestamp moving genuinely means the record is different.

Example: false
abortOnSchemaVersionDriftbooleanOptional

Whether to refuse to start a run when a pinned mixin's current version has moved past the pinned one, before any record is read. Opt-in, and bypassed by triggering a run with force.

Example: false
dependsOnstring[]Optional

Names of streams that must run before this one, beyond the ordering a composite parent already implies. A product stream whose variantRole is VARIANT lists here the stream of the same configuration that imports its parent products, if there is one, so that the parents are written first.

nameFieldstringOptionalDeprecated

The source field used as the instance's display name. Superseded by mapping a field to the standard name attribute, which a mapping's transformations also apply to; a name mapping wins over this property. Kept for streams configured before that existed.

Example: VENDORNAME
get/importtool/{tenant}/configs/{configId}/streams
GET /importtool/{tenant}/configs/{configId}/streams HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Accept: */*
[
  {
    "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
    "configId": "7c9e6679-7425-40de-944b-e07fc1f90ae7",
    "name": "Products",
    "sourceEntity": "PRODUCT",
    "targetWriter": "emporix.customEntity",
    "targetType": "product",
    "mode": "STANDALONE",
    "enabled": true
  }
]

Retrieving a stream

get

Retrieves a single stream by its identifier.

Required scopes
This endpoint requires the following scopes:
  • : Needed to trigger, schedule, monitor, and cancel import runs; to manage a file-based stream's file queue; and to read configurations, streams, schedules, runs, and imported data.
Authorizations
OAuth2clientCredentialsRequired
Token URL:
Path parameters
tenantstringRequired

The tenant you want to access.

Example: mytenant
idstring · uuidRequired

The resource identifier.

Example: 7c9e6679-7425-40de-944b-e07fc1f90ae7
Responses
200

The request was successful. The stream is returned.

application/json

A stream that extracts from a source, maps fields, and upserts into an Emporix target type.

idstring · uuidOptional

The stream identifier.

Example: 3fa85f64-5717-4562-b3fc-2c963f66afa6
configIdstring · uuidOptional

The parent configuration.

Example: 7c9e6679-7425-40de-944b-e07fc1f90ae7
namestringOptional

The stream name.

Example: Products
sourceEntitystringOptional

The logical source entity or record.

Example: PRODUCT
targetWriterstringOptional

Where the stream writes. Possible values:

  • emporix.customEntity – instances of a custom entity type, named by targetType.
  • emporix.product – products, including parents and variants. STANDALONE streams only.
  • emporix.category – categories of the tenant's category tree. STANDALONE streams only.
  • emporix.price – prices of products.
  • emporix.availability – stock of products at a site.
  • emporix.media – images of products, linked by URL. The images stay where they are hosted.
  • emporix.categoryAssignment – assignments of products to existing categories.

The price, availability, media, and category assignment writers are normally used by a FAN_OUT stream whose parent is a product stream. The FAN_OUT stream supplies each product's identifier as productId. A STANDALONE stream that uses them maps productId itself.

The writers other than emporix.customEntity are catalog writers. The Management Dashboard offers them only to tenants for which Emporix has enabled catalog targets. To have them enabled, contact Emporix support.

Example: emporix.customEntity
targetTypestringOptional

For emporix.customEntity, the custom entity type the stream writes to. For the other writers, a label that groups the stream's imported records, for example in imported data and statistics. Defaults to PRODUCT for emporix.product and CATEGORY for emporix.category. For a FAN_OUT stream into a catalog writer, the service sets the label.

Example: product
seqintegerOptional

The stream's position in the configuration. Streams are listed in this order. When dependencies do not decide the run order, streams run in this order.

Example: 0
modestring · enumOptional

How the stream contributes to the target. Possible values:

  • STANDALONE – reads its source and writes its own target objects.
  • COMPOSITE_CHILD – reads its source and writes into the objects of the stream named in compositeParent.
  • COMPOSITE_MERGE – reads its source and adds fields to the objects of the stream named in compositeParent.
  • FAN_OUT – has no source of its own. It reads the records the stream named in compositeParent wrote in the same run, and writes further objects for each of them, for example a product's prices. It runs after that stream. Objects it created earlier for a record that no longer lists them are removed.
Example: STANDALONEPossible values:
fanOutPathstringOptional

FAN_OUT only. The array in the parent record whose elements each produce one target object, for example prices[]. When omitted, one target object is written per parent record.

Example: prices[]
fanOutKeystringOptional

FAN_OUT only. The element field that identifies an element of fanOutPath, for example currency, so that a target object keeps its identity when the elements change order. When omitted, a scalar element identifies itself and an object element is identified by its position.

Example: currency
fanOutbooleanRead-onlyOptional

Whether the stream is a FAN_OUT stream with a parent. Derived from mode and compositeParent.

Example: false
deltaFieldstringOptional

The source field whose value is tracked as the delta watermark. A delta run extracts only the records whose value is newer than the last run's.

Example: LASTCHANGEDATE
deltaFieldFormatstring · enumOptional

How the delta field's values are formatted, so they can be compared correctly.

Example: DATEPossible values:
compositeParentstringOptional

For a COMPOSITE_CHILD, COMPOSITE_MERGE, or FAN_OUT stream, the name of the stream it contributes to or fans out from.

Example: invoices
linkingFieldstringOptional

For a composite child stream, the source field holding its parent's key.

Example: INVOICE_ID
embedAttributestringOptional

For a composite child stream, the parent attribute its records are embedded into.

Example: lineItems
childStrategystring · enumOptional

How a composite child's records reach the parent object.

Example: EMBEDPossible values:
writeStrategystring · enumOptional

How an existing target object is updated. Possible values:

  • PATCH – changes only the mapped fields and keeps everything else.
  • MERGE_PUT – reads the object, merges the mapped fields into it, and writes it back whole.
  • REPLACE_PUT – replaces the whole object, so fields this import does not manage are cleared.

The values a stream can use depend on its target writer. The following values are available per writer, with the default listed first:

  • emporix.customEntity – PATCH, MERGE_PUT, REPLACE_PUT.
  • emporix.product and emporix.category – PATCH.
  • emporix.media – PATCH, REPLACE_PUT.
  • emporix.price, emporix.availability, and emporix.categoryAssignment – REPLACE_PUT.
Example: PATCHPossible values:
discriminatorFieldstringOptional

A source field whose value routes each record to a different target type, as defined by discriminatorMap.

Example: DOCUMENT_TYPE
createdAtstring · date-timeOptional

When the stream was created.

Example: 2024-05-01T09:00:00.000Z
enabledbooleanOptional

Whether the stream is active.

Example: true
connectionIdstring · uuidOptional

The source connection this stream reads from, when it has its own. Omitted means the configuration's default connection is used. One configuration can therefore mix sources.

Example: 2b069ad4-ee40-4c1d-9151-898ad59bd88a
fileModestring · enumOptional

For a file-based source, what one file represents. SNAPSHOT: each file is the whole picture, so only the most recently arrived one is read, and the per-record content hash decides what is written. A record missing from a newer file is not deleted. INCREMENTAL: each file is a change set, so every queued file is read in order and a later file's values win. Defaults to SNAPSHOT.

Example: SNAPSHOTPossible values:
snapshotFilesbooleanRead-onlyOptional

Whether the stream treats each file as a snapshot. true unless fileMode is INCREMENTAL.

Example: true
parentKeyFieldstringOptional

For an EMBED composite child, the source column its parent matches records by. Required for such a stream: without it the parent cannot find its children and writes an empty array.

Example: INVOICE_ID
hashIncludesDeltaFieldbooleanOptional

Whether the delta field counts as content when deciding a record has changed. Off by default: a modified timestamp is metadata about a change, not content, and a source that restamps every row on reload would otherwise make every run rewrite the whole table. Turn it on only when the timestamp moving genuinely means the record is different.

Example: false
abortOnSchemaVersionDriftbooleanOptional

Whether to refuse to start a run when a pinned mixin's current version has moved past the pinned one, before any record is read. Opt-in, and bypassed by triggering a run with force.

Example: false
dependsOnstring[]Optional

Names of streams that must run before this one, beyond the ordering a composite parent already implies. A product stream whose variantRole is VARIANT lists here the stream of the same configuration that imports its parent products, if there is one, so that the parents are written first.

nameFieldstringOptionalDeprecated

The source field used as the instance's display name. Superseded by mapping a field to the standard name attribute, which a mapping's transformations also apply to; a name mapping wins over this property. Kept for streams configured before that existed.

Example: VENDORNAME
get/importtool/{tenant}/streams/{id}
GET /importtool/{tenant}/streams/{id} HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Accept: */*
{
  "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "configId": "7c9e6679-7425-40de-944b-e07fc1f90ae7",
  "name": "Products",
  "sourceEntity": "PRODUCT",
  "targetWriter": "emporix.customEntity",
  "targetType": "product",
  "mode": "STANDALONE",
  "enabled": true
}

Retrieving the stream run order

get

Retrieves the order in which the configuration's streams run, and the dependencies behind that order.

Dependencies between streams decide the order. The streams' seq values break ties.

Dependencies come from five sources:

  • an explicit dependency on another stream

  • a mapping that references a type another stream produces

  • a COMPOSITE_CHILD stream with childStrategy set to EMBED – runs before the parent that embeds it

  • a COMPOSITE_CHILD stream with childStrategy set to PATCH, or a COMPOSITE_MERGE stream – run after the parent they update

  • a FAN_OUT stream – runs after the parent whose records it reads

Use this endpoint rather than calculating the order yourself. Mapping transformations add dependencies that a single stream definition does not show. An order calculated without those dependencies can differ from the order used at run time.

Required scopes
This endpoint requires the following scopes:
  • : Needed to trigger, schedule, monitor, and cancel import runs; to manage a file-based stream's file queue; and to read configurations, streams, schedules, runs, and imported data.
Authorizations
OAuth2clientCredentialsRequired
Token URL:
Path parameters
tenantstringRequired

The tenant you want to access.

Example: mytenant
configIdstring · uuidRequired

The configuration identifier.

Example: 7c9e6679-7425-40de-944b-e07fc1f90ae7
Responses
200

The request was successful. The stream order is returned.

application/json
orderstring[]Optional

Stream names in the order they run.

get/importtool/{tenant}/configs/{configId}/stream-order
GET /importtool/{tenant}/configs/{configId}/stream-order HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Accept: */*
{
  "order": [
    "vendor",
    "purchaseOrder",
    "purchaseOrderLine"
  ],
  "prereqs": {
    "vendor": [],
    "purchaseOrder": [
      "vendor"
    ],
    "purchaseOrderLine": [
      "purchaseOrder"
    ]
  }
}

Last updated

Was this helpful?