文档首页> 工业数字模型驱动引擎> 常见问题> API相关问题> 为什么调用搜索服务管理API时,返回结果跟以前的不一样?
更新时间:2024-01-26 GMT+08:00
分享

为什么调用搜索服务管理API时,返回结果跟以前的不一样?

于2023年5月版本,工业数字模型驱动引擎-数据建模引擎(xDM Foundation,简称xDM-F)对搜索服务管理相关API的返回结果进行优化,让您更加直观、高效的读取搜索服务管理API的返回结果。

  • 删除多余data数组信息和“\”
  • 对返回结果代码格式化。

涉及优化的搜索服务管理API:

  • 搜索服务管理 > 搜索服务定义已创建并运行的搜索服务定义:http://{Endpoint}/rdm_{appID}_app/services/rdm/basic/api/searchservicedefine/api/run/pageSize/curPage
  • 全量数据服务中的搜索服务API:http://{Endpoint}/rdm_{appID}_app/services/rdm/basic/api/searchServ/executeScript/{entityName}/release/自定义搜索服务名称/pageSize/curPage
下面以“http://dme.cn-north-4.huaweicloud.com/rdm_01a2b2c4764d4e00f123g345fd9baa9f_app/services/rdm/basic/api/searchservicedefine/api/run/1/20”为例,其返回结果的区别如表1所示。
表1 返回结果示例

2023年5月版本以前

2023年5月版本以后

{
  "result": "SUCCESS",
  "data": [  
    "{\"data\":[{\"Floatingpoint\": 1.23,\"Join\": \"NAME/DESC\",\"LongInteger\": 498320592605286400,\"Text\": \"NAME\",\"Date\": \"2023-05-11 18:28:08\"
    },{\"Floatingpoint\": 2.34,\"Join\": \"namenew/namedesc\",\"LongInteger\": 498323399920062460,\"Text\": \"namenew\",\"Date\": \"2023-05-11 18:39:17\"}],\"totalCount\":2}"
  ],
  "errors": [],
  "pageInfo": {
    "curPage": 1,
    "pageSize": 20,
    "totalRows": 1,
    "totalPages": 1
  }
}
{
  "result": "SUCCESS",
  "data": [
    {
      "Floatingpoint": 1.23,
      "Join": "NAME/DESC",
      "LongInteger": 498320592605286400,
      "Text": "NAME",
      "Date": "2023-05-11 18:28:08"
    },
    {
      "Floatingpoint": 2.34,
      "Join": "namenew/namedesc",
      "LongInteger": 498323399920062460,
      "Text": "namenew",
      "Date": "2023-05-11 18:39:17"
    }
  ],
  "totalCount": 2,
  "errors": [],
  "pageInfo": {
    "curPage": 1,
    "pageSize": 20,
    "totalRows": 2,
    "totalPages": 1
  }
}
分享:

API相关问题 所有常见问题

more