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

Files

The queue of files a file-based stream imports: upload one, see what is waiting, change the load order, remove one, queue a failed one again.

Retrieving a stream's files

get

Lists what a file-based stream still has to import, in the order it will be read, and what it has already dealt with. A file is identified by the SHA-256 of its content, so re-sending the same bytes is recognised however the file is named.

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
streamIdstring · uuidRequired

The stream identifier.

Example: 3fa85f64-5717-4562-b3fc-2c963f66afa6
Query parameters
historyLimitinteger · min: 1 · max: 500Optional

Number of the stream's most recently handled files to return in history. A value below 1 is treated as 1, and a value above 500 as 500. This parameter does not limit pending: the queue is returned in full up to 2000 files, and pendingTruncated and pendingTotal indicate when it is longer than the response.

Default: 100
Responses
200

The request was successful. The queue and the history are returned.

application/json

What a stream still has to import, and what it has already dealt with.

pendingTruncatedbooleanOptional

True when more files are waiting than this response carries. The load order cannot be changed while it is true, because an order that cannot name every waiting file has no meaning.

Example: false
pendingTotalinteger · int64Optional

How many files are waiting in total, however many this response lists.

Example: 3
get/importtool/{tenant}/streams/{streamId}/files
GET /importtool/{tenant}/streams/{streamId}/files HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Accept: */*
{
  "pending": [
    {
      "id": "9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d",
      "fileName": "vendors-2026-10-23.csv",
      "size": 2458112,
      "status": "PENDING",
      "loadRank": 1,
      "queuedAt": "2026-10-23T09:15:00.000Z"
    },
    {
      "id": "c56a4180-65aa-42ec-a945-5fd21dec0538",
      "fileName": "vendors-2026-10-24.csv",
      "size": 2510044,
      "status": "PENDING",
      "loadRank": 2,
      "queuedAt": "2026-10-24T09:15:00.000Z"
    }
  ],
  "history": [
    {
      "id": "a3bb189e-8bf9-3888-9912-ace4e6543002",
      "fileName": "vendors-2026-10-22.csv",
      "size": 2391001,
      "status": "PROCESSED",
      "loadRank": 1,
      "queuedAt": "2026-10-22T09:15:00.000Z",
      "processedAt": "2026-10-22T09:17:42.000Z",
      "runId": "7c9e6679-7425-40de-944b-e07fc1f90ae7",
      "recordsRead": 43342
    }
  ],
  "pendingTruncated": false,
  "pendingTotal": 2,
  "lastProcessed": {
    "id": "a3bb189e-8bf9-3888-9912-ace4e6543002",
    "fileName": "vendors-2026-10-22.csv",
    "size": 2391001,
    "status": "PROCESSED",
    "loadRank": 1,
    "queuedAt": "2026-10-22T09:15:00.000Z",
    "processedAt": "2026-10-22T09:17:42.000Z",
    "runId": "7c9e6679-7425-40de-944b-e07fc1f90ae7",
    "recordsRead": 43342
  }
}

Uploading a file for a stream to import

post

Queues a delimited file (CSV or one of its variants) for a file-based stream to import on its next run. Nothing is imported by this request.

The file is stored, and its content hash recorded, so the same bytes are never imported twice: a file this stream has already imported is refused rather than queued again. A file that previously failed is accepted, because the usual reason is that it has been fixed. To import a failed file again unchanged, queue it again with the stored content instead of uploading it.

The request is refused while the stream's job has a run in flight if the upload would replace bytes the stream already holds — a run may be reading them, and a retry may be waiting to re-read them. A file the stream has not seen before is a new queue entry and is accepted at any 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
streamIdstring · uuidRequired

The stream identifier.

Example: 3fa85f64-5717-4562-b3fc-2c963f66afa6
Body
filestring · binaryRequired

The file to import.

Responses
200

The request was successful. The file is queued.

application/json

One file a file-based stream has been given, and what became of it.

idstring · uuidOptional

The file's identifier.

Example: 9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d
fileNamestringOptional

The name the file was given, used to display it and to infer compression.

Example: vendors-2026-10-23.csv
sizeinteger · int64Optional

The file's size in bytes.

Example: 2458112
statusstring · enumOptional

Where the file is in its life. Possible values:

  • PENDING – waiting to be imported.
  • IN_PROGRESS – a run has claimed it and is reading it.
  • PROCESSED – read to completion. Set only once its records have been written, so a run that fails part-way leaves the file importable.
  • FAILED – the stream that read the file finished FAILED. The file could not be read (malformed, truncated, wrong charset), or the import failed for another reason, such as the target being unavailable. Such a file can be queued again with the content the service holds, or uploaded again. Records that fail individually do not put a file here: a stream that finishes with record failures still marks its file imported.
Example: PROCESSEDPossible values:
loadRankinteger · int64Optional

The position in the drain order. For an incremental feed the order is part of the data: a later file's values win on a key an earlier one also carries.

Example: 3
queuedAtstring · date-timeOptional

When the file was added to the queue.

Example: 2026-10-23T09:15:00.000Z
processedAtstring · date-timeOptional

When the file finished being imported.

Example: 2026-10-23T09:17:42.000Z
runIdstring · uuidOptional

The run that consumed it.

Example: c56a4180-65aa-42ec-a945-5fd21dec0538
recordsReadintegerOptional

How many records came out of it.

Example: 43342
messagestringOptional

Why the file ended as it did, when that needs saying — a file superseded by a newer snapshot in the same run, or one imported with record-level failures.

Example: Imported with failures: 1 record had no key value
post/importtool/{tenant}/streams/{streamId}/files
POST /importtool/{tenant}/streams/{streamId}/files HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Content-Type: multipart/form-data
Accept: */*
Content-Length: 17

{
  "file": "binary"
}
{
  "id": "9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d",
  "fileName": "vendors-2026-10-23.csv",
  "size": 2458112,
  "status": "PENDING",
  "loadRank": 1,
  "queuedAt": "2026-10-23T09:15:00.000Z"
}

Retrieving the file upload limits

get

Returns the largest file this environment accepts, and whether uploading is available at all, so a client can state the limit and reject an oversize file before sending it.

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
streamIdstring · uuidRequired

The stream identifier.

Example: 3fa85f64-5717-4562-b3fc-2c963f66afa6
Responses
200

The request was successful.

application/json
maxUploadBytesinteger · int64Optional

The largest file accepted, in bytes.

Example: 9437184
gatewayLimitedbooleanOptional

Whether maxUploadBytes is set by the API gateway in front of the service rather than by the service itself. A larger file is then refused by the gateway, with the gateway's own 413 error body, before it reaches the service. Use the connection's file URL for it.

Example: true
uploadSupportedbooleanOptional

False when the environment has nowhere to store an uploaded file. A file URL on the connection does not help: a fetched file is stored in the same place.

Example: true
get/importtool/{tenant}/streams/{streamId}/files/limits
GET /importtool/{tenant}/streams/{streamId}/files/limits HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Accept: */*
{
  "maxUploadBytes": 9437184,
  "gatewayLimited": true,
  "uploadSupported": true
}

Setting the order in which files are imported

put

Sets the order in which the waiting files are read. For an incremental feed the order is the data: a later file's values win on a key an earlier one also carries, so an older export must be placed before a newer one.

The request takes every waiting file's identifier, in load order, rather than moving one file: ranks are only meaningful relative to each other, and a partial list would leave the omitted files at their old ranks interleaved with the new ones. A list that is not exactly the waiting set is refused.

The request is refused while the job has a run in flight, which may be draining the queue as the order changes.

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
streamIdstring · uuidRequired

The stream identifier.

Example: 3fa85f64-5717-4562-b3fc-2c963f66afa6
Bodystring · uuid[]
string · uuid[]Optional

Every waiting file's identifier, in the order they must be imported.

Example: ["9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d","c56a4180-65aa-42ec-a945-5fd21dec0538"]
Responses
200

The request was successful. The queue is returned in its new order.

application/json

One file a file-based stream has been given, and what became of it.

idstring · uuidOptional

The file's identifier.

Example: 9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d
fileNamestringOptional

The name the file was given, used to display it and to infer compression.

Example: vendors-2026-10-23.csv
sizeinteger · int64Optional

The file's size in bytes.

Example: 2458112
statusstring · enumOptional

Where the file is in its life. Possible values:

  • PENDING – waiting to be imported.
  • IN_PROGRESS – a run has claimed it and is reading it.
  • PROCESSED – read to completion. Set only once its records have been written, so a run that fails part-way leaves the file importable.
  • FAILED – the stream that read the file finished FAILED. The file could not be read (malformed, truncated, wrong charset), or the import failed for another reason, such as the target being unavailable. Such a file can be queued again with the content the service holds, or uploaded again. Records that fail individually do not put a file here: a stream that finishes with record failures still marks its file imported.
Example: PROCESSEDPossible values:
loadRankinteger · int64Optional

The position in the drain order. For an incremental feed the order is part of the data: a later file's values win on a key an earlier one also carries.

Example: 3
queuedAtstring · date-timeOptional

When the file was added to the queue.

Example: 2026-10-23T09:15:00.000Z
processedAtstring · date-timeOptional

When the file finished being imported.

Example: 2026-10-23T09:17:42.000Z
runIdstring · uuidOptional

The run that consumed it.

Example: c56a4180-65aa-42ec-a945-5fd21dec0538
recordsReadintegerOptional

How many records came out of it.

Example: 43342
messagestringOptional

Why the file ended as it did, when that needs saying — a file superseded by a newer snapshot in the same run, or one imported with record-level failures.

Example: Imported with failures: 1 record had no key value
put/importtool/{tenant}/streams/{streamId}/files/order
PUT /importtool/{tenant}/streams/{streamId}/files/order HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 79

[
  "9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d",
  "c56a4180-65aa-42ec-a945-5fd21dec0538"
]
[
  {
    "id": "9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d",
    "fileName": "vendors-2026-10-23.csv",
    "size": 2458112,
    "status": "PENDING",
    "loadRank": 1,
    "queuedAt": "2026-10-23T09:15:00.000Z"
  },
  {
    "id": "c56a4180-65aa-42ec-a945-5fd21dec0538",
    "fileName": "vendors-2026-10-24.csv",
    "size": 2510044,
    "status": "PENDING",
    "loadRank": 2,
    "queuedAt": "2026-10-24T09:15:00.000Z"
  }
]

Removing a file from the queue

delete

Removes a waiting file and deletes the stored bytes with it. Only a waiting file can be removed: one a run has claimed must not vanish underneath it, and one already imported is history — removing that record would make the same bytes importable again, which is the one thing the file ledger exists to prevent.

The request is refused while the job has a run in flight: the run may claim the file at any moment, and a retry may be waiting to re-read it.

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
streamIdstring · uuidRequired

The stream identifier.

Example: 3fa85f64-5717-4562-b3fc-2c963f66afa6
fileIdstring · uuidRequired

The file's identifier.

Responses
204

The request was successful. The file is removed.

No content

delete/importtool/{tenant}/streams/{streamId}/files/{fileId}
DELETE /importtool/{tenant}/streams/{streamId}/files/{fileId} HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Accept: */*

No content

Queuing a failed file again

post

Puts a file whose import failed (status FAILED) back at the end of the stream's queue, so the next run reads it again. The service reads the content it already holds for the file, so you do not need to upload the file again. Use this after you fix the cause of the failure, for example a mapping.

Only a failed file can be queued again. An imported file (status PROCESSED) cannot be queued again, because importing an older snapshot again would overwrite newer data. When a file was imported with some records failing, its status is PROCESSED: retry those records with the run's POST /importtool/{tenant}/runs/{runId}/retry operation instead.

On a snapshot stream, a run reads the newest file in the queue. So a failed file cannot be queued again after a newer file has arrived for the stream, whether that file is imported, waiting or being read: queued again, the older snapshot would be imported over the newer data. Upload a corrected current file instead. A stream with incremental files reads its files in queue order, so this restriction does not apply.

The request is refused while the job has a run in the QUEUED, RUNNING, or RESUMABLE status.

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
streamIdstring · uuidRequired

The stream identifier.

Example: 3fa85f64-5717-4562-b3fc-2c963f66afa6
fileIdstring · uuidRequired

The file's identifier.

Responses
200

The request was successful. The file is queued again in the PENDING status.

application/json

One file a file-based stream has been given, and what became of it.

idstring · uuidOptional

The file's identifier.

Example: 9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d
fileNamestringOptional

The name the file was given, used to display it and to infer compression.

Example: vendors-2026-10-23.csv
sizeinteger · int64Optional

The file's size in bytes.

Example: 2458112
statusstring · enumOptional

Where the file is in its life. Possible values:

  • PENDING – waiting to be imported.
  • IN_PROGRESS – a run has claimed it and is reading it.
  • PROCESSED – read to completion. Set only once its records have been written, so a run that fails part-way leaves the file importable.
  • FAILED – the stream that read the file finished FAILED. The file could not be read (malformed, truncated, wrong charset), or the import failed for another reason, such as the target being unavailable. Such a file can be queued again with the content the service holds, or uploaded again. Records that fail individually do not put a file here: a stream that finishes with record failures still marks its file imported.
Example: PROCESSEDPossible values:
loadRankinteger · int64Optional

The position in the drain order. For an incremental feed the order is part of the data: a later file's values win on a key an earlier one also carries.

Example: 3
queuedAtstring · date-timeOptional

When the file was added to the queue.

Example: 2026-10-23T09:15:00.000Z
processedAtstring · date-timeOptional

When the file finished being imported.

Example: 2026-10-23T09:17:42.000Z
runIdstring · uuidOptional

The run that consumed it.

Example: c56a4180-65aa-42ec-a945-5fd21dec0538
recordsReadintegerOptional

How many records came out of it.

Example: 43342
messagestringOptional

Why the file ended as it did, when that needs saying — a file superseded by a newer snapshot in the same run, or one imported with record-level failures.

Example: Imported with failures: 1 record had no key value
post/importtool/{tenant}/streams/{streamId}/files/{fileId}/requeue
POST /importtool/{tenant}/streams/{streamId}/files/{fileId}/requeue HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Accept: */*
{
  "id": "1b4e28ba-2fa1-41d2-883f-0016d3cca427",
  "fileName": "vendors-2026-10-21.csv",
  "size": 2387310,
  "status": "PENDING",
  "loadRank": 3,
  "queuedAt": "2026-10-24T11:40:00.000Z"
}

Last updated

Was this helpful?