AddTask adds a task to the Config
TestConfigAddTask add a task to the configuration.
[200] POST /config/addTask
{
"Dest": "Dest",
"Name": "Name",
"Source": "Source"
}
Key | Value |
---|---|
Content-Type | [text/plain; charset=utf-8] |
{
"Data": {
"Dest": "Dest",
"Name": "Name",
"Source": "Source"
},
"Errors": null,
"Res": true
}
TestConfigAddTask fail to add a task already existing.
[200] POST /config/addTask
{
"Dest": "Dest",
"Name": "Name",
"Source": "Source"
}
Key | Value |
---|---|
Content-Type | [text/plain; charset=utf-8] |
{
"Errors": {
"Name": "Task name already exists"
},
"Res": false
}
Read loads the Config
TestConfigRead read the configuration.
[200] GET /config/read
Key | Value |
---|---|
Content-Type | [text/plain; charset=utf-8] |
{
"Tasks": [
{
"Dest": "Dest",
"Name": "Name",
"Source": "Source"
}
]
}
RmTask removes a task from the Config
TestConfigRmTask remove a task from the config.
[200] POST /config/rmTask
{
"Dest": "Dest",
"Name": "Name",
"Source": "Source"
}
Key | Value |
---|---|
Content-Type | [text/plain; charset=utf-8] |
{
"Errors": null,
"Res": true
}
TestConfigRmUnknownTask fail to remove unknown task.
[200] POST /config/rmTask
{
"Dest": "Dest",
"Name": "Name",
"Source": "Source"
}
Key | Value |
---|---|
Content-Type | [text/plain; charset=utf-8] |
{
"Errors": {
"Name": "Task not found"
},
"Res": false
}
ListTasks lists configured tasks
TestConfigListTasks read configured tasks.
[200] GET /config/tasks
Key | Value |
---|---|
Content-Type | [text/plain; charset=utf-8] |
{
"Data": [
{
"Dest": "Dest",
"Name": "Name",
"Source": "Source"
}
],
"Errors": null,
"Res": true
}
TestDiskInfo lists available partitions on the computer.
[200] GET /disksinfo
Key | Value |
---|---|
Content-Type | [text/plain; charset=utf-8] |
{
"Data": [
{
"IsRemovable": false,
"Label": "fake",
"MountPath": "",
"Path": "",
"Size": "",
"SpaceLeft": ""
}
],
"Errors": null,
"Res": true
}
TestDiskInfoFailure fail to read the computer partition list.
[200] GET /disksinfo
Key | Value |
---|---|
Content-Type | [text/plain; charset=utf-8] |
{
"Errors": "DiskInfo loading failed Disk info was not loaded ",
"Res": false
}
TestTaskList returns a list of active tasks.
[200] GET /tasks/list
Key | Value |
---|---|
Content-Type | [text/plain; charset=utf-8] |
{
"Data": [
{
"Dest": "",
"ETA": "",
"EndDate": "",
"Failure": null,
"Messages": null,
"Name": "xxxx",
"Percent": "",
"Source": "",
"StartDate": "",
"Started": false
}
],
"Errors": null,
"Res": true
}
TestListRunningTasks liasts running tasks.
[200] POST /tasks/start
{
"Dest": "Dest",
"Name": "Name",
"Source": "Source"
}
Key | Value |
---|---|
Content-Type | [text/plain; charset=utf-8] |
{
"Data": {
"Dest": "Dest",
"ETA": "",
"EndDate": "",
"Failure": null,
"Messages": null,
"Name": "Name",
"Percent": "",
"Source": "Source",
"StartDate": "",
"Started": true
},
"Errors": null,
"Res": true
}
TestStartTaskAlreadyStarted fails to start the same task twice.
[200] POST /tasks/start
{
"Dest": "Dest",
"Name": "Name",
"Source": "Source"
}
Key | Value |
---|---|
Content-Type | [text/plain; charset=utf-8] |
{
"Errors": "Task was not started: Task not started \"Name\"",
"Res": false
}
TestStartUnknownTask fails to start an unknown task.
[200] POST /tasks/start
{
"Dest": "",
"Name": "nop nop",
"Source": ""
}
Key | Value |
---|---|
Content-Type | [text/plain; charset=utf-8] |
{
"Errors": {
"Name": "Task not found"
},
"Res": false
}
TestTaskStart starts a task.
[200] POST /tasks/start
{
"Dest": "Dest",
"Name": "Name",
"Source": "Source"
}
Key | Value |
---|---|
Content-Type | [text/plain; charset=utf-8] |
{
"Data": {
"Dest": "Dest",
"ETA": "",
"EndDate": "",
"Failure": null,
"Messages": null,
"Name": "Name",
"Percent": "",
"Source": "Source",
"StartDate": "",
"Started": true
},
"Errors": null,
"Res": true
}
TestStopTaskNotStarted fails to stop a task not yet started.
[200] POST /tasks/stop
{
"Dest": "Dest",
"Name": "Name",
"Source": "Source"
}
Key | Value |
---|---|
Content-Type | [text/plain; charset=utf-8] |
{
"Errors": "Task was not found: Task not stopped \"Name\"",
"Res": false
}
TestStopUnknownTask fails to stop unknown task.
[200] POST /tasks/stop
{
"Dest": "Dest",
"Name": "Name",
"Source": "Source"
}
Key | Value |
---|---|
Content-Type | [text/plain; charset=utf-8] |
{
"Errors": "Task was not found: Task not stopped \"Name\"",
"Res": false
}
TestTaskStop stop a task.
[200] POST /tasks/stop
{
"Dest": "Dest",
"Name": "Name",
"Source": "Source"
}
Key | Value |
---|---|
Content-Type | [text/plain; charset=utf-8] |
{
"Data": {
"Dest": "Dest",
"ETA": "",
"EndDate": "",
"Failure": null,
"Messages": null,
"Name": "Name",
"Percent": "",
"Source": "Source",
"StartDate": "",
"Started": false
},
"Errors": null,
"Res": true
}