注意:以下文档只适用于TOP接口,请谨慎使用!

aliyun.cosmo.gateway.invoke (alios cosmo服务调用)

AliOS cosmo服务分发平台对外调用接口

公共参数

请求参数

名称 类型 是否必须 示例值 更多限制 描述
context RdamContext 必须 请求上下文参数
rdam_request RdamGenericRequest 必须 请求对象
  • └ trace_id
  • String
  • 可选
  • 1111122222
  • 请求标示

响应参数

名称 类型 示例值 描述
result RdamResponse {"code":200,"message":"success","traceId":"DET9CO1CRAIVCMJTNGU8","dataList":[{"more":{"tplId":"stockAppCard_tplId_001"},"itemList":[{"stockCode":"000001","stockType":"1","more":{"tradeTime":"34200|54000|1|34200|41400|46800|54000","udfStockType":"1","stockStatus":"1","openPrice":"3106.99"},"changePercent":"-0.02%","weblink":"http://wap.eastmoney.com/3g/stock/StockIndex,000001.shtml","change":"-0.48","name":"上证指数","currentPrice":"3109.55","totalValue":"31605005563909"},{"stockCode":"399001","stockType":"2","more":{"tradeTime":"34200|54000|1|34200|41400|46800|54000","udfStockType":"5","stockStatus":"1","openPrice":"10879.99"},"changePercent":"0.07%","weblink":"http://wap.eastmoney.com/3g/stock/StockIndex,399001.shtml","change":"7.74","name":"深证成指","currentPrice":"10890.69","totalValue":"22400953714133"}],"secondLogoText":"上证指数"}]} result
  • └ message
  • String
  • "success"
  • message
  • └ more
  • Json
  • more
  • └ code
  • Number
  • code
  • └ data_list
  • Json []
  • [{"more":{"tplId":"stockAppCard_tplId_001"},"itemList":[{"stockCode":"000001","stockType":"1","more":{"tradeTime":"34200|54000|1|34200|41400|46800|54000","udfStockType":"1","stockStatus":"1","openPrice":"3106.99"},"changePercent":"-0.02%","weblink":"http://wap.eastmoney.com/3g/stock/StockIndex,000001.shtml","change":"-0.48","name":"上证指数","currentPrice":"3109.55","totalValue":"31605005563909"},{"stockCode":"399001","stockType":"2","more":{"tradeTime":"34200|54000|1|34200|41400|46800|54000","udfStockType":"5","stockStatus":"1","openPrice":"10879.99"},"changePercent":"0.07%","weblink":"http://wap.eastmoney.com/3g/stock/StockIndex,399001.shtml","change":"7.74","name":"深证成指","currentPrice":"10890.69","totalValue":"22400953714133"}],"secondLogoText":"上证指数"}] dataList
  • dataList
  • └ trace_id
  • String
  • traceId
  • └ biz_code
  • Number
  • 50007
  • biz_code
  • └ biz_msg
  • String
  • "提醒时间要在3分钟以后"
  • biz_msg

请求示例

  • JAVA
  • .NET
  • PHP
  • CURL
  • Python
  • C/C++
  • NodeJS
TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
AliyunCosmoGatewayInvokeRequest req = new AliyunCosmoGatewayInvokeRequest();
RdamContext context = new RdamContext();
context.setPropertyMap(对应数据结构示例JSON);
req.setContext(context);
RdamGenericRequest rdam_request = new RdamGenericRequest();
rdam_request.setConMap(对应数据结构示例JSON);
rdam_request.setTraceId("1111122222");
req.setRdamRequest(rdam_request);
AliyunCosmoGatewayInvokeResponse response = client.execute(req);

响应示例

  • XML示例
  • JSON示例
<aliyun_cosmo_gateway_invoke_response>
    <result>
        <message>&quot;success&quot;</message>
        <more>略</more>
        <code>略</code>
        <data_list>
            <json>[{&quot;more&quot;:{&quot;tplId&quot;:&quot;stockAppCard_tplId_001&quot;}</json>
            <json>&quot;itemList&quot;:[{&quot;stockCode&quot;:&quot;000001&quot;</json>
            <json>&quot;stockType&quot;:&quot;1&quot;</json>
            <json>&quot;more&quot;:{&quot;tradeTime&quot;:&quot;34200|54000|1|34200|41400|46800|54000&quot;</json>
            <json>&quot;udfStockType&quot;:&quot;1&quot;</json>
            <json>&quot;stockStatus&quot;:&quot;1&quot;</json>
            <json>&quot;openPrice&quot;:&quot;3106.99&quot;}</json>
            <json>&quot;changePercent&quot;:&quot;-0.02%&quot;</json>
            <json>&quot;weblink&quot;:&quot;http://wap.eastmoney.com/3g/stock/StockIndex</json>
            <json>000001.shtml&quot;</json>
            <json>&quot;change&quot;:&quot;-0.48&quot;</json>
            <json>&quot;name&quot;:&quot;上证指数&quot;</json>
            <json>&quot;currentPrice&quot;:&quot;3109.55&quot;</json>
            <json>&quot;totalValue&quot;:&quot;31605005563909&quot;}</json>
            <json>{&quot;stockCode&quot;:&quot;399001&quot;</json>
            <json>&quot;stockType&quot;:&quot;2&quot;</json>
            <json>&quot;more&quot;:{&quot;tradeTime&quot;:&quot;34200|54000|1|34200|41400|46800|54000&quot;</json>
            <json>&quot;udfStockType&quot;:&quot;5&quot;</json>
            <json>&quot;stockStatus&quot;:&quot;1&quot;</json>
            <json>&quot;openPrice&quot;:&quot;10879.99&quot;}</json>
            <json>&quot;changePercent&quot;:&quot;0.07%&quot;</json>
            <json>&quot;weblink&quot;:&quot;http://wap.eastmoney.com/3g/stock/StockIndex</json>
            <json>399001.shtml&quot;</json>
            <json>&quot;change&quot;:&quot;7.74&quot;</json>
            <json>&quot;name&quot;:&quot;深证成指&quot;</json>
            <json>&quot;currentPrice&quot;:&quot;10890.69&quot;</json>
            <json>&quot;totalValue&quot;:&quot;22400953714133&quot;}]</json>
            <json>&quot;secondLogoText&quot;:&quot;上证指数&quot;}]	dataList</json>
        </data_list>
        <trace_id>略</trace_id>
        <biz_code>50007</biz_code>
        <biz_msg>&quot;提醒时间要在3分钟以后&quot;</biz_msg>
    </result>
</aliyun_cosmo_gateway_invoke_response>

异常示例

  • XML示例
  • JSON示例
<error_response>
    <code>50</code>
    <msg>Remote service error</msg>
    <sub_code>isv.invalid-parameter</sub_code>
    <sub_msg>非法参数</sub_msg>
</error_response>

错误码解释

错误码 错误描述 解决方案
isp.rdam_error

API工具

如何获得此API

FAQ

返回
顶部