Authorize a file upload (step 1 of 3)
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.
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.
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
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Base64 of AES/CBC/PKCS5Padding ciphertext over the UTF-8 JSON serialization of DSInfo.
Response Body
application/json
application/json
curl -X POST "https://example.com/files/c1/upload/auth" \ -H "Content-Type: application/json" \ -d 'BASE64ENCODED_CBC_CIPHERTEXT'statusString is whatever the caller sent as its own Authorization header value — the value below is an example, not a fixed format to match.
{ "statusCode": 200, "statusString": "DtEE86Hz5KSIR/RA5lmueoIO5lXt7vwPleMnZNWEVMM=", "values": {}}{ "statusCode": 500, "statusString": "Not Authenticated.", "values": {}}List available data source types GET
Get a list of plugin type
Upload a file (step 2 of 3) POST
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`.