デフォルトのロールとフィルターを取得する 非推奨

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

現在のデフォルトのロールとフィルターを取得します。

path パラメータ

応答

  • 200 application/ JSON

    OK

    応答属性の非表示 応答属性の表示 オブジェクト
    • _id string

      デフォルト ルールのユニークな ObjectId 識別子。

    • 役割 array[オブジェクト]

      デフォルトのユーザーロールの順序付き一覧。

      ロール属性を非表示にする ロール属性の表示 オブジェクト
      • _id string

        ロールの一意の ObjectId 識別子。

      • document_filters オブジェクト
        document_filters 属性を非表示 document_filters 属性の表示 オブジェクト
        • 読み取り

          次の 1 つ:

          A rule expression that evaluates to true if the role can read the document.

          A rule expression that evaluates to true if the role can read the document.

        • 書込み (write)

          次の 1 つ:

          A rule expression that evaluates to true if the role can write to the document.

          A rule expression that evaluates to true if the role can write to the document.

      • name string

        ロールの名前。

      • apply_when

        次の 1 つ:

        A rule expression that evaluates to true when this role applies to a user for a specific document.

        A rule expression that evaluates to true when this role applies to a user for a specific document.

      • 読み取り

        次の 1 つ:

        A rule expression that evaluates to true if the role has permission to read all fields in the document. If Device Sync is enabled, use document_filters.read instead.

        A rule expression that evaluates to true if the role has permission to read all fields in the document. If Device Sync is enabled, use document_filters.read instead.

      • 書込み (write)

        次の 1 つ:

        A rule expression that evaluates to true if the role has permission to add, modify, or remove all fields in the document. If Device Sync is enabled, use document_filters.write instead.

        A rule expression that evaluates to true if the role has permission to add, modify, or remove all fields in the document. If Device Sync is enabled, use document_filters.write instead.

      • insert

        次の 1 つ:

        A rule expression that evaluates to true if the role has permission to insert a new document into the collection.

        A rule expression that evaluates to true if the role has permission to insert a new document into the collection.

      • 削除

        次の 1 つ:

        A rule expression that evaluates to true if the role has permission to delete a document from the collection.

        A rule expression that evaluates to true if the role has permission to delete a document from the collection.

      • フィールド オブジェクト

        Field-level rules for any fields that are not explicitly configured in the role's properties.

      • additional_fields オブジェクト

        Field-level rules for any fields that are not explicitly configured in the role's properties.

        additional_fields 属性を非表示にする additional_fields 属性を表示 オブジェクト
        • 読み取り

          次の 1 つ:

          A rule expression that evaluates to true if the role can read the field's value.

          A rule expression that evaluates to true if the role can read the field's value.

        • 書込み (write)

          次の 1 つ:

          A rule expression that evaluates to true if the role can write the field's value.

          A rule expression that evaluates to true if the role can write the field's value.

    • フィルター array[オブジェクト]

      デフォルトのクエリフィルターの一覧。

      フィルター属性を非表示 フィルター属性の表示 オブジェクト
      • _id string

        フィルターの一意の ObjectId 識別子。

      • name string

        フィルターの名前。

      • apply_when

        次の 1 つ:

        A rule expression that evaluates to true if the filter applies to an incoming query.

        A rule expression that evaluates to true if the filter applies to an incoming query.

      • クエリ オブジェクト

        操作が実行される前に受信クエリにマージされるMongoDBクエリオブジェクト。

      • プロジェクション オブジェクト

        操作が実行される前に受信クエリにマージされるMongoDBプロジェクションオブジェクト。

        プロジェクション属性を非表示 プロジェクション属性の表示 オブジェクト
        • * 数値 additionalProperties

          値は 0 または 1 です。

  • 404 application/ JSON

    デフォルトのルールは定義されていません。

    応答属性を非表示 応答属性の表示 オブジェクト
    • エラー string

      値は default rule does not exist on service です。

GET /groups/{groupId}/apps/{appId}/services/{serviceId}/default_rule
curl \
 --request GET 'https://services.cloud.mongodb.com/api/admin/v3.0/groups/{groupId}/apps/{appId}/services/{serviceId}/default_rule' \
 --header "Authorization: Bearer $ACCESS_TOKEN"
応答の例(200)
{
  "_id": "string",
  "roles": [
    {
      "_id": "string",
      "document_filters": {},
      "name": "string",
      "fields": {},
      "additional_fields": {}
    }
  ],
  "filters": [
    {
      "_id": "string",
      "name": "string",
      "query": {},
      "projection": {
        "additionalProperty1": 0,
        "additionalProperty2": 0
      }
    }
  ]
}
応答の例(404)
{
  "error": "default rule does not exist on service"
}