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

获取所有块存储配置

检索所有块存储的配置。

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

GET /snapshot/mongoConfigs

此端点不使用 HTTP 请求路径参数。

名称
类型
必要性
说明
默认

pageNum

数字

Optional

从一开始的整数,用于返回结果的一部分。

1

itemsPerPage

数字

Optional

每页要返回的项目数,最多 500 个。

100

pretty

布尔

Optional

false

envelope

布尔

Optional

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

Some API clients cannot access the HTTP response headers or status code. To remediate this, set envelope : true in the query.

对于返回结果列表的端点, content对象是一个信封。 Ops Manager 将status字段添加到响应正文。

false

assignableOnly

布尔

Optional

指示是否仅返回可以向其分配新备份作业的块存储。

true

此端点不使用 HTTP 请求正文参数。

The response JSON document includes an array of result objects, an array of link objects and a count of the total number of result objects retrieved.

名称
类型
说明

results

阵列

数组为results 嵌入式文档 部分中详细介绍的每一项包含一个对象。

links

阵列

数组包含一个或多个指向子资源和/或相关资源的链接。 URL 之间的关系在 Web 链接规范中进行了解释。

totalCount

数字

结果集中项目总数的整数计数。 如果对整个结果集进行分页,则它可能大于results数组中的对象数。

每个结果都是一个块存储。

名称
类型
说明

assignEnabled

布尔

指示是否可以为此块存储分配备份作业的标志。

加密凭证

布尔

指示此块存储的用户名和密码是否使用块存储加密的标志

id

字符串

labels

字符串数组

用于管理 可以将哪些 备份作业 分配给哪些块存储的标签数组MongoDB Ops Manager

链接

对象数组

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

负载系数

数字

一个非零的正整数,表示此快照存储相对于另一个快照存储应执行的备份工作量。 仅当使用多个快照存储时才需要此选项。

要学习;了解有关Load Factor的更多信息,请参阅编辑一个现有块存储。

maxCapacityGB

数字

可选。OUTSIDE_SPACE_USED_THRESHOLD警报中使用的块存储的预期最大可用容量。maxCapacityGB 不对后端数据库的大小实施任何限制。

OIDC

对象

OIDC authentication settings for this store. The oidc object contains the following fields:

  • enabled: boolean. Indicates whether OIDC authentication is enabled for this store.

  • method: string.callbackazuregcpk8s之一。

  • tokenUri: string. The IdP token endpoint. Present only when method is callback.

  • clientId: string. The client ID registered with the IdP.

  • clientSecret: string.MongoDB Ops Manager 在响应中对此值进行编辑,并不返回原始客户端秘密。

  • scope:字符串。从 IdP 请求的 OAuth2 范围。仅当 methodcallback 时才出现。

  • tokenResource: string.工作负载身份标记的受众或资源标识符。仅在 methodazuregcp 时出现。

uri

字符串

以逗号分隔的主机列表,采用<hostname:port>格式,可用于访问此块存储。

ssl

布尔

指示此块存储是否只接受使用TLS加密的连接的标志。

usedSize

数字

现有备份消耗的备份容量(以MB为单位)。

writeConcern

字符串

用于此块存储的写关注。

此选项可接受的值为:

  • ACKNOWLEDGED

  • W2

  • JOURNALED

  • MAJORITY

要学习;了解MongoDB中的写入确认级别,请参阅写关注。

curl --user '{PUBLIC-KEY}:{PRIVATE-KEY}' --digest \
--header 'Accept: application/json' \
--include \
--request GET 'https://{OPSMANAGER-HOST}:{PORT}/api/public/v1.0/admin/backup/snapshot/mongoConfigs?pretty=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}
{
"links" : [ {
"href" : "http://{OPSMANAGER-HOST}:{PORT}/api/public/v1.0/admin/backup/snapshot/mongoConfigs?pretty=true&pageNum=1&itemsPerPage=100",
"rel" : "self"
} ],
"results" : [ {
"assignmentEnabled" : true,
"encryptedCredentials" : false,
"id" : "{BLOCKSTORE-CONFIG-ID}",
"labels" : [ "l1", "l2" ],
"links" : [ {
"href" : "https://{OPSMANAGER-HOST}:{PORT}/api/public/v1.0/admin/backup/snapshot/mongoConfigs/{BLOCKSTORE-CONFIG-ID}",
"rel" : "self"
}],
"loadFactor" : 2,
"maxCapacityGB" : 8,
"uri" : "mongodb://localhost:27017",
"ssl" : true,
"usedSize" : 222,
"writeConcern" : "W2"
} ],
"totalCount" : 1
}