SymetryML Documentation
Tasks

Create task

Register a new Task for the customer. This only persists the Task registration (name, type, params) — it does not start it. Use [Start task](/docs/api-reference/tasks/tasks-taskid-start-get) to actually launch the process. Currently the only known type is `kafkastream-app`. Its `params` map is passed straight through to the spawned process as JVM/config key-value pairs; the keys the server itself reads are: - `sml.kstream.rest` (`"true"`/`"false"`): if not `"true"`, a model must be supplied via one of `sml.kstream.model.b64` (base64 model string), `sml.kstream.model.b64file` (path to a file containing the base64 model), or the pair `sml.kstream.project.id` + `sml.kstream.model.id` (the server exports that model to a temp file for you). This is only checked when the task is **started**, not at creation time. - `sml.task.heap.min`: JVM heap size. Note this key is used for **both** `-Xms` and `-Xmx` (a source-level bug — there is no way to set the heap max independently right now; if omitted, `-Xms` defaults to `1024m` and `-Xmx` defaults to `2048m`, but if you set `sml.task.heap.min` at all, both flags get that same value).

POST
/{user}/tasks/create

Register a new Task for the customer. This only persists the Task registration (name, type, params) — it does not start it. Use Start task to actually launch the process.

Currently the only known type is kafkastream-app. Its params map is passed straight through to the spawned process as JVM/config key-value pairs; the keys the server itself reads are:

  • sml.kstream.rest ("true"/"false"): if not "true", a model must be supplied via one of sml.kstream.model.b64 (base64 model string), sml.kstream.model.b64file (path to a file containing the base64 model), or the pair sml.kstream.project.id + sml.kstream.model.id (the server exports that model to a temp file for you). This is only checked when the task is started, not at creation time.
  • sml.task.heap.min: JVM heap size. Note this key is used for both -Xms and -Xmx (a source-level bug — there is no way to set the heap max independently right now; if omitted, -Xms defaults to 1024m and -Xmx defaults to 2048m, but if you set sml.task.heap.min at all, both flags get that same value).

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

force?boolean

If true and a Task with this name is already registered, delete the existing registration first and replace it. This only removes the persisted registration — if that Task is currently running, force does not stop the running process, so re-creating and re-starting a task with the same name can leave the old process running untracked alongside the new one.

Defaultfalse

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

body*string

Encrypted TaskInfo

Response Body

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/c1/tasks/create" \  -H "Content-Type: application/json" \  -d '9TYsk+/zj32PJvmeT7FY7mT9yn0IpjSN2KcM1mRkpZEwbDiTsm04CcXJYQWm2r42q0JZnvZ43pFg9hutZhonwtVZkg5x5W4Bk2rhZoAGhD1iCSREqWLRKgPvv2Gdw3yHJj0wEx9O70d21p9VF/uEDXtMsIgFSdZeuLNStZJoUYvWuSmDxMRGznKILNRw8FNTIdNlQ61TWBrTBcWVKFqQoA=='
{  "statusCode": 201,  "statusString": "Task created with name [kstream_task_0] for customer [c1]",  "values": {}}

{  "statusCode": 400,  "statusString": "Customer [c1]: task cannot be created with null or empty name; name []",  "values": {}}

{  "statusCode": 409,  "statusString": "Customer [c1] already has Task with name [kstream_task_0]",  "values": {}}
{  "statusCode": 500,  "statusString": "Generic Exception [java.lang.Exception: Invalid character[ ] in DS Name [bad name]]",  "values": {}}