全部产品
云市场

列举任务

更新时间:2019-09-03 19:16:27

ListTasks 列举任务

本文将向您介绍如何通过调用API接口,通过Appkey实现创建任务操作。

API描述:

调试

点击这里在OpenAPI Explorer中可视化调试,并自动生成SDK调用示例

请求参数

参数名称 类型 是否必选 描述
Action String 系统规定参数,取值:ListTasks
Appkey String 实例Appkey

返回参数

参数名称 类型 描述
Data 返回数据结构
PageNumber Integer
PageSize Integer 页大小
RequestId String 请求id
ResultCode Integer 请求结果码
TotalCount Integer 页总计

示例

请求示例

  1. http(s)://[Endpoint]/?Action=ListTasks
  2. &Appkey=jAxxxxxxxxxxxKH1
  3. &<公共请求参数>

返回示例

返回示例-Json

  1. {
  2. "TotalCount": 1000,
  3. "PageSize": 1000,
  4. "RequestId": "9@ef6f9f32-c438-4220-a2f3-198c4cbbe4cc",
  5. "PageNumber": 1,
  6. "Data": {
  7. "Contents": [{
  8. "Status": "COMPLETED",
  9. "Progress": 0,
  10. "CreateTime": 1566112239000,
  11. "Request": "{\"srcImageName\":\"test21.photo\",\"srcImageTime\":1563864085000,\"filterValue\":10,\"confidence\":1,\"description\":\"hongyi-test\",\"user\":\"1122668997700980\"}",
  12. "StatusCode": "40000003",
  13. "Namespace": "RSBuildingExtraction",
  14. "StatusMessage": "Parameter invalid!",
  15. "Response": "",
  16. "LastUpdateTime": 1566112240000,
  17. "Version": "2",
  18. "UserId": "11xxxxxxxxxxx980",
  19. "Appkey": "jAxxxxxxxxxxxKH1",
  20. "JobId": "821bd7e293de44469d59889943a989fc"
  21. }, {
  22. "Status": "COMPLETED",
  23. "Progress": 100,
  24. "CreateTime": 1566290358000,
  25. "Request": "{\"description\":\"xxxx\",\"area_threshold\":90,\"threshold\":0.3,\"items\":[{\"src\":\"\",\"name\":\"test17.photo\",\"time\":1563863319000}],\"user\":\"1122668997700980\"}",
  26. "StatusCode": "41110400",
  27. "Namespace": "RSBuildingExtraction",
  28. "StatusMessage": "Error downloading: source path error: stat /home/admin/ossdisk/1122668997700980: no such file or directory",
  29. "Response": "",
  30. "LastUpdateTime": 1566291096000,
  31. "Version": "6",
  32. "UserId": "11xxxxxxxxxxx980",
  33. "Appkey": "jAxxxxxxxxxxxKH1",
  34. "JobId": "a06dd64c14c64268b7ed23b969e64210"
  35. }, {
  36. "Status": "COMPLETED",
  37. "Progress": 100,
  38. "CreateTime": 1566351308000,
  39. "Request": "{\"area_threshold\":20,\"threshold\":0.6,\"items\":[{\"src\":\"/1232dfb52ba1460a8528eb40d9036e1e/original/src.tif\",\"name\":\"test.tif\",\"time\":1566351214000}],\"user\":\"1122668997700980\"}",
  40. "StatusCode": "0",
  41. "Namespace": "RSBuildingExtraction",
  42. "StatusMessage": "",
  43. "Response": "",
  44. "LastUpdateTime": 1566352051000,
  45. "Version": "76",
  46. "UserId": "11xxxxxxxxxxx980",
  47. "Appkey": "jAxxxxxxxxxxxKH1",
  48. "JobId": "f24066499db74df6bdcdfe69cf1c30cc"
  49. }, {
  50. "Status": "COMPLETED",
  51. "Progress": 100,
  52. "CreateTime": 1566355379000,
  53. "Request": "{\"description\":\"ceshi\",\"area_threshold\":34,\"threshold\":0.8,\"items\":[{\"src\":\"/1232dfb52ba1460a8528eb40d9036e1e/original/src.tif\",\"name\":\"test.tif\",\"time\":1566351214000}],\"user\":\"1122668997700980\"}",
  54. "StatusCode": "20000000",
  55. "Namespace": "RSBuildingExtraction",
  56. "StatusMessage": "SUCCESS",
  57. "Response": "{\"file\":\"/f72a8372b2e8402e821078ccfb5666cc/out/result.zip\"}",
  58. "LastUpdateTime": 1566355564000,
  59. "Version": "21",
  60. "UserId": "11xxxxxxxxxxx980",
  61. "Appkey": "jAxxxxxxxxxxxKH1",
  62. "JobId": "f72a8372b2e8402e821078ccfb5666cc"
  63. }, {
  64. "Status": "COMPLETED",
  65. "Progress": 100,
  66. "CreateTime": 1566444124000,
  67. "Request": "{\"description\":\"xx\",\"area_threshold\":20,\"threshold\":0.2,\"items\":[{\"src\":\"/1232dfb52ba1460a8528eb40d9036e1e/original/src.tif\",\"name\":\"test.tif\",\"time\":1566351214000}],\"user\":\"1122668997700980\"}",
  68. "StatusCode": "41110400",
  69. "Namespace": "RSBuildingExtraction",
  70. "StatusMessage": "Error downloading: source path error: stat /oss/1122668997700980/1232dfb52ba1460a8528eb40d9036e1e/original/src.tif: no such file or directory",
  71. "Response": "",
  72. "LastUpdateTime": 1566444142000,
  73. "Version": "4",
  74. "UserId": "11xxxxxxxxxxx980",
  75. "Appkey": "jAxxxxxxxxxxxKH1",
  76. "JobId": "f7ca3046f2b44481b2b0350cbdeceb7e"
  77. }]
  78. },
  79. "ResultCode": 0
  80. }

错误码

HttpCode 错误码 描述
41090001 NAMESPACE_NOT_ALLOW 命名空间不允许
41090002 NO_PERMISSION 没有权限执行当前操作
41090004 REQUEST_TOO_FAST 请求过快
51090001 JOB_FAILED 任务失败