Docs Menu

Docs HomeAtlas App Services

Filter Incoming Queries

On this page

  • Overview
  • Procedure
  • Navigate to the MongoDB Rules Screen
  • Create a New Filter
  • Specify the Apply When Expression
  • Specify the Filter Query Predicates
  • Specify the Filter Projection
  • Save the Filter
  • Pull the Latest Version of Your App
  • Add a Rule Configuration File
  • Add One or More Filters
  • Deploy the Updated Rules

You can define filters on incoming queries that Atlas App Services evaluates and applies before its initial query to your MongoDB cluster. Adding a filter to a collection allows you to control the shape of queried documents using projection filters and can improve query performance by reducing the number of documents for which App Services needs to evaluate a role.

Every filter consists of an Apply When expression and a Filter Query document. When App Services receives an incoming MongoDB query, it evaluates the Apply When expression of all filters on the collection and merges the Filter Query document into the incoming query.

This guide walks through creating one or more filters for a collection.


This guide requires a linked MongoDB Atlas data source.

←  Define Roles And PermissionsConfigure Advanced Rules →
Share Feedback
© 2023 MongoDB, Inc.


  • Careers
  • Investor Relations
  • Legal Notices
  • Privacy Notices
  • Security Information
  • Trust Center
© 2023 MongoDB, Inc.