Düzenle

Aracılığıyla paylaş


Get error reporting data for your app

Use this method in the Microsoft Store analytics API to get aggregate error reporting data for your app in JSON format for a given date range and other optional filters. This method can only retrieve errors that occurred in the last 30 days. This information is also available in the Failures section of the Health report in Partner Center.

You can retrieve additional error information by using the get error details, get stack trace, and download CAB file methods.

Prerequisites

To use this method, you need to first do the following:

  • If you have not done so already, complete all the prerequisites for the Microsoft Store analytics API.
  • Obtain an Azure AD access token to use in the request header for this method. 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.

Request

Request syntax

Method Request URI
GET https://manage.devcenter.microsoft.com/v1.0/my/analytics/failurehits

Request header

Header Type Description
Authorization string Required. The Azure AD access token in the form Bearer <token>.

Request parameters

Parameter Type Description Required
applicationId string The Store ID of the app for which you want to retrieve error reporting data. The Store ID is available on the App identity page in Partner Center. An example Store ID is 9WZDNCRFJ3Q8. Yes
startDate date The start date in the date range of error reporting data to retrieve. The default is the current date. If aggregationLevel is day, week, or month, this parameter should specify a date in the format mm/dd/yyyy. If aggregationLevel is hour, this parameter can specify a date in the format mm/dd/yyyy or a date and time in the format yyyy-mm-dd hh:mm:ss.

Note:  This method can only retrieve errors that occurred in the last 30 days.
No
endDate date The end date in the date range of error reporting data to retrieve. The default is the current date. If aggregationLevel is day, week, or month, this parameter should specify a date in the format mm/dd/yyyy. If aggregationLevel is hour, this parameter can specify a date in the format mm/dd/yyyy or a date and time in the format yyyy-mm-dd hh:mm:ss. No
top int The number of rows of data to return in the request. 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
skip int The number of rows to skip in the query. Use this parameter to page through large data sets. For example, top=10000 and skip=0 retrieves the first 10000 rows of data, top=10000 and skip=10000 retrieves the next 10000 rows of data, and so on. No
filter string One or more statements that filter the rows in the response. 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:

  • applicationName
  • failureName
  • failureHash
  • symbol
  • osVersion
  • osRelease
  • eventType
  • market
  • deviceType
  • packageName
  • packageVersion
  • date
No
aggregationLevel string Specifies the time range for which to retrieve aggregate data. Can be one of the following strings: hour, day, week, or month. If unspecified, the default is day. If you specify week or month, the failureName and failureHash values are limited to 1000 buckets.

Note:  If you specify hour, you can retrieve error data only from the previous 72 hours. To retrieve error data older than 72 hours, specify day or one of the other aggregation levels.
No
orderby string A statement that orders the result data values. The syntax is orderby=field [order],field [order],.... The field parameter can be one of the following strings:
  • applicationName
  • failureName
  • failureHash
  • symbol
  • osVersion
  • osRelease
  • eventType
  • market
  • deviceType
  • packageName
  • packageVersion
  • date

The order parameter is optional, and can be asc or desc to specify ascending or descending order for each field. The default is asc.

Here is an example orderby string: orderby=date,market

No
groupby string A statement that applies data aggregation only to the specified fields. You can specify the following fields:
  • failureName
  • failureHash
  • symbol
  • osVersion
  • eventType
  • market
  • deviceType
  • packageName
  • packageVersion

The returned data rows will contain the fields specified in the groupby parameter as well as the following:

  • date
  • applicationId
  • applicationName
  • deviceCount
  • eventCount

The groupby parameter can be used with the aggregationLevel parameter. For example: &groupby=failureName,market&aggregationLevel=week

No

Request example

The following examples demonstrate several requests for getting error reporting data. Replace the applicationId value with the Store ID for your app.

GET https://manage.devcenter.microsoft.com/v1.0/my/analytics/failurehits?applicationId=9NBLGGGZ5QDR&startDate=1/1/2015&endDate=2/1/2015&top=10&skip=0 HTTP/1.1
Authorization: Bearer <your access token>

GET https://manage.devcenter.microsoft.com/v1.0/my/analytics/failurehits?applicationId=9NBLGGGZ5QDR&startDate=8/1/2015&endDate=8/31/2015&skip=0&filter=market eq 'US' and deviceType eq 'phone' HTTP/1.1
Authorization: Bearer <your access token>

Response

Response body

Value Type Description
Value array An array of objects that contain aggregate error reporting data. For more information about the data in each object, see the error values section below.
@nextLink string If there are additional pages of data, this string contains a URI that you can use to request the next page of data. For example, this value is returned if the top parameter of the request is set to 10000 but there are more than 10000 rows of errors for the query.
TotalCount integer The total number of rows in the data result for the query.

Error values

Elements in the Value array contain the following values.

Value Type Description
date string The first date in the date range for the error data, in the format yyyy-mm-dd. If the request specifies a single day, this value is that date. If the request specifies a longer date range, this value is the first date in that date range. For requests that specify an aggregationLevel value of hour, this value also includes a time value in the format hh:mm:ss.
applicationId string The Store ID of the app for which you want to retrieve error data.
applicationName string The display name of the app.
failureName 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.
failureHash string The unique identifier for the error.
symbol string The symbol assigned to this error.
osVersion string One of the following strings that specifies the OS version on which the error occurred:
  • Windows Phone 7.5
  • Windows Phone 8
  • Windows Phone 8.1
  • Windows Phone 10
  • Windows 8
  • Windows 8.1
  • Windows 10
  • Windows 11
  • Unknown
osRelease string One of the following strings that specifies the OS release or flighting ring (as a subpopulation within OS version) on which the error occurred.

For Windows 11: Version 2110

For Windows 10:

  • Version 1507
  • Version 1511
  • Version 1607
  • Version 1703
  • Version 1709
  • Version 1803
  • Release Preview
  • Insider Fast
  • Insider Slow

For Windows Server 1709:

  • RTM

For Windows Server 2016:

  • Version 1607

For Windows 8.1:

  • Update 1

For Windows 7:

  • Service Pack 1

If the OS release or flighting ring is unknown, this field has the value Unknown.

eventType string One of the following strings:
  • crash
  • hang
  • memory
  • jse
market string The ISO 3166 country code of the device market.
deviceType string One of the following strings that indicates the type of device on which the error occurred:
  • PC
  • Phone
  • Console-Xbox One
  • Console-Xbox Series X
  • IoT
  • Holographic
  • Unknown
packageName string The unique name of the app package that is associated with this error.
packageVersion string The version of the app package that is associated with this error.
deviceCount number The number of unique devices that correspond to this error for the specified aggregation level.
eventCount number The number of events that are attributed to this error for the specified aggregation level.

Note

This method can only retrieve errors that occurred in the last 30 days.

Request and Response example

The following code snippet demonstrates an example request and JSON response body for those request.

Sample Request

GET https://manage.devcenter.microsoft.com/v1.0/my/analytics/failurehits?applicationId=9NBLGGGZ5QDR&startDate=07/02/2022&endDate=07/20/2022&top=10&skip=0&filter=market eq 'US'&groupby=failureName,failureHash,symbol,osVersion,eventType,market,deviceType,packageName,packageVersion,osRelease&orderby=date
HTTP/1.1
Authorization: Bearer <your access token>

Sample Response

{
    "Value": [
        {
            "date": "2022-07-21",
            "applicationId": "9NBLGGGZ5QDR",
            "applicationName": "Contoso Demo",
            "failureName": "APPLICATION_HANG_BlockedOn_FileIO_Microsoft.Contoso Demo!CEServices.InternalLiveTileUpdaterRuntime_dfffffff_Microsoft.Contoso Demo!unknown_error_in_application",
            "failureHash": "c21da75f-ea4d-538b-cfec-73654ef810b9",
            "symbol": "Microsoft.Contoso Demo!unknown_error_in_application",
            "osVersion": "6.3.9600",
            "osRelease": "RTM",
            "osArchitecture": null,
            "eventType": "hang",
            "market": "US",
            "deviceType": "PC",
            "praid": null,
            "packageName": "microsoft.Contoso Demo_2.5.2.34894_x86__8wekyb3d8bbwe",
            "packageVersion": "2.5.2.34894",
            "ram": null,
            "massStorage": null,
            "cpu": null,
            "cpuManufacturer": null,
            "cpuFamilyName": null,
            "sandboxId": null,
            "deviceCount": 6.0,
            "eventCount": 1.05263157894737
        },
        {
            "date": "2022-07-21",
            "applicationId": "9NBLGGGZ5QDR",
            "applicationName": "Contoso Demo",
            "failureName": "APPLICATION_HANG_BlockedOn_FileIO_Microsoft.Contoso Demo!CEServices.InternalLiveTileUpdaterRuntime_dfffffff_Microsoft.Contoso Demo!unknown_error_in_application",
            "failureHash": "c21da75f-ea4d-538b-cfec-73654ef810b9",
            "symbol": "Microsoft.Contoso Demo!unknown_error_in_application",
            "osVersion": "6.3.9600",
            "osRelease": "RTM",
            "osArchitecture": null,
            "eventType": "hang",
            "market": "US",
            "deviceType": "Unknown",
            "praid": null,
            "packageName": "microsoft.Contoso Demo_2.5.2.34894_x86__8wekyb3d8bbwe",
            "packageVersion": "2.5.2.34894",
            "ram": null,
            "massStorage": null,
            "cpu": null,
            "cpuManufacturer": null,
            "cpuFamilyName": null,
            "sandboxId": null,
            "deviceCount": 7.14285714285714,
            "eventCount": 1.05263157894737
        },
        {
            "date": "2022-07-21",
            "applicationId": "9NBLGGGZ5QDR",
            "applicationName": "Contoso Demo",
            "failureName": "APPLICATION_HANG_Microsoft.Contoso Demo!CEServices.InternalLiveTileUpdaterRuntime_dfffffff_twinapi.appcore.dll!WaitCoalesced",
            "failureHash": "233e04bb-7a3d-eb28-c316-1120aa9defc0",
            "symbol": "twinapi.appcore.dll!WaitCoalesced",
            "osVersion": "6.3.9600",
            "osRelease": "RTM",
            "osArchitecture": null,
            "eventType": "hang",
            "market": "US",
            "deviceType": "PC",
            "praid": null,
            "packageName": "microsoft.Contoso Demo_2.5.2.34894_x86__8wekyb3d8bbwe",
            "packageVersion": "2.5.2.34894",
            "ram": null,
            "massStorage": null,
            "cpu": null,
            "cpuManufacturer": null,
            "cpuFamilyName": null,
            "sandboxId": null,
            "deviceCount": 6.0,
            "eventCount": 8.94736842105263
        }
    ],
    "@nextLink": "failurehits?applicationId=9NBLGGGZ5QDR&aggregationLevel=day&startDate=2022/07/02&endDate=2022/07/21&top=10&skip=10&groupby=failureName,failureHash,symbol,osVersion,eventType,market,deviceType,packageName,packageVersion,osRelease&filter=market eq 'US'&orderby=date",
    "TotalCount": 443
}