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.
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.
- : 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.
The tenant you want to access.
mytenantThe stream identifier.
3fa85f64-5717-4562-b3fc-2c963f66afa6Number 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.
100The request was successful. The queue and the history are returned.
What a stream still has to import, and what it has already dealt with.
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.
falseHow many files are waiting in total, however many this response lists.
3Given request is unauthorized - the authorization token is invalid or has expired. Details will be provided in the response payload.
Given authorization scopes are not sufficient and do not match scopes required by the endpoint.
The requested resource does not exist.
An unexpected error occurred in the service. The body is the framework's default error body, not the error schema of the other responses.
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
}
}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.
- : 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.
The tenant you want to access.
mytenantThe stream identifier.
3fa85f64-5717-4562-b3fc-2c963f66afa6The file to import.
The request was successful. The file is queued.
One file a file-based stream has been given, and what became of it.
The file's identifier.
9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6dThe name the file was given, used to display it and to infer compression.
vendors-2026-10-23.csvThe file's size in bytes.
2458112Where 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 finishedFAILED. 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.
PROCESSEDPossible values: 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.
3When the file was added to the queue.
2026-10-23T09:15:00.000ZWhen the file finished being imported.
2026-10-23T09:17:42.000ZThe run that consumed it.
c56a4180-65aa-42ec-a945-5fd21dec0538How many records came out of it.
43342Why 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.
Imported with failures: 1 record had no key valueNo file was sent.
Given request is unauthorized - the authorization token is invalid or has expired. Details will be provided in the response payload.
Given authorization scopes are not sufficient and do not match scopes required by the endpoint.
The requested resource does not exist.
The stream has already imported this exact file, the file is already queued, the stream does not read files, or a run in flight is using the bytes this upload would replace.
The file is larger than this environment's upload limit. Publish it at an HTTP(S) URL and set that as the connection's file URL instead.
An unexpected error occurred in the service. The body is the framework's default error body, not the error schema of the other responses.
File upload is not configured in this environment.
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"
}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.
- : 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.
The tenant you want to access.
mytenantThe stream identifier.
3fa85f64-5717-4562-b3fc-2c963f66afa6The request was successful.
The largest file accepted, in bytes.
9437184Whether 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.
trueFalse 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.
trueGiven request is unauthorized - the authorization token is invalid or has expired. Details will be provided in the response payload.
Given authorization scopes are not sufficient and do not match scopes required by the endpoint.
The requested resource does not exist.
An unexpected error occurred in the service. The body is the framework's default error body, not the error schema of the other responses.
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
}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.
- : 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.
The tenant you want to access.
mytenantThe stream identifier.
3fa85f64-5717-4562-b3fc-2c963f66afa6Every waiting file's identifier, in the order they must be imported.
["9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d","c56a4180-65aa-42ec-a945-5fd21dec0538"]The request was successful. The queue is returned in its new order.
One file a file-based stream has been given, and what became of it.
The file's identifier.
9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6dThe name the file was given, used to display it and to infer compression.
vendors-2026-10-23.csvThe file's size in bytes.
2458112Where 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 finishedFAILED. 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.
PROCESSEDPossible values: 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.
3When the file was added to the queue.
2026-10-23T09:15:00.000ZWhen the file finished being imported.
2026-10-23T09:17:42.000ZThe run that consumed it.
c56a4180-65aa-42ec-a945-5fd21dec0538How many records came out of it.
43342Why 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.
Imported with failures: 1 record had no key valueThe list is not exactly the set of waiting files.
Given request is unauthorized - the authorization token is invalid or has expired. Details will be provided in the response payload.
Given authorization scopes are not sufficient and do not match scopes required by the endpoint.
The requested resource does not exist.
The job has a run in flight, or the queue is too long to be reordered in one request.
An unexpected error occurred in the service. The body is the framework's default error body, not the error schema of the other responses.
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"
}
]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.
- : 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.
The tenant you want to access.
mytenantThe stream identifier.
3fa85f64-5717-4562-b3fc-2c963f66afa6The file's identifier.
The request was successful. The file is removed.
No content
Given request is unauthorized - the authorization token is invalid or has expired. Details will be provided in the response payload.
Given authorization scopes are not sufficient and do not match scopes required by the endpoint.
The requested resource does not exist.
The file is no longer waiting — a run has claimed it or already imported it — or the job has a run in flight.
An unexpected error occurred in the service. The body is the framework's default error body, not the error schema of the other responses.
DELETE /importtool/{tenant}/streams/{streamId}/files/{fileId} HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Accept: */*
No content
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.
- : 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.
The tenant you want to access.
mytenantThe stream identifier.
3fa85f64-5717-4562-b3fc-2c963f66afa6The file's identifier.
The request was successful. The file is queued again in the PENDING status.
One file a file-based stream has been given, and what became of it.
The file's identifier.
9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6dThe name the file was given, used to display it and to infer compression.
vendors-2026-10-23.csvThe file's size in bytes.
2458112Where 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 finishedFAILED. 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.
PROCESSEDPossible values: 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.
3When the file was added to the queue.
2026-10-23T09:15:00.000ZWhen the file finished being imported.
2026-10-23T09:17:42.000ZThe run that consumed it.
c56a4180-65aa-42ec-a945-5fd21dec0538How many records came out of it.
43342Why 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.
Imported with failures: 1 record had no key valueGiven request is unauthorized - the authorization token is invalid or has expired. Details will be provided in the response payload.
Given authorization scopes are not sufficient and do not match scopes required by the endpoint.
The requested resource does not exist.
The file has not failed, its stored content is no longer available, or it is not one of this stream's files. Also returned when a newer file arrived after it on a snapshot stream, and while the job has a run in flight.
An unexpected error occurred in the service. The body is the framework's default error body, not the error schema of the other responses.
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?

