更新时间:2025-11-13 GMT+08:00
分享

查询WEB卡片信息

接口功能

查询WEB卡片信息

使用说明

  • 前提条件

    正确创建web渠道配置。

接口原型

表1 接口原型说明

请求方法

POST

请求URL

https://ip:port/service-cloud/rest/webadapter/v1/webadapterfacade/queryWebCardInfoById

其中,ip:port为对外暴露的nslb的ip和port

表2 请求Headers参数说明

参数名称

选取原则

参数类型

默认值

说明

Content-Type

必选

String

固定填 application/json; charset=UTF-8。

Cookie

必选

String

集成页面的时候,ccmessaging通过请求响应,将ccmessaging-token写到集成页面浏览器的Cookie中。单独调用时需确保请求头的Cookie中含有ccmessaging-token=xxx,xxx为ccmessaging-token值。

请求参数

参数名称

选取原则

参数类型

说明

id

必选

String

web卡片id

响应参数

表3 响应参数说明

参数名称

选取原则

参数类型

说明

id

必选

String

卡片id

title

必选

String

卡片标题

mediaType

必选

String

卡片类型,为IMAGE,VIDEO,LOCATE

description

必选

String

卡片描述

redirectUrl

必选

String

卡片链接

mediaFileId

可选

String

多媒体资源id

alignment

必选

String

卡片展示风格,取值范围:

  • transverse:横向
  • Longitudinal:纵向

cardTemplateType

必选

String

模板类型,为0:普通类型,1:卡片选项

longitude

可选

String

经度,mediaType 为LOCATE才返回。

latitude

可选

String

纬度,mediaType 为LOCATE才返回。

locateName

可选

String

地址,mediaType 为LOCATE才返回。

locateDescription

可选

String

地址描述,描述mediaType 为LOCATE才返回。

CardTabs

必选

String

卡片列表。该对象的参数说明请参见表4

表4 CardTabs参数说明

参数名称

选取原则

参数类型

说明

selectcontent

必选

String

选项对应的内容

displaytext

必选

String

卡片展示文字

name

可选

String

图片名称

multiMediaId

可选

String

图片媒体资源

selectType

必选

String

选项类型,取值范围:

  • 0:链接
  • 2:回复

接口示例

  • 请求示例
    POST /service-cloud/rest/webadapter/v1/webadapterfacade/queryWebCardInfoById
    host: 10.10.10.2:18446
    connection: Keep-Alive
    x-forwarded-for: 10.10.10.3, 10.10.10.4
    x-real-ip: 10.10.10.5
    content-length: 401
    remote-host: 10.10.10.6
    user-agent: java/socket
    content-type: application/json; charset=utf-8
    cookie: JSESSION*****#*#*****3
    ccmessaging-token:********
    accept: */*
    
    {"id":"1687431048128159745"}
  • 响应示例
    {
        "mediaFileId": "1702153781533810690",
        "locateName": "地址88849",
        "redirectUrl": "",
        "latitude": "23.5",
        "multiMediaId": "1702153781533810690",
        "cardType": 3,
        "description": "卡片描述8780",
        "mediaType": "LOCATE",
        "locateDescription": "地址描述839",
        "title": "卡片标题4507",
        "CardTabs": [
            {
                "selectcontent": "回复",
                "displaytext": "回复",
                "name": "redirectUrl",
                "multiMediaId": "1699978101548609537",
                "selectType": "2"
            },
            {
                "selectcontent": "https://****",
                "displaytext": "访问",
                "name": "",
                "selectType": "0"
            }
        ],
        "name": "卡片1227",
        "cardTemplateType": 0,
        "id": "1702153790505426946",
        "alignment": "transverse",
        "longitude": "23.5"
    }

相关文档