该接口用于获取指定实例的日志信息(近七日内)。

调试

您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。

请求头

该接口使用公共请求头,无特殊请求头。请参见公共请求参数文档。

请求语法

GET /v2/openapi/instances/[instanceId]/logs HTTP/1.1

请求参数

名称 类型 位置 是否必选 示例值 描述
startTime Integer Query 1586673466

开始时间秒级时间戳

endTime Integer Query 1586673466

结束时间秒级时间戳

instanceId String Path airec-cn-o400whm78004

实例ID。

queryParams String Query requestId:xxxx;requestUri:xxx;

查询条件:key1:value1;key2:value;

page Integer Query 1

默认1

size Integer Query 10

默认10

返回数据

名称 类型 示例值 描述
code String InternalServerError

错误码

headers Struct

详情

X-Total-Count Integer 1000

查询总量

message String An internal server error occurred

错误详情

requestId String 8F81A922-6C81-46D6-B78C-CC35E16B1691

请求id

result List xxx

查询结果

示例

请求示例

GET /openapi/instances/airec-cn-dsksdlisdlfsd/logs?startTime=1234&endTime=3456

正常返回示例

XML格式

<result>
    <parentId>26842</parentId>
    <bid>26842</bid>
    <uid>1992366463629083</uid>
    <ownerId>1992366463629083</ownerId>
    <instanceId>airec-cn-npk1sw34v002</instanceId>
    <mfa>false</mfa>
    <clientIp>100.68.178.69</clientIp>
    <remoteAddr>false</remoteAddr>
    <apiName>Recommend</apiName>
    <requestMethod>GET</requestMethod>
    <host>airec.cn-hangzhou.aliyun-inc.com</host>
    <regionId>cn-hangzhou</regionId>
    <localTime>21/Sep/2020:15:04:13</localTime>
    <requestId>189ADEE6-1D78-438F-8EA4-32FE96C3900A</requestId>
    <requestUri>/openapi/instances/airec-cn-npk1sw34v002/actions/recommend?ServiceCode=airec&amp;UserId=0&amp;ReturnCount=3</requestUri>
    <requestBody>-</requestBody>
    <requestLength>1482</requestLength>
    <bodyByteSize>1110</bodyByteSize>
    <responseBody>
        <Result>
            <TraceId>Alibaba</TraceId>
            <ItemId>73</ItemId>
            <ItemType>recipe</ItemType>
            <TraceInfo>1007.59204.123277.100200300000000:9f78c1f5-02c9-4fd1-9674-5cc1a53595fe:6144018481:1:0:1:::3:content___73:recipe:hot_common:1.0:1.0:100.0:1600671853677::context__recall_index=175,context__hour=15,context__trigger_num=1::::::::</TraceInfo>
            <MatchInfo>hot_common</MatchInfo>
            <Weight>100</Weight>
            <Position>0</Position>
        </Result>
        <Result>
            <TraceId>Alibaba</TraceId>
            <ItemId>76</ItemId>
            <ItemType>audio</ItemType>
            <TraceInfo>1007.59204.123277.100200300000000:9f78c1f5-02c9-4fd1-9674-5cc1a53595fe:6144018481:1:1:1:::3:content___76:audio:hot_common:1.0:1.0:100.0:1600671853677::context__recall_index=180,context__hour=15,context__trigger_num=1::::::::</TraceInfo>
            <MatchInfo>hot_common</MatchInfo>
            <Weight>100</Weight>
            <Position>1</Position>
        </Result>
        <Result>
            <TraceId>Alibaba</TraceId>
            <ItemId>79</ItemId>
            <ItemType>item</ItemType>
            <TraceInfo>1007.59204.123277.100200300000000:9f78c1f5-02c9-4fd1-9674-5cc1a53595fe:6144018481:1:2:1:::3:content___79:item:hot_common:1.0:1.0:100.0:1600671853677::context__recall_index=102,context__hour=15,context__trigger_num=1::::::::</TraceInfo>
            <MatchInfo>hot_common</MatchInfo>
            <Weight>100</Weight>
            <Position>2</Position>
        </Result>
        <RequestId>189ADEE6-1D78-438F-8EA4-32FE96C3900A</RequestId>
    </responseBody>
    <errorCode>-</errorCode>
    <status>200</status>
    <upstreamTime>0.219</upstreamTime>
</result>
<requestId>1DD84981-7A61-4C74-AA52-459A22B6FB54</requestId>
<headers>
    <X-Total-Count>1</X-Total-Count>
</headers>

JSON格式

{
    "result": {
        "parentId": 26842,
        "bid": 26842,
        "uid": 1992366463629083,
        "ownerId": 1992366463629083,
        "instanceId": "airec-cn-npk1sw34v002",
        "mfa": false,
        "clientIp": "100.68.178.69",
        "remoteAddr": false,
        "apiName": "Recommend",
        "requestMethod": "GET",
        "host": "airec.cn-hangzhou.aliyun-inc.com",
        "regionId": "cn-hangzhou",
        "localTime": "21/Sep/2020:15:04:13",
        "requestId": "189ADEE6-1D78-438F-8EA4-32FE96C3900A",
        "requestUri": "/openapi/instances/airec-cn-npk1sw34v002/actions/recommend?ServiceCode=airec&amp;UserId=0&amp;ReturnCount=3",
        "requestBody": "-",
        "requestLength": 1482,
        "bodyByteSize": 1110,
        "responseBody": {
            "Result": [
                {
                    "TraceId": "Alibaba",
                    "ItemId": 73,
                    "ItemType": "recipe",
                    "TraceInfo": "1007.59204.123277.100200300000000:9f78c1f5-02c9-4fd1-9674-5cc1a53595fe:6144018481:1:0:1:::3:content___73:recipe:hot_common:1.0:1.0:100.0:1600671853677::context__recall_index=175,context__hour=15,context__trigger_num=1::::::::",
                    "MatchInfo": "hot_common",
                    "Weight": 100,
                    "Position": 0
                },
                {
                    "TraceId": "Alibaba",
                    "ItemId": 76,
                    "ItemType": "audio",
                    "TraceInfo": "1007.59204.123277.100200300000000:9f78c1f5-02c9-4fd1-9674-5cc1a53595fe:6144018481:1:1:1:::3:content___76:audio:hot_common:1.0:1.0:100.0:1600671853677::context__recall_index=180,context__hour=15,context__trigger_num=1::::::::",
                    "MatchInfo": "hot_common",
                    "Weight": 100,
                    "Position": 1
                },
                {
                    "TraceId": "Alibaba",
                    "ItemId": 79,
                    "ItemType": "item",
                    "TraceInfo": "1007.59204.123277.100200300000000:9f78c1f5-02c9-4fd1-9674-5cc1a53595fe:6144018481:1:2:1:::3:content___79:item:hot_common:1.0:1.0:100.0:1600671853677::context__recall_index=102,context__hour=15,context__trigger_num=1::::::::",
                    "MatchInfo": "hot_common",
                    "Weight": 100,
                    "Position": 2
                }
            ],
            "RequestId": "189ADEE6-1D78-438F-8EA4-32FE96C3900A"
        },
        "errorCode": "-",
        "status": 200,
        "upstreamTime": 0.219
    },
    "requestId": "1DD84981-7A61-4C74-AA52-459A22B6FB54",
    "headers": {
        "X-Total-Count": 1
    }
}

错误码

访问错误中心查看更多错误码。