批量查询素材

优质
小牛编辑
128浏览
2023-12-01

接口说明

查询符合条件的所有素材信息
如需调用,请访问 开发者文档 来查看详细的接口使用说明
该接口仅开放给已获取SDK的开发者

API地址

POST /api/server/1.0.0/query

是否需要登录

请求字段说明

参数类型请求类型是否必须说明
keyWordstringform关键字如果为""表示差全部,有值时根据关键字查询
typeintform数据类型【0:全部数据类型;1:实景数据;2:人工数据;3:矢量数据;4:影像数据;5:地形数据】
dataTypestringform数据所有者【0:仅自己;1:全部用户】
countintform每页总数
pageIndexintform页码

响应字段说明

响应成功示例

{
  "code": 200,
  "data": {
    "data": [
      {
        "isdelserver": 0,
        "dataType": "obj",
        "dataSize": 243433,
        "jsonPath": "",
        "updateTime": "1534398792000",
        "beforeWaitingTotal": 0,
        "serverstate": 1,
        "title": "obj",
        "userGuid": "1",
        "isdelzip": 0,
        "serverType": 2,
        "guid": "88987909-9f11-434e-b464-58916a71c147",
        "handleStatus": 6,
        "from": "",
        "position": "120,30,0",
        "viewTimes": 1,
        "powers": "",
        "isDel": 0,
        "handleStartTime": "0",
        "username": "admin"
      },
      {
        "coverImg": "",
        "isdelserver": 0,
        "dataType": "osgb",
        "dataSize": 87139125,
        "jsonPath": "",
        "updateTime": "1532829524000",
        "beforeWaitingTotal": 0,
        "serverstate": 2,
        "title": "fuzhou",
        "userGuid": "1",
        "isdelzip": 0,
        "password": "",
        "serverType": 1,
        "guid": "5f2fd0a1-b335-4355-850f-9beed313c8aa",
        "viewPointGuid": "",
        "handleStatus": -3,
        "from": "0",
        "position": "120);30);0",
        "viewTimes": 0,
        "powers": "",
        "isDel": 0,
        "username": "admin"
      }
    ],
    "count": "54"
  },
  "message": "OK"
}

响应失败示例

{
  "code": 500,
  "message": "未知错误,请及时联系管理人员进行处理"
}

响应接受类型

application/json:charset=utf-8

响应状态码

HTTP状态码原因
204No Content
401Unauthorized
403Forbidden
40001查询结果为空
40001查询结果不是JSON数据
40001查询结果JSON不符合要求
40002请求接口失败
40003参数无效
40004令牌无效
40004令牌为空

示例代码

$.ajax({
    url:'/api/server/1.0.0/query',
    type:'POST',
    data:'pageIndex=&dataType=&count=&type=&keyWord=',
    dataType:'text',
    cache:false,
    contentType: "application/x-www-form-urlencoded",
	xhrFields: {
        withCredentials: true
    },
    crossDomain: true,
    success:function(data){
        // 成功返回值
    },
    error:function(XMLHttpRequest, textStatus, errorThrown){

    }
})