获取应用的软件包外部测试版Get package flights for an app

在 Microsoft Store 提交 API 中使用此方法列出注册到合作伙伴中心帐户的应用的包航班。Use this method in the Microsoft Store submission API to list the package flights for an app that is registered to your Partner Center account. 有关软件包外部测试版的详细信息,请参阅软件包外部测试版For more information about package flights, see Package flights.

必备条件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 submission 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.

请求Request

此方法具有以下语法。This method has the following syntax. 请参阅以下部分,获取标头和请求正文的使用示例和描述。See the following sections for usage examples and descriptions of the header and request body.

方法Method 请求 URIRequest URI
GETGET https://manage.devcenter.microsoft.com/v1.0/my/applications/{applicationId}/listflights

请求头Request header

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

请求参数Request parameters

名称Name 类型Type 描述Description 必需Required
applicationIdapplicationId 字符串string 要检索软件包外部测试版的应用的应用商店 ID。The Store ID of the app for which you want to retrieve the package flights. 有关应用商店 ID 的详细信息,请参阅查看应用标识详细信息For more information about the Store ID, see View app identity details. Yes
toptop intint 要在请求中返回的项数(即,要返回的软件包外部测试版数)。The number of items to return in the request (that is, the number of package flights to return). 如果你的帐户具有的软件包外部测试版超过在查询中指定的值,响应正文将包括可追加到方法 URI 的相对 URI 路径,用于请求下一页数据。If your account has more package flights than the value you specify in the query, the response body includes a relative URI path that you can append to the method URI to request the next page of data. No
skipskip intint 返回剩余项之前,在查询中绕过的项数。The number of items to bypass in the query before returning the remaining items. 使用此参数分页浏览数据集。Use this parameter to page through data sets. 例如,top=10 和 skip=0 可检索项目 1 到 10,top=10 和 skip=10 可检索项目 11 到 20,依此类推。For example, top=10 and skip=0 retrieves items 1 through 10, top=10 and skip=10 retrieves items 11 through 20, and so on. No

请求正文Request body

请勿为此方法提供请求正文。Do not provide a request body for this method.

请求示例Request examples

以下示例演示了如何为应用列出所有软件包外部测试版。The following example demonstrates how to list all the package flights for an app.

GET https://manage.devcenter.microsoft.com/v1.0/my/applications/9NBLGGH4R315/listflights HTTP/1.1
Authorization: Bearer <your access token>

以下示例演示了如何为应用列出第一个软件包外部测试版。The following example demonstrates how to list the first package flight for an app.

GET https://manage.devcenter.microsoft.com/v1.0/my/applications/9NBLGGH4R315/listflights?top=1 HTTP/1.1
Authorization: Bearer <your access token>

响应Response

以下示例演示了成功请求应用的第一个软件包外部测试版(共三个软件包外部测试版)返回的 JSON 响应正文。The following example demonstrates the JSON response body returned by a successful request for the first package flight for an app with three total package flights. 有关响应正文中这些值的详细信息,请参阅以下部分。For more details about the values in the response body, see the following section.

{
  "value": [
    {
      "flightId": "7bfc11d5-f710-47c5-8a98-e04bb5aad310",
      "friendlyName": "myflight",
      "lastPublishedFlightSubmission": {
        "id": "1152921504621086517",
        "resourceLocation": "flights/7bfc11d5-f710-47c5-8a98-e04bb5aad310/submissions/1152921504621086517"
      },
      "pendingFlightSubmission": {
        "id": "1152921504621215786",
        "resourceLocation": "flights/7bfc11d5-f710-47c5-8a98-e04bb5aad310/submissions/1152921504621215786"
      },
      "groupIds": [
        "1152921504606962205"
      ],
      "rankHigherThan": "Non-flighted submission"
    }
  ],
  "totalCount": 3
}

响应正文Response body

Value 类型Type 说明Description
@nextLink 字符串string 如果存在数据的其他页,此字符串中包含可附加到基本 https://manage.devcenter.microsoft.com/v1.0/my/ 请求 URI 的相对路径,用于请求下一页数据。If there are additional pages of data, this string contains a relative path that you can append to the base https://manage.devcenter.microsoft.com/v1.0/my/ request URI to request the next page of data. 例如,如果初始请求正文的 top 参数设置为 2,但应用中有 4 个软件包外部测试版,响应正文将包含 applications/{applicationid}/listflights/?skip=2&top=2 的 @nextLink 值,指示你可以调用 https://manage.devcenter.microsoft.com/v1.0/my/applications/{applicationid}/listflights/?skip=2&top=2 请求接下来的 2 个软件包外部测试版。For example, if the top parameter of the initial request body is set to 2 but there are 4 package flights for the app, the response body will include a @nextLink value of applications/{applicationid}/listflights/?skip=2&top=2, which indicates that you can call https://manage.devcenter.microsoft.com/v1.0/my/applications/{applicationid}/listflights/?skip=2&top=2 to request the next 2 package flights.
valuevalue 数组array 为指定的应用提供软件包外部测试版相关信息的对象数组。An array of objects that provide information about package flights for the specified app. 有关每个对象中的数据的详细信息,请参阅外部测试版资源For more information about the data in each object, see Flight resource.
totalCounttotalCount intint 查询的数据结果中的行总数(即,指定应用的软件包外部测试版的总数)。The total number of rows in the data result for the query (that is, the total number of package flights for the specified app).

错误代码Error codes

如果无法成功完成请求,该响应中会包含以下 HTTP 错误代码之一。If the request cannot be successfully completed, the response will contain one of the following HTTP error codes.

错误代码Error code 说明Description
404404 找不到任何软件包外部测试版。No package flights were found.
409409 此应用使用的合作伙伴中心功能 当前不受 Microsoft Store 提交 API 支持The app uses a Partner Center feature that is currently not supported by the Microsoft Store submission API.