路径参数
-
Atlas 项目/组 ID。
-
您的应用程序的 ObjectID。App Services API 项目和应用程序 ID 部分演示了如何查找此值。
-
服务的唯一
_id
值。 -
规则的唯一
_id
值。
GET /groups/{groupId}/apps/{appId}/services/{serviceId}/rules/{ruleId}
curl \
--request GET 'https://services.cloud.mongodb.com/api/admin/v3.0/groups/{groupId}/apps/{appId}/services/{serviceId}/rules/{ruleId}' \
--header "Authorization: Bearer $ACCESS_TOKEN"
响应示例 (200)
规则构造器
{
"_id": "string",
"roles": [
{
"_id": "string",
"document_filters": {
"read": {},
"write": {}
},
"name": "string",
"apply_when": {},
"read": {},
"write": {},
"insert": {},
"delete": {},
"search": {},
"fields": {},
"additional_fields": {
"read": {},
"write": {}
}
}
],
"filters": [
{
"_id": "string",
"name": "string",
"apply_when": {},
"query": {},
"projection": {
"additionalProperty1": 0,
"additionalProperty2": 0
}
}
],
"database": "string",
"collection": "string"
}
{
"name": "string",
"actions": [
"string"
],
"when": {}
}