Hosted File Gateway: Overview
Hosted File Gateway: Overview
The Hosted File Gateway is an SFTP and FTPS endpoint that DataMagik runs for you. Your trading partners — and your own systems — connect into it and drop files. Each file lands in your own storage, is routed by folder to a handler, and every transfer and connection attempt is recorded.
Find it at Connectors > File Exchange, on the Partners, Routes and Security tabs. The console guide covers all six tabs and which half of the exchange each one belongs to.
This is not the same thing as a file connector
These two are confused constantly, so it is worth being precise about the difference before anything else. They point in opposite directions.
| File connector | Hosted file gateway | |
|---|---|---|
| Who connects to whom | DataMagik dials out to a server somebody else runs | Somebody else dials in to a server DataMagik runs |
| Whose credentials | Theirs. You hold and store them. | Yours. You issue them a login. |
| Whose firewall | Theirs must let you in | Yours — already open, it is a hosted endpoint |
| How a file is noticed | Polling on a schedule | The moment the upload closes |
| Good for | A partner or system that already runs a server and will not change | A partner with nothing to offer but a client, and any partner you would rather not hold credentials for |
| Where | File Exchange > Endpoints tab | File Exchange > Partners, Routes and Security tabs |
They are complementary, and many customers run both — a connector for the ERP on the plant floor, the gateway for the trading partners on the internet. Since both halves record into the same place, the Transfers tab lists what arrived and what was delivered together, whichever mechanism carried it.
What happens to a file
partner connects (SFTP or FTPS)
→ authenticates as a PRINCIPAL — which fixes the tenant and the storage root
→ uploads into /inbound/<folder>
→ the bytes stream into YOUR storage bucket
→ a transfer receipt is written
→ duplicate check on the file's SHA-256
→ the folder is matched to a ROUTE, which names a HANDLER
→ the handler runs: edi | script | ocr | app_load | store
→ the outcome is recorded on the transfer
The bytes are stored before anything is decided about them, so a misconfigured route never costs you a partner's file — the transfer is recorded as unrouted and can be replayed once you fix the rule.
The five handlers
| Handler | What it does with the file |
|---|---|
| EDI | Runs the full inbound EDI pipeline — parse, partner, map, validate, route, acknowledge. |
| Script | Runs one of your scripts with the file in its context. |
| OCR extraction | Reads the document against an extraction profile and keeps the fields. |
| Load into a lookup table | Imports a CSV or JSON as lookup rows, upserted. |
| Store only | Keeps the file. A legitimate choice when something else will collect it. |
Two directions
/inbound is where partners write. /outbound
is where they read — documents you have staged for them to collect, including
EDI documents.
/inbound, reads to
/outbound. A partner that could write into its own collection folder could plant
a file for itself to collect — and one an operator would read as something you produced.Before you start
- Storage is required. Files rest in your bucket, so the gateway needs your company storage configured. There is no platform fallback — see Storage & Data Retention.
- Permissions. Reading needs Builder or Viewer. Managing principals and routes needs DataMagik - Builder. Anything touching keys, certificates or server identity needs Builder or DataMagik - Security.