获取场景分享信息

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

接口说明

获取场景分享信息
如需调用,请访问 开发者文档 来查看详细的接口使用说明
该接口仅开放给已获取SDK的开发者
如开启https功能,请求地址的协议应改为https,如:https://www.example.com/wish3dearth/api/access/v1.0.0/getLicenseInfo

API地址

GET /wish3dearth/api/scene/share/v1.0.0/getShareInfo

是否需要登录

请求字段说明

参数类型请求类型是否必须说明
shareIdstringquery场景分享ID

响应字段说明

参数类型说明
createBystring场景分享者ID
createByNamestring场景分享者名字
createDatestring场景分享创建时间
expireTimestring链接到期时间
idstring场景分享ID
ownerstring场景分享属有者ID
passwordstring链接密码
remarksstring场景分享描述
sceneIdstring场景ID
sceneNamestring场景名称
shareTypestring分享类型(1:公开, 2:设置密码访问)
shortUrlstring场景分享短链接
viewCountstring预览次数

响应成功示例

{
  "code": 0,
  "data": {
    "id": "0f2d9fdbac50409d803ce4c00a7c13ae",
    "sceneId": "107d27560134177fcf1cacdf41251e73",
    "shareType": "1",
    "password": "",
    "expireTime": null,
    "viewCount": 1,
    "owner": "c4ed11ced28d4534b5ab247d77d6abd7",
    "createBy": "c4ed11ced28d4534b5ab247d77d6abd7",
    "createDate": "2019-12-06 17:18:56",
    "remarks": null,
    "shortUrl": "http://10.16.30.108/w?s=y2E3ey",
    "createByName": "zt_test01",
    "sceneName": "我的场景"
  },
  "message": "成功"
}

响应失败示例

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

响应接受类型

application/json

响应状态码

HTTP状态码原因
0成功
200OK
401Unauthorized
403Forbidden
404Not Found
10000token不能为空
10001token已失效,请重新登录
14085场景分享ID为空
14086未查询到场景分享配置
99998非法请求
99999服务器异常

示例代码

$.ajax({

    url: '/wish3dearth/api/scene/share/v1.0.0/getShareInfo?shareId=',

    type: 'GET',

    data: '',

    dataType: 'text',

    cache: false,

    contentType: 'application/json',

    xhrFields: {

        withCredentials: true

    },

    crossDomain: true,

    success:function(data){

        // 成功返回值

    },

    error:function(XMLHttpRequest, textStatus, errorThrown){

    

    }

})