终止应用提交的推出Halt the rollout for an app submission

在 Microsoft Store 提交 API 中使用此方法可暂停应用程序提交的 包推出Use this method in the Microsoft Store submission API to halt the package rollout for an app submission. 有关通过使用 Microsoft Store 提交 API 创建应用提交过程的详细信息,请参阅管理应用提交For more information about the process of process of creating an app submission by using the Microsoft Store submission API, see Manage app submissions.

备注

如果终止应用提交的推出,然后创建新的应用提交,则新提交将是已终止提交的克隆。If you halt the rollout for an app submission and then create a new app submission, the new submission is a clone of the halted submission.

必备条件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 submission for one of your apps. 可以在合作伙伴中心执行此操作,也可以使用 创建应用提交 方法来执行此操作。You can do this in Partner Center, or you can do this by using the create an app submission method.
  • 启用提交的逐步软件包推出。Enable a gradual package rollout for the submission. 可以 在合作伙伴中心执行此操作,也可以通过 使用 Microsoft Store 提交 API来实现此目的。You can do this in Partner Center, or you can do this by using the Microsoft Store submission API.

请求Request

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

方法Method 请求 URIRequest URI
POSTPOST https://manage.devcenter.microsoft.com/v1.0/my/applications/{applicationId}/submissions/{submissionId}/haltpackagerollout

请求头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 submission with the package rollout you want to halt. 有关应用商店 ID 的详细信息,请参阅查看应用标识详细信息For more information about the Store ID, see View app identity details.
submissionIdsubmissionId 字符串string 必需。Required. 要终止软件包推出的提交的 ID。The ID of the submission with the package rollout you want to halt. 此 ID 包含在创建应用提交请求的响应数据中。This ID is available in the response data for requests to create an app 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

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

请求示例Request example

以下示例演示了如何终止应用提交的软件包推出。The following example demonstrates how to halt the package rollout for an app submission.

POST https://manage.devcenter.microsoft.com/v1.0/my/applications/9NBLGGH4R315/submissions/1152921504621243680/haltpackagerollout 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 Package rollout resource.

{
    "isPackageRollout": true,
    "packageRolloutPercentage": 0.0,
    "packageRolloutStatus": "PackageRolloutStopped",
    "fallbackSubmissionId": "1212922684621243058"
}

错误代码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 找不到提交。The submission could not be found.
409409 此代码指示以下错误之一:This code indicates one of the following errors: