获取桌面应用程序中的错误的详细信息Get details for an error in your desktop application

使用 Microsoft Store 分析 API 中的此方法,可以 JSON 格式获取应用的特定错误的详细数据。Use this method in the Microsoft Store analytics API to get detailed data for a specific error for your app in JSON format. 此方法仅可以检索过去 30 天内发生的错误的详细信息。This method can only retrieve details for errors that occurred in the last 30 days. "合作伙伴中心" 中的桌面应用程序的 运行状况报告 中还提供了详细的错误数据。Detailed error data is also available in the Health report for desktop applications in Partner Center.

可以使用此方法之前,必须首先使用获取错误报告数据方法来检索希望获取详细信息的错误的 ID。Before you can use this method, you must first use the get error reporting data method to retrieve the ID of the error for which you want to get detailed info.

必备条件Prerequisites

若要使用此方法,首先需要执行以下操作:To use this method, you need to first do the following:

  • 完成 Microsoft Store 分析 API 的所有先决条件(如果尚未这样做)。If you have not done so already, complete all the prerequisites for the Microsoft Store analytics API.
  • 获取 Azure AD 访问令牌,以供在此方法的请求标头中使用。Obtain an Azure AD access token to use in the request header for this method. 获取访问令牌后,在它到期前,你有 60 分钟的使用时间。After you obtain an access token, you have 60 minutes to use it before it expires. 该令牌到期后,可以获取新的令牌。After the token expires, you can obtain a new one.
  • 获取希望获取详细信息的错误的 ID。Get the ID of the error for which you want to get detailed info. 若要获取此 ID,请使用获取错误报告数据方法,并使用该方法的响应正文中的 failureHash 值。To get this ID, use the get error reporting data method and use the failureHash value in the response body of that method.

请求Request

请求语法Request syntax

方法Method 请求 URIRequest URI
GETGET https://manage.devcenter.microsoft.com/v1.0/my/analytics/desktop/failuredetails

请求头Request header

标头Header 类型Type 描述Description
授权Authorization 字符串string 必需。Required. Azure AD 访问令牌的格式为 Bearer <token> 。The Azure AD access token in the form Bearer <token>.

请求参数Request parameters

参数Parameter 类型Type 描述Description 必需Required
applicationIdapplicationId 字符串string 要为其检索错误详细信息的桌面应用程序的产品 ID。The product ID of the desktop application for which you want to retrieve error details. 若要获取桌面应用程序的产品 ID,请在合作伙伴中心 ((例如运行状况报告中打开适用于桌面应用程序的分析报告,) 并从 URL 中检索产品 ID。To get the product ID of a desktop application, open any analytics report for your desktop application in Partner Center (such as the Health report) and retrieve the product ID from the URL. Yes
failureHashfailureHash 字符串string 你希望获取详细信息的错误的唯一 ID。The unique ID of the error for which you want to get detailed info. 若要获取感兴趣的错误的此值,请使用获取错误报告数据方法,并使用该方法的响应正文中的 failureHash 值。To get this value for the error you are interested in, use the get error reporting data method and use the failureHash value in the response body of that method. Yes
startDatestartDate 日期date 要检索的详细错误数据日期范围中的开始日期。The start date in the date range of detailed error data to retrieve. 默认值为当前日期之前 30 天。The default is 30 days before the current date.

注意:    此方法只能检索过去30天内发生的错误的详细信息。Note:  This method can only retrieve details for errors that occurred in the last 30 days.

No
endDateendDate 日期date 要检索的详细错误数据日期范围中的结束日期。The end date in the date range of detailed error data to retrieve. 默认值为当前日期。The default is the current date. No
toptop intint 要在请求中返回的数据行数。The number of rows of data to return in the request. 如果未指定,最大值和默认值为 10000。The maximum value and the default value if not specified is 10000. 当查询中存在多行数据时,响应正文中包含的下一个链接可用于请求下一页数据。If there are more rows in the query, the response body includes a next link that you can use to request the next page of data. No
skipskip intint 要在查询中跳过的行数。The number of rows to skip in the query. 使用此参数可以浏览较大的数据集。Use this parameter to page through large data sets. 例如,top=10 和 skip=0,将检索前 10 行数据;top=10 和 skip=10,将检索之后的 10 行数据,依此类推。For example, top=10 and skip=0 retrieves the first 10 rows of data, top=10 and skip=10 retrieves the next 10 rows of data, and so on. No
filterfilter 字符串string 在响应中筛选行的一条或多条语句。One or more statements that filter the rows in the response. 每条语句包含的响应正文中的字段名称和值使用 eqne 运算符进行关联,并且语句可以使用 andor 进行组合。Each statement contains a field name from the response body and value that are associated with the eq or ne operators, and statements can be combined using and or or. filter 参数中的字符串值必须使用单引号引起来。String values must be surrounded by single quotes in the filter parameter. 可以指定响应正文中的以下字段:You can specify the following fields from the response body:

  • 营销market
  • datedate
  • cabIdHashcabIdHash
  • cabExpirationTimecabExpirationTime
  • deviceTypedeviceType
  • deviceModeldeviceModel
  • osVersionosVersion
  • osReleaseosRelease
  • applicationVersionapplicationVersion
  • osBuildosBuild
  • 名字fileName
No
orderbyorderby 字符串string 对结果数据值进行排序的语句。A statement that orders the result data values. 语法为 orderby=field [order],field [order],...,其中 field 参数可以是以下字符串之一:The syntax is orderby=field [order],field [order],.... The field parameter can be one of the following strings:
  • 营销market
  • datedate
  • cabIdHashcabIdHash
  • cabExpirationTimecabExpirationTime
  • deviceTypedeviceType
  • deviceModeldeviceModel
  • osVersionosVersion
  • osReleaseosRelease
  • applicationVersionapplicationVersion
  • osBuildosBuild
  • 名字fileName

order 参数是可选的,可以是 ascdesc,用于指定每个字段的升序或降序排列。The order parameter is optional, and can be asc or desc to specify ascending or descending order for each field. 默认值为 ascThe default is asc.

下面是一个 orderby 字符串的示例:orderby=date,marketHere is an example orderby string: orderby=date,market

No

请求示例Request example

以下示例演示用于获取详细错误数据的多个请求。The following examples demonstrate several requests for getting detailed error data. applicationId 值替换为桌面应用程序的产品 ID。Replace the applicationId value with the product ID for your desktop application.

GET https://manage.devcenter.microsoft.com/v1.0/my/analytics/desktop/failuredetails?applicationId=10238467886765136388&failureHash=012e33e3-dbc9-b12f-c124-9d9810f05d8b&startDate=2016-11-05&endDate=2016-11-06&top=10&skip=0 HTTP/1.1
Authorization: Bearer <your access token>

GET https://manage.devcenter.microsoft.com/v1.0/my/analytics/desktop/failuredetails?applicationId=10238467886765136388&failureHash=012e33e3-dbc9-b12f-c124-9d9810f05d8b&startDate=2016-11-05&endDate=2016-11-06&top=10&skip=0&filter=market eq 'US' and deviceType eq 'PC' HTTP/1.1
Authorization: Bearer <your access token>

响应Response

响应正文Response body

Value 类型Type 说明Description
Value arrayarray 包含详细错误数据的对象数组。An array of objects that contain detailed error data. 有关每个对象中的数据的详细信息,请参阅以下错误详细信息值部分。For more information about the data in each object, see the error detail values section below.
@nextLink 字符串string 如果存在其他数据页,则此字符串包含一个你可用来请求下一页数据的 URI。If there are additional pages of data, this string contains a URI that you can use to request the next page of data. 例如,当请求的 top 参数设置为 10,但查询的错误超过 10 行时,就会返回此值。For example, this value is returned if the top parameter of the request is set to 10 but there are more than 10 rows of errors for the query.
TotalCountTotalCount integerinteger 查询的数据结果中的行总数。The total number of rows in the data result for the query.

错误详细信息值Error detail values

Value 数组中的元素包含以下值。Elements in the Value array contain the following values.

Value 类型Type 描述Description
applicationIdapplicationId 字符串string 要为其检索错误详细信息的桌面应用程序的产品 ID。The product ID of the desktop application for which you retrieved error details.
failureHashfailureHash 字符串string 错误的唯一标识符。The unique identifier for the error.
failureNamefailureName 字符串string 故障的名称,它由四个部分组成:一个或多个问题类、异常/错误检查代码、发生故障的映像的名称和相关的函数名称。The name of the failure, which is made up of four parts: one or more problem classes, an exception/bug check code, the name of the image where the failure occurred, and the associated function name.
datedate 字符串string 错误数据的日期范围内的第一个日期。The first date in the date range for the error data. 如果请求指定了某一天,此值就是该日期。If the request specified a single day, this value is that date. 如果请求指定了一周、月或其他日期范围,此值是该日期范围内的第一个日期。If the request specified a week, month, or other date range, this value is the first date in that date range.
cabIdHashcabIdHash 字符串string 与此错误相关联的 CAB 文件的唯一 ID 哈希。The unique ID hash of the CAB file that is associated with this error.
cabExpirationTimecabExpirationTime 字符串string CAB 文件已过期且不能再下载时的日期和时间,以 ISO 8601 格式表示。The date and time when the CAB file is expired and can no longer be downloaded, in ISO 8601 format.
marketmarket stringstring 设备市场的 ISO 3166 国家/地区代码。The ISO 3166 country code of the device market.
osBuildosBuild 字符串string 发生错误的操作系统的版本号。The build number of the OS on which the error occurred.
applicationVersionapplicationVersion 字符串string 发生错误的应用程序可执行文件的版本。The version of the application executable in which the error occurred.
deviceModeldeviceModel 字符串string 指定发生错误时,运行应用的设备型号的字符串。A string that specifies the model of the device on which the app was running when the error occurred.
osVersionosVersion 字符串string 用于指定在其上安装桌面应用程序的操作系统版本的以下字符串之一:One of the following strings that specifies the OS version on which the desktop application is installed:

  • Windows 7Windows 7
  • Windows 8.1Windows 8.1
  • Windows 10Windows 10
  • Windows Server 2016Windows Server 2016
  • Windows Server 1709Windows Server 1709
  • UnknownUnknown
osReleaseosRelease 字符串string 用于指定发生了错误的操作系统版本或外部测试 Ring(作为操作系统版本内的亚组)的以下字符串之一。One of the following strings that specifies the OS release or flighting ring (as a subpopulation within OS version) on which the error occurred.

对于 Windows 10:For Windows 10:

  • 版本1507Version 1507
  • 版本1511Version 1511
  • 版本1607Version 1607
  • 版本1703Version 1703
  • 版本1709Version 1709
  • 版本1803Version 1803
  • Release PreviewRelease Preview
  • 预览体验成员 - 快Insider Fast
  • 预览体验成员 - 慢Insider Slow

对于 Windows Server 1709:For Windows Server 1709:

  • RTMRTM

对于 Windows Server 2016:For Windows Server 2016:

  • 版本1607Version 1607

对于 Windows 8.1:For Windows 8.1:

  • 更新 1Update 1

对于 Windows 7:For Windows 7:

  • Service Pack 1Service Pack 1

如果操作系统版本或外部测试 Ring 未知,则此字段的值为 UnknownIf the OS release or flighting ring is unknown, this field has the value Unknown.

deviceTypedeviceType 字符串string 用于指示发生了错误的设备类型的以下字符串之一:One of the following strings that indicates the type of device on which the error occurred:

  • 计算机PC
  • ServerServer
  • UnknownUnknown
cabDownloadablecabDownloadable 布尔Boolean 指示是否可为此用户下载 CAB 文件。Indicates whether the CAB file is downloadable for this user.
fileNamefileName 字符串string 为其检索错误详细信息的桌面应用程序的可执行文件名称。The name of the executable file for the desktop application for which you retrieved error details.

响应示例Response example

以下示例举例说明此请求的 JSON 响应正文。The following example demonstrates an example JSON response body for this request.

{
  "Value": [
    {
      "applicationId": "10238467886765136388",
      "failureHash": "012345-5dbc9-b12f-c124-9d9810f05d8b",
      "failureName": "NULL_CLASS_PTR_WRITE_c0000005_contoso.exe!unknown_error_in_process",
      "date": "2018-01-28 23:55:29",
      "cabIdHash": "54ffb83a-e159-41d2-8158-f36f306cc01e",
      "cabExpirationTime": "2018-02-27 23:55:29",
      "market": "US",
      "osBuild": "10.0.10240",
      "applicationVersion": "2.2.2.0",
      "deviceModel": "Contoso All-in-one",
      "osVersion": "Windows 10",
      "osRelease": "Version 1703",
      "deviceType": "PC",
      "cabDownloadable": false,
      "fileName": "contosodemo.exe"
    }
  ],
  "@nextLink": null,
  "TotalCount": 1
}