SymetryML Documentation
Data sources

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`.

POST
/files/{user}/upload

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
AuthorizationBearer <token>

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*string

User/Customer identifier

Query Parameters

key*string

Base64 of the Authorization header value returned by upload/auth

keyhmac*string

RFC 2104 HMAC of key, computed with the customer's secret key

overwrite?boolean
Defaultfalse

Request 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": {}}