Submit tasks to a session from a RESTful API client
PUT method to submit tasks to a session from a RESTful API client.
| Method | URL | Description |
|---|---|---|
| PUT | https://host_name:port/platform/rest/symrest/v1/clientapi/session/tasks | Submit a list of tasks to a session, which was created from a RESTful API client. |
Request
PUT https://host_name:port/platform/rest/symrest/v1/clientapi/session/tasks?parameters
| Parameter | Type | Required/Optional | Description |
|---|---|---|---|
| clusterId | string | Optional | ID of the cluster. When your installation includes multiple clusters, if you do not specify a cluster but defined multiple clusters in the clusters parameter in symrest.json, any cluster is used for the specified application. |
| applicationName | string | Required | Name of the application. |
| sessionId | string | Required | ID of the session. |
| csrftoken | string | Optional | CSRF token that is obtained with successful login. |
This command takes a JSON request string that must contain information similar to the following example:
PUT https://mysymresthost.example.com:8050/platform/rest/symrest/v1/clientapi/session/tasks?applicationName=symping7.3.1&sessionId=1200&csrftoken=915ee7644f431e630dac68b9ab3e40bc
{
"taskInputList":
[
{
"isPriorityTask": true,
"taskTag": "myTag",
"resourcePreference": {
"expression": "my expression",
"resourceAttributeDefinition": [
{"name" : "my name",
"alias" : "my alias",
"defaultValue" : 20.0}
]
},
"taskPriority": 10,
"timeoutInSec": 10,
"inputDataBlock": "base64 encoded string",
"inputData": [
["SOAM_STRING_CHARS", "Test"],
["SOAM_UINT32", "4"],
["SOAM_INT64", "1"],
["SOAM_UINT64", "8192"]
]
},
{
….
}
]
}
Response
This command returns a JSON string that includes a task ID; for
example:
{
"taskIds": [
{
"sequenceNum": 1,
"taskId": "1200",
"errorMessage": ""
}
…
]
} | Status code | Description |
|---|---|
| 200 | Success |
| 400 | Bad request |
| 401 | Unauthorized |
| 403 | Forbidden |