기본 역할 및 필터 업데이트 더 이상 사용되지 않습니다.

PUT /groups/{groupId}/apps/{appId}/services/{serviceId}/default_rule

데이터 소스의 기본 역할 및 필터를 수정합니다.

경로 매개변수

application/json

body 필수 사항

업데이트된 기본 규칙 구성 객체입니다.

응답

  • 204

    기본 규칙이 성공적으로 수정되었습니다.

  • 400 application/json

    잘못된 요청

    응답 속성 숨기기 응답 속성 표시 객체
    • 오류 문자열

      값은 default rule does not exist 또는 service default rule id mismatch입니다.

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"
}