diff --git a/api/api-doc/task_manager.json b/api/api-doc/task_manager.json index 52beca8350..b2301ceea5 100644 --- a/api/api-doc/task_manager.json +++ b/api/api-doc/task_manager.json @@ -1,182 +1,182 @@ { - "apiVersion":"0.0.1", - "swaggerVersion":"1.2", - "basePath":"{{Protocol}}://{{Host}}", - "resourcePath":"/task_manager", - "produces":[ - "application/json" - ], - "apis":[ - { - "path":"/task_manager/list_modules", - "operations":[ - { - "method":"GET", - "summary":"Get all modules names", - "type":"array", - "items":{ - "type":"string" - }, - "nickname":"get_modules", - "produces":[ - "application/json" - ], - "parameters":[ - ] - } - ] - }, - { - "path":"/task_manager/list_module_tasks/{module}", - "operations":[ - { - "method":"GET", - "summary":"Get a list of tasks", - "type":"array", - "items":{ - "type":"task_stats" - }, - "nickname":"get_tasks", - "produces":[ - "application/json" - ], - "parameters":[ - { - "name":"module", - "description":"The module to query about", - "required":true, - "allowMultiple":false, - "type":"string", - "paramType":"path" - }, - { - "name":"internal", - "description":"Boolean flag indicating whether internal tasks should be shown (false by default)", - "required":false, - "allowMultiple":false, - "type":"boolean", - "paramType":"query" - }, - { - "name":"keyspace", - "description":"The keyspace to query about", - "required":false, - "allowMultiple":false, - "type":"string", - "paramType":"query" - }, - { - "name":"table", - "description":"The table to query about", - "required":false, - "allowMultiple":false, - "type":"string", - "paramType":"query" - } - ] - } - ] - }, - { - "path":"/task_manager/task_status/{task_id}", - "operations":[ - { - "method":"GET", - "summary":"Get task status", - "type":"task_status", - "nickname":"get_task_status", - "produces":[ - "application/json" - ], - "parameters":[ - { - "name":"task_id", - "description":"The uuid of a task to query about", - "required":true, - "allowMultiple":false, - "type":"string", - "paramType":"path" - } - ] - } - ] - }, - { - "path":"/task_manager/abort_task/{task_id}", - "operations":[ - { - "method":"POST", - "summary":"Abort running task and its descendants", - "type":"void", - "nickname":"abort_task", - "produces":[ - "application/json" - ], - "parameters":[ - { - "name":"task_id", - "description":"The uuid of a task to abort", - "required":true, - "allowMultiple":false, - "type":"string", - "paramType":"path" - } - ] - } - ] - }, - { - "path":"/task_manager/wait_task/{task_id}", - "operations":[ - { - "method":"GET", - "summary":"Wait for a task to complete", - "type":"task_status", - "nickname":"wait_task", - "produces":[ - "application/json" - ], - "parameters":[ - { - "name":"task_id", - "description":"The uuid of a task to wait for", - "required":true, - "allowMultiple":false, - "type":"string", - "paramType":"path" - } - ] - } - ] - }, - { - "path":"/task_manager/task_status_recursive/{task_id}", - "operations":[ - { - "method":"GET", - "summary":"Get statuses of the task and all its descendants", - "type":"array", - "items":{ - "type":"task_status" - }, - "nickname":"get_task_status_recursively", - "produces":[ - "application/json" - ], - "parameters":[ - { - "name":"task_id", - "description":"The uuid of a task to query about", - "required":true, - "allowMultiple":false, - "type":"string", - "paramType":"path" - } - ] - } - ] - }, - { + "apiVersion":"0.0.1", + "swaggerVersion":"1.2", + "basePath":"{{Protocol}}://{{Host}}", + "resourcePath":"/task_manager", + "produces":[ + "application/json" + ], + "apis":[ + { + "path":"/task_manager/list_modules", + "operations":[ + { + "method":"GET", + "summary":"Get all modules names", + "type":"array", + "items":{ + "type":"string" + }, + "nickname":"get_modules", + "produces":[ + "application/json" + ], + "parameters":[ + ] + } + ] + }, + { + "path":"/task_manager/list_module_tasks/{module}", + "operations":[ + { + "method":"GET", + "summary":"Get a list of tasks", + "type":"array", + "items":{ + "type":"task_stats" + }, + "nickname":"get_tasks", + "produces":[ + "application/json" + ], + "parameters":[ + { + "name":"module", + "description":"The module to query about", + "required":true, + "allowMultiple":false, + "type":"string", + "paramType":"path" + }, + { + "name":"internal", + "description":"Boolean flag indicating whether internal tasks should be shown (false by default)", + "required":false, + "allowMultiple":false, + "type":"boolean", + "paramType":"query" + }, + { + "name":"keyspace", + "description":"The keyspace to query about", + "required":false, + "allowMultiple":false, + "type":"string", + "paramType":"query" + }, + { + "name":"table", + "description":"The table to query about", + "required":false, + "allowMultiple":false, + "type":"string", + "paramType":"query" + } + ] + } + ] + }, + { + "path":"/task_manager/task_status/{task_id}", + "operations":[ + { + "method":"GET", + "summary":"Get task status", + "type":"task_status", + "nickname":"get_task_status", + "produces":[ + "application/json" + ], + "parameters":[ + { + "name":"task_id", + "description":"The uuid of a task to query about", + "required":true, + "allowMultiple":false, + "type":"string", + "paramType":"path" + } + ] + } + ] + }, + { + "path":"/task_manager/abort_task/{task_id}", + "operations":[ + { + "method":"POST", + "summary":"Abort running task and its descendants", + "type":"void", + "nickname":"abort_task", + "produces":[ + "application/json" + ], + "parameters":[ + { + "name":"task_id", + "description":"The uuid of a task to abort", + "required":true, + "allowMultiple":false, + "type":"string", + "paramType":"path" + } + ] + } + ] + }, + { + "path":"/task_manager/wait_task/{task_id}", + "operations":[ + { + "method":"GET", + "summary":"Wait for a task to complete", + "type":"task_status", + "nickname":"wait_task", + "produces":[ + "application/json" + ], + "parameters":[ + { + "name":"task_id", + "description":"The uuid of a task to wait for", + "required":true, + "allowMultiple":false, + "type":"string", + "paramType":"path" + } + ] + } + ] + }, + { + "path":"/task_manager/task_status_recursive/{task_id}", + "operations":[ + { + "method":"GET", + "summary":"Get statuses of the task and all its descendants", + "type":"array", + "items":{ + "type":"task_status" + }, + "nickname":"get_task_status_recursively", + "produces":[ + "application/json" + ], + "parameters":[ + { + "name":"task_id", + "description":"The uuid of a task to query about", + "required":true, + "allowMultiple":false, + "type":"string", + "paramType":"path" + } + ] + } + ] + }, + { "path":"/task_manager/ttl", "operations":[ { @@ -199,96 +199,96 @@ ] } ] - } - ], - "models":{ - "task_stats" :{ - "id": "task_stats", - "description":"A task statistics object", - "properties":{ - "task_id":{ - "type":"string", - "description":"The uuid of a task" - }, - "state":{ - "type":"string", - "enum":[ + } + ], + "models":{ + "task_stats" :{ + "id": "task_stats", + "description":"A task statistics object", + "properties":{ + "task_id":{ + "type":"string", + "description":"The uuid of a task" + }, + "state":{ + "type":"string", + "enum":[ "created", "running", "done", "failed" - ], - "description":"The state of a task" - }, - "type":{ - "type":"string", - "description":"The description of the task" - }, - "scope":{ - "type":"string", - "description":"The scope of the task" - }, - "keyspace":{ - "type":"string", - "description":"The keyspace the task is working on (if applicable)" - }, - "table":{ - "type":"string", - "description":"The table the task is working on (if applicable)" - }, - "entity":{ - "type":"string", - "description":"Task-specific entity description" - }, - "sequence_number":{ - "type":"long", - "description":"The running sequence number of the task" - } - } - }, - "task_status":{ - "id":"task_status", - "description":"A task status object", - "properties":{ - "id":{ - "type":"string", - "description":"The uuid of the task" - }, - "type":{ - "type":"string", - "description":"The description of the task" - }, - "scope":{ - "type":"string", - "description":"The scope of the task" - }, - "state":{ + ], + "description":"The state of a task" + }, + "type":{ + "type":"string", + "description":"The description of the task" + }, + "scope":{ + "type":"string", + "description":"The scope of the task" + }, + "keyspace":{ + "type":"string", + "description":"The keyspace the task is working on (if applicable)" + }, + "table":{ + "type":"string", + "description":"The table the task is working on (if applicable)" + }, + "entity":{ + "type":"string", + "description":"Task-specific entity description" + }, + "sequence_number":{ + "type":"long", + "description":"The running sequence number of the task" + } + } + }, + "task_status":{ + "id":"task_status", + "description":"A task status object", + "properties":{ + "id":{ + "type":"string", + "description":"The uuid of the task" + }, + "type":{ + "type":"string", + "description":"The description of the task" + }, + "scope":{ + "type":"string", + "description":"The scope of the task" + }, + "state":{ "type":"string", "enum":[ - "created", - "running", - "done", - "failed" + "created", + "running", + "done", + "failed" ], - "description":"The state of the task" - }, - "is_abortable":{ - "type":"boolean", - "description":"Boolean flag indicating whether the task can be aborted" - }, - "start_time":{ - "type":"datetime", - "description":"The start time of the task" - }, - "end_time":{ - "type":"datetime", - "description":"The end time of the task (unspecified when the task is not completed)" - }, - "error":{ - "type":"string", - "description":"Error string, if the task failed" - }, - "parent_id":{ + "description":"The state of the task" + }, + "is_abortable":{ + "type":"boolean", + "description":"Boolean flag indicating whether the task can be aborted" + }, + "start_time":{ + "type":"datetime", + "description":"The start time of the task" + }, + "end_time":{ + "type":"datetime", + "description":"The end time of the task (unspecified when the task is not completed)" + }, + "error":{ + "type":"string", + "description":"Error string, if the task failed" + }, + "parent_id":{ "type":"string", "description":"The uuid of the parent task" }, @@ -326,12 +326,12 @@ }, "children_ids":{ "type":"array", - "items":{ - "type":"string" - }, + "items":{ + "type":"string" + }, "description":"Task IDs of children of this task" } - } - } - } - } + } + } + } +} diff --git a/api/api-doc/task_manager_test.json b/api/api-doc/task_manager_test.json index dc5f9de99e..bbd57ad58c 100644 --- a/api/api-doc/task_manager_test.json +++ b/api/api-doc/task_manager_test.json @@ -1,153 +1,153 @@ { - "apiVersion":"0.0.1", - "swaggerVersion":"1.2", - "basePath":"{{Protocol}}://{{Host}}", - "resourcePath":"/task_manager_test", - "produces":[ - "application/json" - ], - "apis":[ - { - "path":"/task_manager_test/test_module", - "operations":[ - { - "method":"POST", - "summary":"Register test module in task manager", - "type":"void", - "nickname":"register_test_module", - "produces":[ - "application/json" - ], - "parameters":[ - ] - }, - { - "method":"DELETE", - "summary":"Unregister test module in task manager", - "type":"void", - "nickname":"unregister_test_module", - "produces":[ - "application/json" - ], - "parameters":[ - ] - } - ] - }, - { - "path":"/task_manager_test/test_task", - "operations":[ - { - "method":"POST", - "summary":"Register test task", - "type":"string", - "nickname":"register_test_task", - "produces":[ - "application/json" - ], - "parameters":[ - { - "name":"task_id", - "description":"The uuid of a task to register", - "required":false, - "allowMultiple":false, - "type":"string", - "paramType":"query" - }, - { - "name":"shard", - "description":"The shard of the task", - "required":false, - "allowMultiple":false, - "type":"long", - "paramType":"query" - }, - { - "name":"parent_id", - "description":"The uuid of a parent task", - "required":false, - "allowMultiple":false, - "type":"string", - "paramType":"query" - }, - { - "name":"keyspace", - "description":"The keyspace the task is working on", - "required":false, - "allowMultiple":false, - "type":"string", - "paramType":"query" - }, - { - "name":"table", - "description":"The table the task is working on", - "required":false, - "allowMultiple":false, - "type":"string", - "paramType":"query" - }, - { - "name":"entity", - "description":"Task-specific entity description", - "required":false, - "allowMultiple":false, - "type":"string", - "paramType":"query" - } - ] - }, - { - "method":"DELETE", - "summary":"Unregister test task", - "type":"void", - "nickname":"unregister_test_task", - "produces":[ - "application/json" - ], - "parameters":[ - { - "name":"task_id", - "description":"The uuid of a task to register", - "required":true, - "allowMultiple":false, - "type":"string", - "paramType":"query" - } - ] - } - ] - }, - { - "path":"/task_manager_test/finish_test_task/{task_id}", - "operations":[ - { - "method":"POST", - "summary":"Finish test task", - "type":"void", - "nickname":"finish_test_task", - "produces":[ - "application/json" - ], - "parameters":[ - { - "name":"task_id", - "description":"The uuid of a task to finish", - "required":true, - "allowMultiple":false, - "type":"string", - "paramType":"path" - }, - { - "name":"error", - "description":"The error with which task fails (if it does)", - "required":false, - "allowMultiple":false, - "type":"string", - "paramType":"query" - } - ] - } - ] - } - ] - } + "apiVersion":"0.0.1", + "swaggerVersion":"1.2", + "basePath":"{{Protocol}}://{{Host}}", + "resourcePath":"/task_manager_test", + "produces":[ + "application/json" + ], + "apis":[ + { + "path":"/task_manager_test/test_module", + "operations":[ + { + "method":"POST", + "summary":"Register test module in task manager", + "type":"void", + "nickname":"register_test_module", + "produces":[ + "application/json" + ], + "parameters":[ + ] + }, + { + "method":"DELETE", + "summary":"Unregister test module in task manager", + "type":"void", + "nickname":"unregister_test_module", + "produces":[ + "application/json" + ], + "parameters":[ + ] + } + ] + }, + { + "path":"/task_manager_test/test_task", + "operations":[ + { + "method":"POST", + "summary":"Register test task", + "type":"string", + "nickname":"register_test_task", + "produces":[ + "application/json" + ], + "parameters":[ + { + "name":"task_id", + "description":"The uuid of a task to register", + "required":false, + "allowMultiple":false, + "type":"string", + "paramType":"query" + }, + { + "name":"shard", + "description":"The shard of the task", + "required":false, + "allowMultiple":false, + "type":"long", + "paramType":"query" + }, + { + "name":"parent_id", + "description":"The uuid of a parent task", + "required":false, + "allowMultiple":false, + "type":"string", + "paramType":"query" + }, + { + "name":"keyspace", + "description":"The keyspace the task is working on", + "required":false, + "allowMultiple":false, + "type":"string", + "paramType":"query" + }, + { + "name":"table", + "description":"The table the task is working on", + "required":false, + "allowMultiple":false, + "type":"string", + "paramType":"query" + }, + { + "name":"entity", + "description":"Task-specific entity description", + "required":false, + "allowMultiple":false, + "type":"string", + "paramType":"query" + } + ] + }, + { + "method":"DELETE", + "summary":"Unregister test task", + "type":"void", + "nickname":"unregister_test_task", + "produces":[ + "application/json" + ], + "parameters":[ + { + "name":"task_id", + "description":"The uuid of a task to register", + "required":true, + "allowMultiple":false, + "type":"string", + "paramType":"query" + } + ] + } + ] + }, + { + "path":"/task_manager_test/finish_test_task/{task_id}", + "operations":[ + { + "method":"POST", + "summary":"Finish test task", + "type":"void", + "nickname":"finish_test_task", + "produces":[ + "application/json" + ], + "parameters":[ + { + "name":"task_id", + "description":"The uuid of a task to finish", + "required":true, + "allowMultiple":false, + "type":"string", + "paramType":"path" + }, + { + "name":"error", + "description":"The error with which task fails (if it does)", + "required":false, + "allowMultiple":false, + "type":"string", + "paramType":"query" + } + ] + } + ] + } + ] +}