取得應用程式套件正式發行前小眾測試版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 您想要擷取其套件正式發行前小眾測試版之 App 的「Store 識別碼」。The Store ID of the app for which you want to retrieve the package flights. 如需有關 Store 識別碼的詳細資訊,請參閱檢視 App 身分識別詳細資料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 bodyRequest body

不提供此方法的要求主體。Do not provide a request body for this method.

要求範例Request examples

下列範例示範如何列出 App 的所有套件正式發行前小眾測試版。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>

下列範例示範如何列出 App 的第一個套件正式發行前小眾測試版。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

下列範例說明針對含有總共 3 個套件正式發行前小眾測試版的 App 成功要求第一個套件正式發行前小眾測試版所傳回的 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,但是 App 有 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 arrayarray 提供指定 App 之套件正式發行前小眾測試版相關資訊的物件陣列。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 查詢的資料結果中的列數總計 (也就是指定 App 的套件正式發行前小眾測試版總數目)。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.