6.1.1 列出某个图中全部的异步任务

    Params
    • status: 异步任务的状态
    Method & Url
    Response Status
    Response Body
    1. {
    2. "tasks": [{
    3. "task_name": "hugegraph.traversal().V()",
    4. "task_progress": 0,
    5. "task_create": 1532943976585,
    6. "task_status": "success",
    7. "task_update": 1532943976736,
    8. "task_result": "0",
    9. "task_retries": 0,
    10. "id": 2,
    11. "task_type": "gremlin",
    12. "task_input": "{\"gremlin\":\"hugegraph.traversal().V()\",\"bindings\":{},\"language\":\"gremlin-groovy\",\"aliases\":{\"hugegraph\":\"graph\"}}"
    13. }]
    14. }

    6.1.2 查看某个异步任务的信息

    Method & Url
    1. GET http://localhost:8080/graphs/hugegraph/tasks/2
    Response Status
    Response Body
    1. "task_name": "hugegraph.traversal().V()",
    2. "task_progress": 0,
    3. "task_create": 1532943976585,
    4. "task_status": "success",
    5. "task_update": 1532943976736,
    6. "task_result": "0",
    7. "id": 2,
    8. "task_type": "gremlin",
    9. "task_callable": "com.baidu.hugegraph.api.job.GremlinAPI$GremlinJob",
    10. "task_input": "{\"gremlin\":\"hugegraph.traversal().V()\",\"bindings\":{},\"language\":\"gremlin-groovy\",\"aliases\":{\"hugegraph\":\"graph\"}}"
    11. }

    6.1.3 删除某个异步任务信息,不删除异步任务本身

    Method & Url
    1. DELETE http://localhost:8080/graphs/hugegraph/tasks/2
    Response Status
    1. 204

    6.1.4 取消某个异步任务,该异步任务必须具有处理中断的能力

    Method & Url
    1. PUT http://localhost:8080/graphs/hugegraph/tasks/2?action=cancel
    Response Status
    1. 202
    Response Body
    1. {