更新软件包外部测试版提交Update a package flight submission

在 Microsoft Store 提交 API 中使用此方法,更新现有软件包外部测试版提交。Use this method in the Microsoft Store submission API to update an existing package flight submission. 使用此方法成功更新提交后,必须确认提交才可以实现引入和发布。After you successfully update a submission by using this method, you must commit the submission for ingestion and publishing.

有关此方法如何适用通过使用 Microsoft Store 提交 API 创建软件包外部测试版提交过程的详细信息,请参阅管理软件包外部测试版提交For more information about how this method fits into the process of creating a package flight submission by using the Microsoft Store submission API, see Manage package flight submissions.

必备条件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.
  • 为某个应用创建包航班提交。Create a package flight submission for one of your apps. 可以在合作伙伴中心执行此操作,也可以通过使用 创建包航班提交 方法来执行此操作。You can do this in Partner Center, or you can do this by using the create a package flight submission method.

请求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
PUTPUT https://manage.devcenter.microsoft.com/v1.0/my/applications/{applicationId}/flights/{flightId}/submissions/{submissionId}

请求头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 for which you want to update a package flight submission. 有关应用商店 ID 的详细信息,请参阅查看应用标识详细信息For more information about the Store ID, see View app identity details.
flightIdflightId 字符串string 必需。Required. 要更新提交的软件包外部测试版的 ID。The ID of the package flight for which you want to update a submission. 创建软件包外部测试版获取应用的软件包外部测试版请求的响应数据中包含此 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.
submissionIdsubmissionId 字符串string 必需。Required. 要更新的提交的 ID。The ID of the submission to update. 此 ID 包含在创建软件包外部测试版提交请求的响应数据中。This ID is available in the response data for requests to create a package flight submission. 对于在合作伙伴中心创建的提交,此 ID 还可用于合作伙伴中心中的提交页的 URL。For a submission that was created in Partner Center, this ID is also available in the URL for the submission page in Partner Center.

请求正文Request body

请求正文具有以下参数。The request body has the following parameters.

Value 类型Type 描述Description
flightPackagesflightPackages arrayarray 包含提供提交中关于每个程序包详细信息的对象。Contains objects that provide details about each package in the submission. 有关响应正文中这些值的更多详细信息,请参阅外部测试版软件包资源For more details about the values in the response body, see Flight package resource. 调用此方法更新应用提交时,请求正文中仅需要这些对象的 fileNamefileStatusminimumDirectXVersionminimumSystemRam 值。When calling this method to update an app submission, only the fileName, fileStatus, minimumDirectXVersion, and minimumSystemRam values of these objects are required in the request body. 其他值由合作伙伴中心填充。The other values are populated by Partner Center.
packageDeliveryOptionspackageDeliveryOptions 对象 (object)object 包含提交的逐步软件包推出和强制更新设置。Contains gradual package rollout and mandatory update settings for the submission. 有关详细信息,请参阅软件包传递选项对象部分。For more information, see Package delivery options object.
targetPublishModetargetPublishMode 字符串string 提交的发布模式。The publish mode for the submission. 这可以是以下值之一:This can be one of the following values:
  • 即时Immediate
  • 手动Manual
  • SpecificDateSpecificDate
targetPublishDatetargetPublishDate 字符串string 提交的发布日期采用 ISO 8601 格式(如果 targetPublishMode 设为“SpecificDate”)。The publish date for the submission in ISO 8601 format, if the targetPublishMode is set to SpecificDate.
notesForCertificationnotesForCertification 字符串string 提供认证测试人员的其他信息,例如测试帐户凭据以及访问和验证功能的步骤。Provides additional info for the certification testers, such as test account credentials and steps to access and verify features. 有关详细信息,请参阅认证说明For more information, see Notes for certification.

请求示例Request example

以下示例演示如何为应用更新软件包外部测试版提交。The following example demonstrates how to update a package flight submission for an app.

PUT https://manage.devcenter.microsoft.com/v1.0/my/applications/9NBLGGH4R315/flights/43e448df-97c9-4a43-a0bc-2a445e736bcd/submissions/1152921504621243649 HTTP/1.1
Authorization: Bearer <your access token>
Content-Type: application/json
{
  "flightPackages": [
    {
      "fileName": "newPackage.appx",
      "fileStatus": "PendingUpload",
      "minimumDirectXVersion": "None",
      "minimumSystemRam": "None"
    }
  ],
  "packageDeliveryOptions": {
    "packageRollout": {
        "isPackageRollout": false,
        "packageRolloutPercentage": 0.0,
        "packageRolloutStatus": "PackageRolloutNotStarted",
        "fallbackSubmissionId": "0"
    },
    "isMandatoryUpdate": false,
    "mandatoryUpdateEffectiveDate": "1601-01-01T00:00:00.0000000Z"
  },
  "targetPublishMode": "Immediate",
  "targetPublishDate": "",
  "notesForCertification": "No special steps are required for certification of this app."
}

响应Response

以下示例演示了成功调用此方法的 JSON 响应正文。The following example demonstrates the JSON response body for a successful call to this method. 该响应正文包含已更新提交的相关信息。The response body contains information about the updated submission. 有关响应正文中这些值的更多详细信息,请参阅软件包外部测试版提交资源For more details about the values in the response body, see Package flight submission resource.

{
  "id": "1152921504621243649",
  "flightId": "cd2e368a-0da5-4026-9f34-0e7934bc6f23",
  "status": "PendingCommit",
  "statusDetails": {
    "errors": [],
    "warnings": [],
    "certificationReports": []
  },
  "flightPackages": [
    {
      "fileName": "newPackage.appx",
      "fileStatus": "PendingUpload",
      "id": "",
      "version": "1.0.0.0",
      "languages": ["en-us"],
      "capabilities": [],
      "minimumDirectXVersion": "None",
      "minimumSystemRam": "None"
    }
  ],
  "packageDeliveryOptions": {
    "packageRollout": {
        "isPackageRollout": false,
        "packageRolloutPercentage": 0.0,
        "packageRolloutStatus": "PackageRolloutNotStarted",
        "fallbackSubmissionId": "0"
    },
    "isMandatoryUpdate": false,
    "mandatoryUpdateEffectiveDate": "1601-01-01T00:00:00.0000000Z"
  },
  "fileUploadUrl": "https://productingestionbin1.blob.core.windows.net/ingestion/8b389577-5d5e-4cbe-a744-1ff2e97a9eb8?sv=2014-02-14&sr=b&sig=wgMCQPjPDkuuxNLkeG35rfHaMToebCxBNMPw7WABdXU%3D&se=2016-06-17T21:29:44Z&sp=rwl",
  "targetPublishMode": "Immediate",
  "targetPublishDate": "",
  "notesForCertification": "No special steps are required for certification of this 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
400400 由于请求无效,无法更新软件包外部测试版提交。The package flight submission could not be updated because the request is invalid.
409409 由于应用的当前状态,无法更新包航班提交,或者该应用使用的合作伙伴中心功能 当前不受 Microsoft Store 提交 API 支持The package flight submission could not be updated because of the current state of the app, or the app uses a Partner Center feature that is currently not supported by the Microsoft Store submission API.