Upload a file (step 2 of 3)
Second step of the file-upload flow: streams the actual file content (multipart, field name `file`) to the data source authorized in step 1. Only `sftp` and `localfile` destination types are supported — any other type fails with `400`. If the destination already exists and `overwrite` is not `true`, fails with `409`.
Second step of the file-upload flow: streams the actual file
content (multipart, field name file) to the data source
authorized in step 1. Only sftp and localfile destination types
are supported — any other type fails with 400. If the destination
already exists and overwrite is not true, fails with 409.
Authorization
SymetryMLAuth HMAC-SHA256 signature-based authentication: requests are signed with
your secret key and sent with the Customer-ID, Sym-date,
Authorization, Content-MD5 and sym-version headers.
See SymetryML REST API Security
for the signature algorithm and a complete example.
In: header
Path Parameters
User/Customer identifier
Query Parameters
Base64 of the Authorization header value returned by upload/auth
RFC 2104 HMAC of key, computed with the customer's secret key
falseRequest Body
multipart/form-data
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
curl -X POST "https://example.com/files/c1/upload?key=RHRFRTg2SHo1S1NJUi9SQTVsbXVlb0lPNWxYdDd2d1BsZU1uWk5XRVZNTT0%3D&keyhmac=ACUYUqDphHWfppXAKt4L2%2FSZ4ZogVX9aCWUiyivJB%2Fk%3D" \ -F file="uploaded_file.csv"{ "statusCode": 200, "statusString": "Uploaded", "values": {}}{ "statusCode": 400, "statusString": "java.lang.Exception: Invalid key HMAC", "values": {}}{ "statusCode": 409, "statusString": "Upload interrupted. Destination file in DataSource [ my_ds ] already exists", "values": {}}Authorize a file upload (step 1 of 3) POST
First step of the file-upload flow: registers a data source definition and authorizes a subsequent upload for it. Only `sftp` and `localfile` destination types are actually writable via step 3 (`upload`); other types are accepted here but will fail at upload time with a `400`. The request body is a `DSInfoEncrypted` — a base64 AES/CBC/PKCS5Padding ciphertext over the JSON serialization of a `DSInfo`, encrypted with the customer's secret key. On success, the response's `statusString` **is** the value the caller sent in its own `Authorization` header — base64-encode that value to use as the `key` query parameter in `upload` (step 3), and compute its RFC 2104 HMAC (with the same secret key) to use as `keyhmac`. The authorization is only valid for 10 minutes.
Get file upload progress (step 3 of 3, pollable) GET
Poll for the progress of an in-flight upload started via `upload`. `statusString` is the number of bytes read so far while the upload is in progress, or `1` once complete — polling again after completion returns the "not being uploaded" `400` below, since the completed entry is removed on first read.