Table of Contents

Tasks

Tasks

CreateTask

Create a new task

Request
POST /api/tasks/v1/Tasks
Parameters
Name Type Value Notes
body

task's view model. You have to specify task type by placing parameter "$t": "Vm name", this parameters always must be on the first place

Responses
Status Code Description Samples
200

Task was created

400

Bad VM provided

402

Subscription is outdated

403

Not enough permissions for the operation

404

Subscription was not found

500

Try again, if error still here - text our support

GetList

Get tasks list

Request
GET /api/tasks/v1/Tasks[?skip&take&useProjection&subscriptionId&searchPattern&taskType]
Parameters
Name Type Value Notes
skip integer 0

number of tasks, that have to be skipped

take integer 10

number of tasks, that have to be returned

useProjection boolean False

use projection with only id and name

subscriptionId string

subscription id

searchPattern string
taskType

bit flag for types

Responses
Status Code Description Samples
200

Tasks were found

400

Bad id provided

402

Subscription is outdated

403

Not enough permissions for the operation

404

Subscription or tasks were not found

500

Try again, if error still here - text our support

DeleteTask

Delete a task from a storage

Request
DELETE /api/tasks/v1/Tasks/{taskId}
Parameters
Name Type Value Notes
*taskId string

deleting task id

Responses
Status Code Description Samples
204

Task was deleted

400

Bad id provided

402

Subscription is outdated

403

Not enough permissions for the operation

404

Subscription or task was not found

500

Try again, if error still here - text our support

Get

Get a task by a specified id

Request
GET /api/tasks/v1/Tasks/{taskId}
Parameters
Name Type Value Notes
*taskId string

a task id

Responses
Status Code Description Samples
200

Task was found

400

Bad id provided

402

Subscription is outdated

403

Not enough permissions for the operation

404

Subscription or task was not found

500

Try again, if error still here - text our support

UpdateTask

Update a task

Request
PUT /api/tasks/v1/Tasks/{taskId}
Parameters
Name Type Value Notes
*taskId string

updating task id

body

task's view model. You have to specify task type by placing parameter "$t": "Vm name", this parameters always must be on first place

Responses
Status Code Description Samples
200

Success

400

Bad id or VM provided

402

Subscription is outdated

403

Not enough permissions for the operation

404

Subscription or task was not found

500

Try again, if error still here - text our support

204

Task was updated

GetPermissions

Get all Task permissions

Request
GET /api/tasks/v1/Tasks/{id}/permissions
Parameters
Name Type Value Notes
*id string

task id

Responses
Status Code Description Samples
200

Task was found

400

Bad id provided

402

Subscription is outdated

403

Not enough permissions for the operation

404

Subscription or task was not found

500

Try again, if error still here - text our support

UpdatePermissions

Update permissions

Request
POST /api/tasks/v1/Tasks/{id}/permissions
Parameters
Name Type Value Notes
*id string

task id

body

new permissions. You have to specify VM type by placing parameter "$t": "Vm name", this parameters always must be on first place

Responses
Status Code Description Samples
204

Task was updated

400

Bad id or VM provided

402

Subscription is outdated

403

Not enough permissions for the operation

404

Subscription or task was not found

500

Try again, if error still here - text our support

GetMyPermissions

Get current user's permissions to Task

Request
GET /api/tasks/v1/Tasks/{id}/mypermissions
Parameters
Name Type Value Notes
*id string

task id

Responses
Status Code Description Samples
200

got permissions successfully

400

The request is wrong

404

Subscription or task was not found

500

Server Error

RenameTask

Rename a task

Request
PUT /api/tasks/v1/Tasks/{taskId}/rename[?newName]
Parameters
Name Type Value Notes
*taskId string

renaming task id

newName string

task's new Name

Responses
Status Code Description Samples
200

Task was found

400

Bad id or name provided

402

Subscription is outdated

403

Not enough permissions for the operation

404

Subscription or task was not found

500

Try again, if error still here - text our support

RunTask

Run a task from request body

Request
POST /api/tasks/v1/Tasks/run
Parameters
Name Type Value Notes
body

task's view model. You have to specify task type by placing parameter "$t": "Vm name", this parameters always must be on the first place

Responses
Status Code Description Samples
200

Task was executed

403

Not enough permissions for the operation

404

Subscription was not found

402

Subscription is outdated

400

Bad VM provided

500

Try again, if error still here - text our support

RunTaskById

Run a task by id

Request
POST /api/tasks/v1/Tasks/{taskId}/run
Parameters
Name Type Value Notes
*taskId string

task id

Responses
Status Code Description Samples
200

Task was executed

400

Bad id provided

402

Subscription is outdated

403

Not enough permissions for the operation

404

Subscription or task was not found

500

Try again, if error still here - text our support

Definitions

CreateTaskBaseVM

Name Type Notes
cronExpression string
startsOn string (date-time)
ends CreateTaskEndVM[]
name string
subscriptionId string
$t string

CreateTaskEndVM

Name Type Notes
after integer (int32)
on string (date-time)
$t string

TaskBaseVM

Name Type Notes
cronExpression string
startsOn string (date-time)
ends TaskEnd[]
id string
name string
recurrentRunTime string (date-time)
recurrentWasRunTime string (date-time)
subscriptionId string
$t string

TaskEnd

Name Type Notes
after integer (int32)
on string (date-time)

ProblemDetails

Name Type Notes
type string
title string
status integer (int32)
detail string
instance string

TasksVM

Name Type Notes
count integer (int64)
skip integer (int32)
take integer (int32)
tasks TaskBaseVM[]
$t string

UpdateTaskBaseVM

Name Type Notes
cronExpression string
startsOn string (date-time)
ends CreateTaskEndVM[]
name string
$t string

TaskPermissionsVM

Name Type Notes
permissions TaskPermissionsCRUDVM[]
$t string

TaskPermissionsCRUDVM

Name Type Notes
ownerId string
owner TaskPermissionCRUDVM[]
groups object
other TaskPermissionCRUDVM[]
anon TaskPermissionCRUDVM[]
$t string

TaskPermissionCRUDVM

Name Type Notes
create TaskCreate
delete TaskDelete
execute TaskExecute
get TaskGet
update TaskUpdate
administrate TaskAdministrate
$t string

TaskCreate

TaskDelete

TaskExecute

TaskGet

TaskUpdate

TaskAdministrate

UpdateTaskPermissionsVM

Name Type Notes
administrate TaskAdministrate
newPermissions TaskPermissionsCRUDVM[]
$t string

RunTaskBaseVM

Name Type Notes
subscriptionId string
$t string

TaskMessageIdVM

Name Type Notes
messageId string
$t string