Get a rule
Get a specific data access rule.
Path parameters
-
An Atlas Project/Group ID.
-
The ObjectID of your application. The App Services API Project and Application IDs section demonstrates how to find this value.
-
The unique
_id
value of a service. -
The unique
_id
value of a rule.
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"
Response examples (200)
Ruleconstructor
{
"_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": {}
}