기본 역할 및 필터 업데이트
더 이상 사용되지 않습니다.
데이터 소스의 기본 역할 및 필터를 수정합니다.
경로 매개변수
-
Atlas 프로젝트/그룹 ID입니다.
-
애플리케이션의 ObjectID입니다. App Services API 프로젝트 및 애플리케이션 ID 섹션은 이 값을 찾는 방법을 보여줍니다.
-
서비스의 고유한
_id
값입니다.
PUT /groups/{groupId}/apps/{appId}/services/{serviceId}/default_rule
curl \
--request PUT 'https://services.cloud.mongodb.com/api/admin/v3.0/groups/{groupId}/apps/{appId}/services/{serviceId}/default_rule' \
--header "Authorization: Bearer $ACCESS_TOKEN" \
--header "Content-Type: application/json" \
--data '{"_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}}]}'
요청 예시
{
"_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
}
}
]
}
응답 예시(400)
{
"error": "default rule does not exist"
}