取得傳統型應用程式中錯誤的詳細資料Get details for an error in your desktop application

在 Microsoft Store 分析 API 中使用此方法,以取得 App 特定錯誤的 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.

使用這個方法之前,您必須先使用取得錯誤報告資料方法來擷取您要取得詳細資訊之錯誤的識別碼。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.
  • 取得您想要取得詳細資訊之錯誤的識別碼。Get the ID of the error for which you want to get detailed info. 若要取得此識別碼,請使用取得錯誤報告資料方法,並使用該方法回應內文中的 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 您想要擷取錯誤詳細資料的傳統型應用程式的產品識別碼值。The product ID of the desktop application for which you want to retrieve error details. 若要取得傳統型應用程式的產品識別碼,請 在合作夥伴中心 (中開啟桌面應用程式的任何分析報表 ,例如 健康情況報表) ,並從 URL 取出產品識別碼。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 您想要取得詳細資訊之錯誤的唯一識別碼。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 datedate 要擷取詳細錯誤資料之日期範圍的開始日期。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 datedate 要擷取詳細錯誤資料之日期範圍的結束日期。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. 篩選 參數中的字串值必須由單引號括住。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,市Here is an example orderby string: orderby=date,market

No

要求範例Request example

下列範例示範取得詳細錯誤資料的數個要求。The following examples demonstrate several requests for getting detailed error data. applicationId 值取代為您傳統型應用程式的產品識別碼。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 您已擷取錯誤詳細資料的傳統型應用程式的產品識別碼值。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 檔案的唯一識別碼雜湊。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 字串string 裝置市場的 ISO 3166 國家/地區碼。The ISO 3166 country code of the device market.
osBuildosBuild 字串string 發生錯誤之 OS 的組建編號。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 此字串指定錯誤發生時,App 正在執行的裝置機型。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 下列其中一個字串指定的 OS 版本或正式發行前小眾測試頻道 (為 OS 版本內的次群族) 上發生的錯誤。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 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:

  • Update 1Update 1

適用於 Windows 7:For Windows 7:

  • Service Pack 1Service Pack 1

如果 OS 版本或正式發行前小眾測試通道不明,此欄位會有不明值。If 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:

  • PcPC
  • ServerServer
  • UnknownUnknown
cabDownloadablecabDownloadable BooleanBoolean 指示 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
}