SymetryML Documentation
Encoders

Update encoder from a data source (async job)

Schedule an async job that updates an Encoder's key statistics from a data source, rather than an inline DataFrame (see [Update encoder from an inline DataFrame](/docs/api-reference/encoders/encoders-encodername-learn-post) for the synchronous inline-DataFrame equivalent). The request body is the same encrypted `DSInfo` payload used by the Data Sources CREATE endpoint: - A **non-Spark DS** carries its attribute types via the DSInfo `extra` field. - A **Spark-backed DS** instead carries a serialized attribute-type `DataFrame` under the `sparkdf` key inside `info` (alongside the other Spark connection keys, e.g. `sparkmaster`/`spark_version`). Whether the encoder's target column gets checked before or after scheduling depends on the same distinction: - **Non-Spark DS**: the job is always scheduled (`202`) regardless of whether the target column is actually present. If it's missing, the job itself fails and the error only surfaces via `GET /{user}/jobs/{jobId}` as a `500`, not from this endpoint's own response. - **Spark-backed DS**: the attribute DataFrame is validated against the encoder's target, and against a maximum column-count limit, *before* scheduling — both checks fail immediately with a `400` from this endpoint, never a job-level `500`. Returns `202` with the new job id in the `sym-job-id` response header once scheduled; poll `GET /{user}/jobs/{jobId}` for completion.

POST
/{user}/encoders/{encodername}/learnds

Schedule an async job that updates an Encoder's key statistics from a data source, rather than an inline DataFrame (see Update encoder from an inline DataFrame for the synchronous inline-DataFrame equivalent).

The request body is the same encrypted DSInfo payload used by the Data Sources CREATE endpoint:

  • A non-Spark DS carries its attribute types via the DSInfo extra field.
  • A Spark-backed DS instead carries a serialized attribute-type DataFrame under the sparkdf key inside info (alongside the other Spark connection keys, e.g. sparkmaster/spark_version).

Whether the encoder's target column gets checked before or after scheduling depends on the same distinction:

  • Non-Spark DS: the job is always scheduled (202) regardless of whether the target column is actually present. If it's missing, the job itself fails and the error only surfaces via GET /{user}/jobs/{jobId} as a 500, not from this endpoint's own response.
  • Spark-backed DS: the attribute DataFrame is validated against the encoder's target, and against a maximum column-count limit, before scheduling — both checks fail immediately with a 400 from this endpoint, never a job-level 500.

Returns 202 with the new job id in the sym-job-id response header once scheduled; poll GET /{user}/jobs/{jobId} for completion.

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

encodername*string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

body*DSInfoEncrypted

Base64 of AES/CBC/PKCS5Padding ciphertext over the UTF-8 JSON serialization of DSInfo.

Response Body

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/c1/encoders/superenc0/learnds" \  -H "Content-Type: application/json" \  -d 'T146eUlznJOER4Aqdu7W2aWRAfUza1i5qUXOWEZwz6el6hcmQATtlLuSM78fZunjmiRF5Ea3VQvA4daQhodykSKZa3Zfja1DRm4ySIuzVu7a9g9q5VILfFqwNG9dHzOAesO1dzrWL9EQPAsboyY0fiOdW8p6ZI3I2pfOiTVOcJR=='
{  "statusCode": 200,  "statusString": "Job is finished",  "values": {}}
{  "statusCode": 202,  "statusString": "Job Created",  "values": {}}

{  "statusCode": 400,  "statusString": "Unknown Encoder [nosuchenc]",  "values": {}}

{  "statusCode": 500,  "statusString": "Generic Exception [java.lang.NullPointerException: Cannot invoke \"com.rtlm.json.DSInfo.getType()\" because \"inDSI\" is null]",  "values": {}}