对于 AI 代理:可在 https://www.mongodb.com/zh-cn/docs/llms.txt 获取文档索引—通过在任何 URL 路径后添加 .md 可获取所有页面的 Markdown 版本。
Docs 菜单

创建一个部署地区

注意

注意:群组和项目是同义词。您的 {PROJECT-ID} 与您的项目 ID 相同。对于现有群组,群组/项目 ID 保持不变。当引用说明时,此页面将使用“群组”这个更为人熟知的术语。终结点仍如文档中所述。

基本 URL: https://{OPSMANAGER-HOST}:{PORT}/api/public/v1.0

POST /admin/backup/backupDeployments

以下查询参数为可选参数:

名称
类型
必要性
说明
默认

pretty

布尔

Optional

Flag indicating whether the response body is in a prettyprint format.

false

envelope

布尔

Optional

指示是否将响应包装在信封中的标志。

某些 API 客户端无法访问 HTTP 响应标头或状态代码。要解决这个问题,可在查询中设置 envelope=true

对于返回一个结果的端点,响应体包括:

  • status: HTTP response code

  • content:预期响应正文

false

名称
类型
必要性
说明

assignmentEnabled

布尔

Optional

指示是否可以将部署区域分配给备份资源的标志。

bqProxyEndpoint

字符串

必需

Ops Manager instance that serves Queryable Backup requests. Value is in the following format: domain:port. For example, localhost:8080.

deploymentDescription

字符串

必需

描述部署地区用途的string 。

id

字符串

必需

在配置中引用此部署地区的唯一标识符。

ingestionEndpoint

字符串

必需

Ops Manager instance to which the Backup Agent writes snapshot or oplog data. Value is a valid URL such as http://www.mongodb.com. Supports both HTTP and HTTPS.

restoreEndpoint

字符串

必需

为恢复请求提供服务的MongoDB Ops Manager实例。

名称
类型
说明

assignmentEnabled

布尔

指示是否可以将部署区域分配给备份资源的标志。

bqProxyEndpoint

字符串

Ops Manager instance that serves Queryable Backup requests. Value is in the following format: domain:port. For example, localhost:8080.

deploymentDescription

字符串

描述部署地区用途的string 。

id

字符串

在配置中引用此部署地区的唯一标识符。

ingestionEndpoint

字符串

Ops Manager instance to which the Backup Agent writes snapshot or oplog data. Value is a valid URL such as http://www.mongodb.com. Supports both HTTP and HTTPS.

links

对象数组

指向子资源或相关资源的一个或多个链接。响应中的所有 links 数组至少包含一个名为 self 的链接。URL之间的关系在 Web 链接规范中进行了解释。

restoreEndpoint

字符串

为恢复请求提供服务的MongoDB Ops Manager实例。

curl --user "{publicKey}:{privateKey}" --digest \
--header "Accept: application/json" \
--include \
--request POST "https://{opsManagerHost}:{port}/api/public/v1.0/admin/backup/backupDeployments/NY_NJ?pretty=true"
--data '
{
"id": "AU_NZ",
"ingestionEndpoint": "https://api-backup.mongodb.com",
"restoreEndpoint": "https://api-backup.mongodb.com",
"bqProxyEndpoint": "queryable-backup.mongodb.com:27217",
"deploymentDescription": "Australia and New Zealand",
"assignmentEnabled": true
}'
HTTP/1.1 401 Unauthorized
Content-Type: application/json;charset=ISO-8859-1
Date: {dateInUnixFormat}
WWW-Authenticate: Digest realm="MMS Public API", domain="", nonce="{nonce}", algorithm=MD5, op="auth", stale=false
Content-Length: {requestLengthInBytes}
Connection: keep-alive
HTTP/1.1 200 OK
Vary: Accept-Encoding
Content-Type: application/json
Strict-Transport-Security: max-age=300
Date: {dateInUnixFormat}
Connection: keep-alive
Content-Length: {requestLengthInBytes}
X-MongoDB-Service-Version: gitHash={gitHash}; versionString={ApplicationVersion}
{
"assignmentEnabled" : true,
"bqProxyEndpoint" : "queryable-backup.mongodb.com:27217",
"deploymentDescription" : "Australia and New Zealand",
"id" : "AU_NZ",
"ingestionEndpoint" : "https://api-backup.mongodb.com",
"links" : [ ],
"restoreEndpoint" : "https://api-backup.mongodb.com"
}