通过 API 返回的Request ID 查询当前账号调用 OpenAPI 的日志详情,用于故障排查。
接口说明
该 API 不支持授权。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
 调试
        
            调试
        
    
授权信息
请求语法
GET /getOwnRequestLog HTTP/1.1请求参数
| 名称 | 类型 | 必填 | 描述 | 示例值 | 
| logRequestId | string | 是 | 需要查询日志的 RequestId。 API 请求的唯一标识符(UUID 格式,且必须为大写)。 | 123E4567-E89B-12D3-A456-426614174000 | 
返回参数
| 名称 | 类型 | 描述 | 示例值 | 
| object | Schema of Response | ||
| logInfo | object | 包含 API 请求日志的详细信息。 | |
| basicInfo | object | 包含 API 请求的基本信息。 | |
| api | string | 所查日志内的 API 名称。 | RunInstances | 
| apiDoc | object | API 文档信息。 | |
| aliyunSite | string | 中国站文档链接。 | https://api.aliyun.com/document/Ecs/2014-05-26/RunInstances | 
| alibabacloudSite | string | 国际站文档链接。 | https://api.alibabacloud.com/document/Ecs/2014-05-26/RunInstances | 
| apiVersion | string | API 版本信息。 | 2014-05-26 | 
| product | string | 产品 CODE。 | Ecs | 
| productName | object | 产品名称信息,包含中文名和英文名。 | |
| cnName | string | 产品中文名。 | 云服务器 ECS | 
| enName | string | 产品英文名。 | Elastic Compute Service | 
| apiStyle | string | API 风格,可能为 ROA 或 RPC 风格类型。 | rpc | 
| logRequestId | string | 传入的 RequestId。 | 123E4567-E89B-12D3-A456-426614174000 | 
| httpStatusCode | string | 所查日志内的 HTTP 状态码信息。 | 400 | 
| errorCode | string | 所查日志内的错误码。如查询的请求并未报错,该字段为空。 | IncorrectStatus.TransitRouter | 
| errorMessage | string | 所查日志内的错误消息。如查询的请求并未报错,该字段为空。 | The resource is not in a valid state for the operation. | 
| accessDeniedDetail | object | 无权限报错详细信息 | |
| policyType | string | 无权限的策略类型 | AccountLevelIdentityBasedPolicy | 
| authPrincipalOwnerId | string | 当前身份所属的阿里云账号 UID 信息 | 1001234561234567 | 
| authPrincipalType | string | 操作者的身份类型 | SubUser | 
| authPrincipalDisplayName | string | 身份标识 | 205618123456123456 | 
| noPermissionType | string | 无权限原因 | ImplicitDeny | 
| authAction | string | 导致无权限的具体操作 | openapiexplorer:GetRequestLog | 
| encodedDiagnosticMessage | string | 用于诊断的编码后信息。可调用 Ram 产品的 DecodeDiagnosticMessage OpenAPI 进一步诊断获得更多诊断信息。 | - | 
| httpMethod | string | HTTP 请求方式。 | GET | 
| requestDuration | string | 网关从收到请求到返回响应的时间。单位毫秒(ms)。 | 188 | 
| sdkRequestTime | string | 发起请求时间。 日期格式按照 ISO8601 表示法,并使用 UTC 时间,格式为 yyyy-MM-ddTHH:mm:ssZ | 2025-01-21T07:43:06Z | 
| gatewayProcessTime | string | 网关接收到请求的时间。 日期格式按照 ISO8601 表示法,并使用 UTC 时间,格式为 yyyy-MM-ddTHH:mm:ssZ | 2025-01-21T07:43:06Z | 
| regionId | string | 服务区域 ID。 | cn-hangzhou | 
| endpoint | string | 服务区域对应的服务地址(Endpoint)。 | ecs.cn-hangzhou.aliyuncs.com | 
| throttlingResult | string | 流控校验结果。FC.PASS:未被流控检查拦截;FC.DENY:被流控检查拦截。 | FC.PASS | 
| callerInfo | object | 调用者信息。 | |
| callerType | string | 调用者类型。 
 | sub | 
| callerIp | string | 调用者的 IP 地址 | 100.68.xxx.xxx | 
| masterAccountId | string | 主账号 ID | 1973374733454118 | 
| callerAccountId | string | 调用者账号 ID | 241009849925897811 | 
| userAgent | string | 用户代理信息 | AlibabaCloud API Workbench | 
| authenticationInfo | object | 认证信息 | |
| signatureVersion | string | 签名版本 | unknown | 
| signatureMethod | string | 签名方法。 
 | HMAC-SHA256 | 
| authenticationType | string | 认证类型。 
 | AK | 
| parameters | array<object> | 请求参数信息。 | |
| object | |||
| name | string | 请求参数名。 | InstanceType | 
| value | any | 请求参数值。 | ecs.g6.large | 
| required | boolean | 该请求参数是否必填。 | false | 
| type | string | 该请求参数类型。 | string | 
| responses | object | 对应该请求的返回信息。 | |
| responseBody | string | 返回信息。 | - | 
| responseBodyFormat | string | 响应体类型。 JSON、XML、HTML。 | JSON | 
| requestId | string | 本次请求 ID。 | 9BFC4AC1-6BE4-5405-BDEC-CA288D404812 | 
示例
正常返回示例
JSON格式
{
  "logInfo": {
    "basicInfo": {
      "api": "RunInstances\n",
      "apiDoc": {
        "aliyunSite": "https://api.aliyun.com/document/Ecs/2014-05-26/RunInstances",
        "alibabacloudSite": "https://api.alibabacloud.com/document/Ecs/2014-05-26/RunInstances"
      },
      "apiVersion": "2014-05-26",
      "product": "Ecs\n",
      "productName": {
        "cnName": "云服务器 ECS\n",
        "enName": "\t\nElastic Compute Service\n"
      },
      "apiStyle": "rpc",
      "logRequestId": "123E4567-E89B-12D3-A456-426614174000",
      "httpStatusCode": "400",
      "errorCode": "IncorrectStatus.TransitRouter\n",
      "errorMessage": "The resource is not in a valid state for the operation.\n",
      "accessDeniedDetail": {
        "policyType": "\t\nAccountLevelIdentityBasedPolicy\n",
        "authPrincipalOwnerId": "1001234561234567\n",
        "authPrincipalType": "SubUser\n",
        "authPrincipalDisplayName": "205618123456123456\n",
        "noPermissionType": "ImplicitDeny\n",
        "authAction": "openapiexplorer:GetRequestLog\n",
        "encodedDiagnosticMessage": "-\n"
      },
      "httpMethod": "GET\n",
      "requestDuration": "188",
      "sdkRequestTime": "2025-01-21T07:43:06Z\n",
      "gatewayProcessTime": "2025-01-21T07:43:06Z\n\n",
      "regionId": "cn-hangzhou\n",
      "endpoint": "ecs.cn-hangzhou.aliyuncs.com\n",
      "throttlingResult": "FC.PASS\n"
    },
    "callerInfo": {
      "callerType": "sub\n",
      "callerIp": "100.68.xxx.xxx\n",
      "masterAccountId": "1973374733454118\n",
      "callerAccountId": "241009849925897811\n",
      "userAgent": "AlibabaCloud API Workbench\n"
    },
    "authenticationInfo": {
      "signatureVersion": "unknown\n",
      "signatureMethod": "HMAC-SHA256",
      "authenticationType": "AK"
    },
    "parameters": [
      {
        "name": "InstanceType\n",
        "value": "ecs.g6.large\n",
        "required": true,
        "type": "string\n"
      }
    ],
    "responses": {
      "responseBody": "-\n",
      "responseBodyFormat": "JSON\n"
    }
  },
  "requestId": "\t\n9BFC4AC1-6BE4-5405-BDEC-CA288D404812\n"
}错误码
| HTTP status code | 错误码 | 错误信息 | 描述 | 
|---|---|---|---|
| 400 | InvalidParam.LogRequestId | Please ensure that the request ID you provided originates from a request you made to a certain OpenAPI. | 参数logRequestId无效。你请确保您提供的请求ID源自您向某个OpenAPI发出的请求。 | 
| 404 | NotFound.RequestLog | The log related to this logRequestId does not exist, has expired, or you do not have permission to view it. | 与此logRequestId相关的日志不存在、已过期或您没有查看它的权限。 | 
访问错误中心查看更多错误码。
变更历史
更多信息,参考变更详情。