Operations with scheduler

Running tasks

Note that the current version of PolyAnalyst API allows users to execute only pre-configured tasks.

The operation runs scheduled tasks. The task must be pre-configured in the Scheduler.

To run a task, you must know its identifier. It can be obtained in the Scheduler via the task’s context menu, i.e. right-click the task you need and find the Copy task ID option.

The response will only indicate that corresponding task execution has been started. Task execution takes time and is not always successful. Please note that running a task also launches the execution of child tasks.

URL

/scheduler/run-task

Method

POST

Scope

scheduler

Response type

sync

Query parameters

<empty>

Request body example (application/json)

{
  "taskId": 14
}

The taskId parameter represents an identificator of the task which exists in the PolyAnalyst Scheduler.

Request URL

https://your.polyanalyst.server:port/polyanalyst/api/v1.0/scheduler/run-task

Response body example (application/json)

<empty>

Response examples

Code Response body and description

200

Success. The response body is empty.

500

Error – access denied

{
  "error": {
    "code": 500,
    "title": "",
    "message": "Access denied while calling method Modifying scheduler object;\nAvailable access level: 0;\nRequired access level: 4;\n"
    }
}

500

Error – taskId is not found on the server

{
  "error": {
    "code": 500,
    "title": "",
    "message": "Scheduler object with specified id is not found in container"
    }
}