获取软件包外部测试版Get a package flight

在 Microsoft Store 提交 API 中使用此方法为注册到合作伙伴中心帐户的应用获取包航班数据。Use this method in the Microsoft Store submission API to get data for a package flight for an app that is registered to your Partner Center account.

必备条件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}/flights/{flightId}

请求头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
applicationIdapplicationId 字符串string 必需。Required. 应用(包含要获取的软件包外部测试版)的应用商店 ID。The Store ID of the app that contains the package flight you want to get. 应用的存储 ID 在合作伙伴中心可用。The Store ID for the app is available in Partner Center.
flightIdflightId 字符串string 必需。Required. 要获取的软件包外部测试版的 ID。The ID of the package flight to get. 创建软件包外部测试版获取应用的软件包外部测试版请求的响应数据中包含此 ID。This ID is available in the response data for requests to create a package flight and get package flights for an app. 对于在合作伙伴中心创建的航班,还可以在合作伙伴中心的 "航班" 页的 URL 中使用此 ID。For a flight that was created in Partner Center, this ID is also available in the URL for the flight page in Partner Center.

请求正文Request body

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

请求示例Request example

以下示例演示如何检索有关应用商店 ID 值为 9WZDNCRD91MD 的应用的软件包外部测试版(ID 为 43e448df-97c9-4a43-a0bc-2a445e736bcd)的信息。The following example demonstrates how to retrieve information about a package flight with the ID 43e448df-97c9-4a43-a0bc-2a445e736bcd for an app with the Store ID value 9WZDNCRD91MD.

GET https://manage.devcenter.microsoft.com/v1.0/my/applications/9NBLGGH4R315/flights/43e448df-97c9-4a43-a0bc-2a445e736bcd HTTP/1.1
Authorization: Bearer <your access token>

响应Response

以下示例演示了成功调用此方法的 JSON 响应正文。The following example demonstrates the JSON response body for a successful call to this method. 有关响应正文中这些值的更多详细信息,请参阅以下部分。For more details about the values in the response body, see the following sections.

{
  "flightId": "43e448df-97c9-4a43-a0bc-2a445e736bcd",
  "friendlyName": "myflight",
  "lastPublishedFlightSubmission": {
    "id": "1152921504621086517",
    "resourceLocation": "flights/43e448df-97c9-4a43-a0bc-2a445e736bcd/submissions/1152921504621086517"
  },
  "pendingFlightSubmission": {
    "id": "115292150462124364",
    "resourceLocation": "flights/43e448df-97c9-4a43-a0bc-2a445e736bcd/submissions/1152921504621243647"
  },
  "groupIds": [
    "0"
  ],
  "rankHigherThan": "671c2857-725e-4faf-9e9e-ea1191ef879c"
}

响应正文Response body

Value 类型Type 描述Description
flightIdflightId 字符串string 软件包外部测试版的 ID。The ID for the package flight. 此值由合作伙伴中心提供。This value is supplied by Partner Center.
friendlyNamefriendlyName 字符串string 软件包外部测试版的名称,如开发人员所指定。The name of the package flight, as specified by the developer.
lastPublishedFlightSubmissionlastPublishedFlightSubmission 对象 (object)object 提供有关软件包外部测试版的上次发布提交的信息的对象。An object that provides information about the last published submission for the package flight. 有关详细信息,请参阅下面的提交对象部分。For more information, see the Submission object section below.
pendingFlightSubmissionpendingFlightSubmission 对象 (object)object 提供有关软件包外部测试版的当前挂起提交的信息的对象。An object that provides information about the current pending submission for the package flight. 有关详细信息,请参阅下面的提交对象部分。For more information, see the Submission object section below.
groupIdsgroupIds arrayarray 包含与软件包外部测试版关联的外部测试版组 ID 的字符串数组。An array of strings that contain the IDs of the flight groups that are associated with the package flight. 有关外部测试版组的详细信息,请参阅软件包外部测试版For more information about flight groups, see Package flights.
rankHigherThanrankHigherThan 字符串string 排名紧跟在当前软件包外部测试版之后的软件包外部测试版的友好名称。The friendly name of the package flight that is ranked immediately lower than the current package flight. 有关排名的外部测试版组的详细信息,请参阅 软件包外部测试版For more information about ranking flight groups, see Package flights.

提交对象Submission object

响应正文中的 lastPublishedFlightSubmissionpendingFlightSubmission 值包含提供有关软件包外部测试版提交的资源信息的对象。The lastPublishedFlightSubmission and pendingFlightSubmission values in the response body contain objects that provide resource information about a submission for the package flight. 这些对象具有以下值。These objects have the following values.

Value 类型Type 说明Description
idid 字符串string 提交的 ID。The ID of the submission.
resourceLocationresourceLocation 字符串string 可追加到基本 https://manage.devcenter.microsoft.com/v1.0/my/ 请求 URI 的相对路径,用于检索提交的完整数据。A relative path that you can append to the base https://manage.devcenter.microsoft.com/v1.0/my/ request URI to retrieve the complete data for the submission.

错误代码Error codes

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

错误代码Error code 说明Description
400400 请求无效。The request is invalid.
404404 找不到指定的软件包外部测试版。The specified package flight could not be found.
409409 此应用使用的合作伙伴中心功能 当前不受 Microsoft Store 提交 API 支持The app uses a Partner Center feature that is currently not supported by the Microsoft Store submission API.