部署部署草稿

发布 /groups/{groupId}/apps/{appId}/drafts/{draftId}/deployment

部署指定的应用程序部署草稿。

路径参数

application/json

body

  • 名称 字符串 必需

    部署的名称。若要部署不带名称的草稿,请使用空字符串。

响应

  • 201 application/json

    草稿已成功部署。

    隐藏响应属性 显示响应属性 对象
    • _id 字符串

      部署的唯一ID 。

    • 名称 字符串

      部署的名称。默认下,该值与 _id 的值相同。

    • app_id 字符串

      Atlas App Services App 的唯一 _id 值。

    • Draft_id 字符串

      与部署关联的部署草稿的唯一 _id 值(如果适用)。

    • user_id 字符串

      部署草稿的MongoDB Cloud 用户的唯一 _id 值。

    • 已部署_at 整型

      进行部署的时间。表示为自 1 1 月 1970 以来的秒数。

    • 来源 字符串

      用于创建部署的部署方法。

    • 提交 字符串

      部署的提交哈希( Github自动部署)

    • 状态 字符串

      指示部署是否成功的消息。

    • status_error_message 字符串

      导致部署失败的错误的错误消息(如果适用)。

    • diff_url 字符串

      部署中更改差异的链接

    • remote_location 字符串

      应用服务器物理部署位置的标识符,与托管应用的云提供商无关。

      取值为 US-VAUS-ORDE-FFIEAUIN-MBSGBR-SP

POST /groups/{groupId}/apps/{appId}/drafts/{draftId}/ 部署
curl \
 --request POST 'https://services.cloud.mongodb.com/api/admin/v3.0/groups/{groupId}/apps/{appId}/drafts/{draftId}/deployment' \
 --header "Authorization: Bearer $ACCESS_TOKEN" \
 --header "Content-Type: application/json" \
 --data '{"name":"string"}'
请求示例
{
  "name": "string"
}
响应示例 (201)
{
  "_id": "string",
  "name": "string",
  "app_id": "string",
  "draft_id": "string",
  "user_id": "string",
  "deployed_at": 42,
  "origin": "string",
  "commit": "string",
  "status": "string",
  "status_error_message": "string",
  "diff_url": "string",
  "remote_location": "US-VA"
}