全部产品
云市场

应用处理

更新时间:2019-02-26 10:28:06

查看应用信息

查看指定应用信息

URL

/v3/openapi/apps/$app_name

  • $app_name 为您的应用名或应用ID(为应用名时,将查询服务中版本)
  • 以上 URL 省略了请求Header参数及编码等因素
  • 以上 URL 中省略了访问应用的 host 地址
  • 查询签名过程实现详情请参考 V3版API 签名机制 文档

请求协议

HTTP

请求方式

GET

支持格式

JSON

返回结果

参数 类型 描述
errors string 查询报错信息,message代表错误信息,code 对应含义参考错误码文档
request_id string 该条查询的记录id,主要用于排查问题使用
status string 执行结果,OK为成功,FAIL为失败,请根据返回错误码进行排查
result string 应用信息

result 重要参数

  • status:应用状态
  • fetch_fields:默认展示字段配置信息
  • type:应用类型
  • schema:应用结构信息
  • tables:应用表结构配置信息
  • indexes:应用索引配置信息
  • quota:应用配额信息
  • compute_resource:计算资源LCU配额信息
  • spec:应用规格信息
  • doc_size:应用容量配额信息
  • used_doc_size:已使用应用容量信息
  • first_ranks:粗排表达式信息
  • second_ranks:精排表达式信息
  • data_sources:数据源配置信息
  • summaries:摘要信息
  • auto_switch:自动切换配置信息
  • region:区域信息
  • category_prediction:类目预测配置信息
  • query_processors:查询分析配置信息
  • auto_switch:自动切换

group 部分重要参数

  • id:Group ID(对应账单中实例ID信息)
  • name:应用名
  • current_version:服务中的应用版本
  • switched_time:应用版本切换时间
  • created:应用创建时间
  • updated:应用更新时间

示例

请求:(此处省略了请求Header参数及编码等因素)

  1. http://$host/v3/openapi/apps/app_schema_demo

成功返回:

  1. {
  2. "errors": [],
  3. "request_id": "155084740119723291017595",
  4. "status": "OK",
  5. "result": {
  6. "id": "110053503",
  7. "description": "",
  8. "status": 1,
  9. "unread_error_count": 0,
  10. "fetch_fields": [
  11. "id",
  12. "name"
  13. ],
  14. "type": "enhanced",
  15. "virtual_cluster": "",
  16. "cluster_name": "share_common_enhanced_out1",
  17. "schema": {
  18. "tables": {
  19. "tab": {
  20. "fields": {
  21. "id": {
  22. "name": "id",
  23. "type": "INT",
  24. "primary_key": true
  25. },
  26. "name": {
  27. "name": "name",
  28. "type": "TEXT",
  29. "primary_key": false
  30. },
  31. "phone": {
  32. "name": "phone",
  33. "type": "SHORT_TEXT",
  34. "primary_key": false
  35. },
  36. "int_arr": {
  37. "name": "int_arr",
  38. "type": "INT_ARRAY",
  39. "primary_key": false
  40. },
  41. "literal_arr": {
  42. "name": "literal_arr",
  43. "type": "LITERAL_ARRAY",
  44. "primary_key": false
  45. },
  46. "float_arr": {
  47. "name": "float_arr",
  48. "type": "FLOAT_ARRAY",
  49. "primary_key": false
  50. },
  51. "cate_id": {
  52. "name": "cate_id",
  53. "type": "INT",
  54. "primary_key": false
  55. }
  56. },
  57. "primary_table": true,
  58. "name": "tab"
  59. }
  60. },
  61. "indexes": {
  62. "search_fields": {
  63. "id": {
  64. "fields": [
  65. "id"
  66. ]
  67. },
  68. "name": {
  69. "fields": [
  70. "name"
  71. ],
  72. "analyzer": "chn_standard"
  73. },
  74. "phone": {
  75. "fields": [
  76. "phone"
  77. ],
  78. "analyzer": "fuzzy"
  79. },
  80. "int_arr": {
  81. "fields": [
  82. "int_arr"
  83. ]
  84. },
  85. "literal_arr": {
  86. "fields": [
  87. "literal_arr"
  88. ]
  89. },
  90. "cate_id": {
  91. "fields": [
  92. "cate_id"
  93. ]
  94. }
  95. },
  96. "filter_fields": [
  97. "id",
  98. "int_arr",
  99. "literal_arr",
  100. "float_arr",
  101. "cate_id"
  102. ]
  103. },
  104. "plugin_info": [],
  105. "route_field": null
  106. },
  107. "quota": {
  108. "id": "110053503",
  109. "doc_size": 1,
  110. "compute_resource": 20,
  111. "qps": 0,
  112. "spec": "opensearch.share.common",
  113. "used_doc_size": 0,
  114. "used_compute_resource": 0,
  115. "used_qps": 0
  116. },
  117. "first_ranks": [
  118. {
  119. "id": "",
  120. "name": "default",
  121. "description": "",
  122. "active": true,
  123. "meta": [
  124. {
  125. "attribute": "static_bm25()",
  126. "arg": "",
  127. "weight": 1
  128. }
  129. ],
  130. "created": 0,
  131. "updated": 0
  132. }
  133. ],
  134. "second_ranks": [
  135. {
  136. "id": "-1",
  137. "name": "default",
  138. "meta": "",
  139. "active": false,
  140. "description": "",
  141. "created": 0,
  142. "updated": 0
  143. },
  144. {
  145. "id": "443471",
  146. "name": "jp_test",
  147. "meta": "text_relevance(name)",
  148. "active": true,
  149. "description": "",
  150. "created": 1550831472,
  151. "updated": 1550831472
  152. }
  153. ],
  154. "data_sources": [],
  155. "summaries": [
  156. {
  157. "name": "default",
  158. "meta": [
  159. {
  160. "field": "name",
  161. "len": 50,
  162. "element": "em",
  163. "ellipsis": "...",
  164. "snippet": 1
  165. }
  166. ]
  167. }
  168. ],
  169. "quota_reviewing_task": null,
  170. "config": {
  171. "id": "203f61eb-367f-11e9-a94e-6c92bf316113",
  172. "progress": 0,
  173. "status": 3,
  174. "last_ran_timestamp": 1550827560,
  175. "type": "app-creation",
  176. "running": false,
  177. "paused": false,
  178. "finished": false,
  179. "idle": true,
  180. "created": 1550825524,
  181. "updated": 1550827563,
  182. "cron": "*/5 * * * * *",
  183. "enabled": false,
  184. "last_scheduled_timestamp": 1550827560,
  185. "auto_create_group": true,
  186. "auto_create_version": true,
  187. "auto_reindex": false,
  188. "delete_parent_on_success": false,
  189. "delete_self_on_failure": false,
  190. "error_on_datasource_specified": false
  191. },
  192. "created": 1550825522,
  193. "auto_switch": true,
  194. "category_prediction": "app_schema_demo",
  195. "query_processors": [
  196. {
  197. "id": "443469",
  198. "name": "qp_test",
  199. "active": true,
  200. "indexes": [
  201. "_ALL_INDEXES_"
  202. ],
  203. "processors": [
  204. {
  205. "use_system_dictionary": true,
  206. "intervention_dictionary": "",
  207. "name": "term_weighting"
  208. },
  209. {
  210. "use_system_dictionary": true,
  211. "intervention_dictionary": "tongyici",
  212. "name": "synonym"
  213. },
  214. {
  215. "use_system_dictionary": true,
  216. "intervention_dictionary": "pinxiejiucuo",
  217. "name": "spell_check"
  218. },
  219. {
  220. "use_system_dictionary": true,
  221. "intervention_dictionary": "tingyongci",
  222. "name": "stop_word"
  223. }
  224. ],
  225. "created": 1550830777,
  226. "updated": 1550831530
  227. }
  228. ],
  229. "name": "app_schema_demo",
  230. "data_progress": 3,
  231. "switch_time": 1550827563,
  232. "region": "outer",
  233. "progress_percent": 100,
  234. "rebuilding": false,
  235. "dashboard": {
  236. "unread_error_count": 0,
  237. "rebuilding": false
  238. },
  239. "group": {
  240. "id": "110053290",
  241. "name": "app_schema_demo",
  242. "current_version": "110053503",
  243. "switched_time": 1550827563,
  244. "quota": {
  245. "doc_size": 1,
  246. "compute_resource": 20,
  247. "spec": "opensearch.share.common"
  248. },
  249. "charging_way": 1,
  250. "versions": [
  251. "110053292",
  252. "110053503"
  253. ],
  254. "project_id": "",
  255. "created": 1550744685,
  256. "updated": 1550827560,
  257. "switch_time": 1550827563,
  258. "region": "outer"
  259. }
  260. }
  261. }

错误返回:

  1. {
  2. "errors": [
  3. {
  4. "code": 2001,
  5. "message": "待查应用不存在.待查应用不存在。",
  6. "params": {
  7. "friendly_message": "待查应用不存在。"
  8. }
  9. }
  10. ],
  11. "request_id": "150452485319940487135024",
  12. "status": "FAIL"
  13. }

获取应用列表

获取应用列表操作

URL

/v3/openapi/apps?page=1&size=10

  • 以上 URL 省略了请求Header参数及编码等因素
  • 以上 URL 中省略了访问应用的 host 地址
  • 查询签名过程实现,请参考 V3版API 签名机制 文档中的描述

支持格式

JSON

HTTP请求方式

GET

请求参数

参数 类型 必需 取值范围 默认值 描述
page int 获取第几页应用列表,该参数值必须大于0,否者会报错
size int 每页返回的应用个数,该参数值必须大于或等于0,否者会报错

返回结果

参考上面单应用“返回结果”,此处获取应用列表数据信息与上面单应用召回信息是类似的,不再重复展示。

示例

请求:(此处省略了请求Header参数及编码等因素)

  1. http://$host/v3/openapi/apps?page=1&size=10

成功返回:

  • 参考上面单应用“成功返回”,此处为多个单应用信息集合,因内容较长,不再重复展示。

错误返回:

  • 参考上面单应用“错误返回”,此处报错信息与上面单应用查询报错内容是类似的,不再重复展示。