Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

This page describes the APIs that can be used to retrieve and run Tasks and Actions.

Create a Task API

Purpose:

Allows creating a task (performing an Action) for a Configuration.

...

failOver - Activate Standby

...

API:

POST /api/tasks

Request body:

...

Expand
Code Block
languagejson
{
    "Status": 200,
    "Result": {
        "TaskId": 1,
        "UserId": 1,
        "TaskData": {
            "ConfigurationId": 1,
            "Script": "backupAndSend",
            "Params": {}
        },
        "State": "Start",
        "StateData": {},
        "History": {
            "States": [
                {
                    "EnterTime": "2022-02-28T15:36:12Z",
                    "State": "Start",
                    "StateData": {},
                    "Logs": [],
                    "ExecutionState": "",
                    "ExecutionStateData": null
                }
            ]
        },
        "Updated": "2022-02-28T15:36:12Z",
        "CliAgentRepoName": "",
        "CliExecutionId": 0,
        "TraceContext": null
    }
}

Get Task progress API

Purpose:

Allows getting actual task progress (Started, In Progress, Success, Error) together with description message.

...