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` destinations are accepted (`localfile` only when the server sets `sml.local_ds.enable=1`); since 7.0 any other type, or a definition missing a required field, is refused here with `400`. The request body is a `DSInfoEncrypted` — the JSON serialization of a `DSInfo` encrypted with the customer's secret key in the 7.0 `v2:` format ([Encrypted Request and Response Bodies](/docs/symetryml-rest-client/rest-documentation/symetryml-rest-api-security#encrypted-request-and-response-bodies)). 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 destinations are accepted (localfile only when the
server sets sml.local_ds.enable=1); since 7.0 any other type, or a
definition missing a required field, is refused here with 400.
The request body is a DSInfoEncrypted — the JSON serialization of a
DSInfo encrypted with the customer's secret key in the 7.0 v2:
format (Encrypted Request and Response Bodies). 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.
sym-version is required and must be 7.x (for example 7.0).
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.
v2: followed by Base64(nonce[12] || AES-GCM ciphertext || tag[16]) of the UTF-8 JSON serialization of DSInfo, keyed with the customer's secret key. See Encrypted Request and Response Bodies.
Response Body
application/json
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": 200, "statusString": "string", "values": { "cifPredictionList": { "values": [ { "sdfmap": { "property1": { "errorHandling": 0, "attributeNames": [ "string" ], "attributeTypes": [ "string" ], "data": [ [ "string" ] ] }, "property2": { "errorHandling": 0, "attributeNames": [ "string" ], "attributeTypes": [ "string" ], "data": [ [ "string" ] ] } } } ] }, "dataframe": { "errorHandling": 0, "attributeNames": [ "string" ], "attributeTypes": [ "string" ], "data": [ [ "string" ] ] }, "dcfitresult": { "scoreThresholdValues": [ [ 0.1 ] ], "featuresUse": [ "string" ] }, "dcinfo": { "inputAttributes": [ "string" ], "driftParameters": { "property1": "string", "property2": "string" }, "mahalanobisParameters": { "property1": "string", "property2": "string" }, "pcaRecParameters": { "property1": "string", "property2": "string" } }, "densityList": { "values": [ { "attrName": "string", "min": 0.1, "max": 0.1, "width": 0.1, "histogram": [ 0.1 ], "valueForMissing": 0.1, "error": "string" } ] }, "dsdirectoryListing": { "ok": true, "files": [ "string" ], "dirs": [ "string" ], "path": "string", "marker": "string", "delimiter": "string" }, "dsinfo": { "type": "s3", "name": "string", "attributeNames": [ "string" ], "attributeTypes": [ "C" ], "info": { "property1": "string", "property2": "string" } }, "encoderInfo": { "target": "string", "minTrimSize": "string" }, "encryptedGroupInfo": "v2:BASE64(NONCE||CIPHERTEXT||TAG)", "errorstring": "string", "fedInfoEncrypted": "v2:BASE64(NONCE||CIPHERTEXT||TAG)", "fedSyncStats": { "sndCount": 0, "sndContractError": 0, "rcvCount": 0, "rcvError": 0, "rcvContractError": { "property1": 0, "property2": 0 }, "errorLog": [ "string" ], "syncLog": [ "string" ] }, "jobinfo": { "jobId": 0, "jobType": "string", "owner": "string", "startingDate": 0, "maximum": 0, "current": 0, "isOnBoundedExecutor": true, "isStarted": true, "isDone": true, "details": {} }, "jobinfolist": [ { "jobId": 0, "jobType": "string", "owner": "string", "startingDate": 0, "maximum": 0, "current": 0, "isOnBoundedExecutor": true, "isStarted": true, "isDone": true, "details": {} } ], "kmResultList": { "values": [ { "property1": { "errorHandling": 0, "attributeNames": [ "string" ], "attributeTypes": [ "string" ], "data": [ [ "string" ] ] }, "property2": { "errorHandling": 0, "attributeNames": [ "string" ], "attributeTypes": [ "string" ], "data": [ [ "string" ] ] } } ] }, "KSVDMap": { "values": [ { "property1": 0.1, "property2": 0.1 } ] }, "KSVSMap": { "values": [ { "property1": "string", "property2": "string" } ] }, "modelInfo": { "modelId": "string", "modelType": "string", "modelBuilt": 0, "buildTime": 0, "attributeNames": [ "string" ], "attributeTypes": [ "string" ], "attributeIndexes": [ 0 ], "targetNames": [ "string" ], "targetIndexes": [ 0 ], "predictInfo": [ "string" ], "scoreInfo": [ "string" ], "creationDate": 0, "useShortDesc": true, "info": {}, "extra": {} }, "pcaSumValues": 0, "pcaValues": { "errorHandling": 0, "attributeNames": [ "string" ], "attributeTypes": [ "string" ], "data": [ [ "string" ] ] }, "pcaVectors": { "errorHandling": 0, "attributeNames": [ "string" ], "attributeTypes": [ "string" ], "data": [ [ "string" ] ] }, "sdfResults": { "sdfmap": { "property1": { "errorHandling": 0, "attributeNames": [ "string" ], "attributeTypes": [ "string" ], "data": [ [ "string" ] ] }, "property2": { "errorHandling": 0, "attributeNames": [ "string" ], "attributeTypes": [ "string" ], "data": [ [ "string" ] ] } } }, "smlInfo": { "pid": "string", "type": "cpu", "encoderName": "string", "modelsList": [ "string" ], "modelTypeList": [ "bayes" ], "dsList": [ "string" ], "streams": [ "string" ], "attributeNames": [ "string" ], "attributeIndexes": [ 0 ], "attributeTypes": [ "C" ], "partitionColumn": "string", "creationDate": 0, "lastModificationDate": 0, "loaded": true, "persisted": true, "histogramEnabled": true, "params": { "property1": "string", "property2": "string" } }, "smlInfoList": { "projects": [ { "pid": "string", "type": "cpu", "encoderName": "string", "modelsList": [ "string" ], "modelTypeList": [ "bayes" ], "dsList": [ "string" ], "streams": [ "string" ], "attributeNames": [ "string" ], "attributeIndexes": [ 0 ], "attributeTypes": [ "C" ], "partitionColumn": "string", "creationDate": 0, "lastModificationDate": 0, "loaded": true, "persisted": true, "histogramEnabled": true, "params": { "property1": "string", "property2": "string" } } ] }, "smlOptions": {}, "status": "string", "string": "string", "stringList": { "values": [ "string" ] }, "stringToSign": "string" }}{ "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`.