全部产品
云市场

创建任务

更新时间:2020-03-12 10:19:56

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

CreateTask 创建任务

API描述:

调试

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

请求参数

参数名称 类型 是否必选 描述
Action String 系统规定参数,取值:CreateTask
Appkey String 应用Appkey
Confidence Float 过滤阈值 0-1
FilterValue Long 置信度0-100
ProductType String 产品类型:
1、动土变化检测
2、建筑物新增检测
3、建筑物提取
SrcImageId String 源影像ID
DstImageId String 目标影像ID
ZoneList String 区域化识别影像列表
Description String 任务描述

返回参数

参数名称 类型 描述
Data 返回数据
RequestId String 请求id
ResultCode Integer 返回码

示例

请求示例

  1. http(s)://[Endpoint]/?Action=CreateTask
  2. //Endpoint 请使用: rsimganalys.cn-shanghai.aliyuncs.com
  3. &Appkey=jAxxxxxxxxxxxKH1
  4. &Confidence=0.1
  5. &FilterValue=10
  6. &ProductType=1
  7. &SrcImageId=8
  8. &ZoneList= “[{
  9. "src": "/ff4exxx/result.dbf "
  10. }, {
  11. "src": "/xxx/result.prj"
  12. },{
  13. "src": "/ff4exxx/result.shp "
  14. },{
  15. "src": "/ff4exxx/result.shx "
  16. }
  17. ]”
  18. &<公共请求参数>

返回示例-Json

  1. {
  2. "RequestId": "561@c9e86ea4-5aa1-440c-b54b-823f0923dbd2",
  3. "Data": {
  4. "Items": {
  5. "Contents": [
  6. {
  7. "Status": "COMPLETED",
  8. "Progress": 0,
  9. "CreateTime": 1566112239000,
  10. "Request": "{\"srcImageName\":\"test21.photo\",\"srcImageTime\":1563864085000,\"filterValue\":10,\"confidence\":1,\"description\":\"hongyi-test\",\"user\":\"1122668997700980\"}",
  11. "StatusCode": "40000003",
  12. "Namespace": "RSBuildingExtraction",
  13. "StatusMessage": "Parameter invalid!",
  14. "Response": "",
  15. "LastUpdateTime": 1566112240000,
  16. "Version": "2",
  17. "UserId": "11xxxxxxxxxxx980",
  18. "Appkey": "jAxxxxxxx",
  19. "JobId": "821bd7e293de44469d59889943a989fc"
  20. "enableZoneIdentification": 1
  21. },
  22. {
  23. "Status": "COMPLETED",
  24. "Progress": 100,
  25. "CreateTime": 1566290358000,
  26. "Request": "{\"description\":\"xxxx\",\"area_threshold\":90,\"threshold\":0.3,\"items\":[{\"src\":\"\",\"name\":\"test17.photo\",\"time\":1563863319000}],\"user\":\"1122668997700980\"}",
  27. "StatusCode": "41110400",
  28. "Namespace": "RSBuildingExtraction",
  29. "StatusMessage": "Error downloading: source path error: stat /home/admin/ossdisk/1122668997700980: no such file or directory",
  30. "Response": "",
  31. "LastUpdateTime": 1566291096000,
  32. "Version": "6",
  33. "UserId": "11xxxxxxxxxxx980",
  34. "Appkey": "jAxxxxxxxxxxxKH1",
  35. "JobId": "a06dd64c14c64268b7ed23b969e64210"
  36. "enableZoneIdentification": 1
  37. },
  38. {
  39. "Status": "COMPLETED",
  40. "Progress": 100,
  41. "CreateTime": 1566351308000,
  42. "Request": "{\"area_threshold\":20,\"threshold\":0.6,\"items\":[{\"src\":\"/1232dfb52ba1460a8528eb40d9036e1e/original/src.tif\",\"name\":\"test.tif\",\"time\":1566351214000}],\"user\":\"1122668997700980\"}",
  43. "StatusCode": "0",
  44. "Namespace": "RSBuildingExtraction",
  45. "StatusMessage": "",
  46. "Response": "",
  47. "LastUpdateTime": 1566352051000,
  48. "Version": "76",
  49. "UserId": "11xxxxxxxxxxx980",
  50. "Appkey": "jAxxxxxxxxxxxKH1",
  51. "JobId": "f24066499db74df6bdcdfe69cf1c30cc"
  52. "enableZoneIdentification": 1
  53. },
  54. {
  55. "Status": "COMPLETED",
  56. "Progress": 100,
  57. "CreateTime": 1566355379000,
  58. "Request": "{\"description\":\"ceshi\",\"area_threshold\":34,\"threshold\":0.8,\"items\":[{\"src\":\"/1232dfb52ba1460a8528eb40d9036e1e/original/src.tif\",\"name\":\"test.tif\",\"time\":1566351214000}],\"user\":\"1122668997700980\"}",
  59. "StatusCode": "20000000",
  60. "Namespace": "RSBuildingExtraction",
  61. "StatusMessage": "SUCCESS",
  62. "Response": "{\"file\":\"/f72a8372b2e8402e821078ccfb5666cc/out/result.zip\"}",
  63. "LastUpdateTime": 1566355564000,
  64. "Version": "21",
  65. "UserId": "11xxxxxxxxxxx980",
  66. "Appkey": "jAxxxxxxxxxxxKH1",
  67. "JobId": "f72a8372b2e8402e821078ccfb5666cc"
  68. "enableZoneIdentification": 1
  69. },
  70. {
  71. "Status": "COMPLETED",
  72. "Progress": 100,
  73. "CreateTime": 1566444124000,
  74. "Request": "{\"description\":\"xx\",\"area_threshold\":20,\"threshold\":0.2,\"items\":[{\"src\":\"/1232dfb52ba1460a8528eb40d9036e1e/original/src.tif\",\"name\":\"test.tif\",\"time\":1566351214000}],\"user\":\"1122668997700980\"}",
  75. "StatusCode": "41110400",
  76. "Namespace": "RSBuildingExtraction",
  77. "StatusMessage": "Error downloading: source path error: stat /oss/1122668997700980/1232dfb52ba1460a8528eb40d9036e1e/original/src.tif: no such file or directory",
  78. "Response": "",
  79. "LastUpdateTime": 1566444142000,
  80. "Version": "4",
  81. "UserId": "11xxxxxxxxxxx980",
  82. "Appkey": "jAxxxxxxxxxxxKH1",
  83. "JobId": "f7ca3046f2b44481b2b0350cbdeceb7e"
  84. "enableZoneIdentification": 1
  85. },
  86. {
  87. "Status": "COMPLETED",
  88. "Progress": 0,
  89. "CreateTime": 1566542115000,
  90. "Request": "{\"description\":\"x\",\"area_threshold\":23,\"threshold\":0.7,\"items\":[{\"src\":\"/1232dfb52ba1460a8528eb40d9036e1e/original/src.tif\",\"name\":\"test.tif\",\"time\":1566351214000}],\"user\":\"1122668997700980\"}",
  91. "StatusCode": "41110400",
  92. "Namespace": "RSBuildingExtraction",
  93. "StatusMessage": "cannot found service_id:[getter] model_id:[default]",
  94. "Response": "",
  95. "LastUpdateTime": 1566542117000,
  96. "Version": "2",
  97. "UserId": "11xxxxxxxxxxx980",
  98. "Appkey": "jAxxxxxxxxxxxKH1",
  99. "JobId": "f9034954ff3d466aac88c0a2d7347523"
  100. "enableZoneIdentification": 1
  101. },
  102. {
  103. "Status": "COMPLETED",
  104. "Progress": 100,
  105. "CreateTime": 1566542641000,
  106. "Request": "{\"description\":\"45\",\"area_threshold\":1,\"threshold\":0.2,\"items\":[{\"src\":\"/158152da4ee5406f9496b38d8e9095ad/original/src.tif\",\"name\":\"qeweqw.tif\",\"time\":1566295865000}],\"user\":\"1122668997700980\"}",
  107. "StatusCode": "41110400",
  108. "Namespace": "RSBuildingExtraction",
  109. "StatusMessage": "cannot found service_id:[getter] model_id:[default]",
  110. "Response": "",
  111. "LastUpdateTime": 1566542662000,
  112. "Version": "4",
  113. "UserId": "11xxxxxxxxxxx980",
  114. "Appkey": "jAxxxxxxxxxxxKH1",
  115. "JobId": "d2744743efec4c24a416ca96066bb8ea"
  116. "enableZoneIdentification": 0
  117. },
  118. {
  119. "Status": "EXECUTING",
  120. "Progress": 8,
  121. "CreateTime": 1566564889000,
  122. "Request": "{\"description\":\"xx\",\"area_threshold\":20,\"threshold\":0.1,\"items\":[{\"src\":\"http://osspath\",\"name\":\"e212\",\"time\":1566564263000}],\"user\":\"1122668997700980\"}",
  123. "StatusCode": "null",
  124. "Namespace": "RSBuildingExtraction",
  125. "StatusMessage": "",
  126. "Response": "",
  127. "LastUpdateTime": 1566564890000,
  128. "Version": "2",
  129. "UserId": "11xxxxxxxxxxx980",
  130. "Appkey": "jAxxxxxxxxxxxKH1",
  131. "JobId": "d76009d2fc3d448fa7cd0bce9158d26e"
  132. "enableZoneIdentification": 0
  133. }
  134. ]
  135. }
  136. },
  137. "ResultCode": 0
  138. }

错误码

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