Docs Menu
Docs Home
/ /
Atlas App Services
/ /

Configure Service Rules [Deprecated]

On this page

  • Overview
  • Procedure

Important

Third Party Services & Push Notifications Deprecation

Third party services and push notifications in App Services have been deprecated in favor of creating HTTP endpoints that use external dependencies in functions.

Webhooks have been renamed to HTTPS Endpoints with no change in behavior. You should migrate existing Webhooks.

Existing services will continue to work until September 30, 2025.

Because third party services and push notifications are now deprecated, they have been removed by default from the App Services UI. If you need to manage an existing third party service or push notification, you can add the configurations back to the UI by doing the following:

  • In the left navigation, under the Manage section, click App Settings.

  • Enable the toggle switch next to Temporarily Re-Enable 3rd Party Services, and then save your changes.

In order to call a service action, you must first define a service rule that enables and configures the capabilities of the action. You can define service rules from the Atlas App Services UI or by importing a service configuration directory that contains a rule configuration file. Select the tab below that corresponds to the method you want to use.

1

You can create and configure a service rule from its associated service page in the App Services UI.

To define a new service rule:

  1. Click Services in the left navigation menu.

  2. Click on the service that you want to specify a rule for.

  3. Click on the Rules tab of the service.

  4. Click New Rule.

  5. Specify a name for the rule in the textbox that appears.

  6. Click Add Rule to confirm the creation of the new rule.

2

To configure the new service rule you just created:

  1. Click on the newly created rule in the rules list on the left-hand side of the page.

  2. In the list of Actions, select all of the actions that you want the rule to apply to.

  3. For the When box, specify a rule expression that evaluates to true when you want the action to be permitted.

    Note

    If you specify {}, the expression will always evaluate to true and App Services will always allow the associated actions to be called.

An example rule configuration for the HTTP service in the UI
click to enlarge
3

Once you've finished configuring the rule, click Save. Once saved, the rule takes effect immediately.

1
realm-cli pull --remote=<App ID>
2

If it doesn't already exist, create a new rules subdirectory in the /services folder of the exported directory.

mkdir -p services/<service name>/rules
3

Add a rule configuration JSON file to the rules directory. The configuraiton file should have the same name as the rule and have the following form:

{
"name": <string>,
"actions": [<action>, ...],
"when": <JSON expression>
}
Configuration Value
Description
Rule Name
name
Required. A name for the rule. The name should be unique within the service.
Actions
actions

Required. An array of strings where each item is the name of a service action that the rule applies to.

Example

An HTTP service rule that only applies to the http.post() service action would have the following action value:

"actions": [
"post"
]
When
when
Required. A rule expression that determines if a service action should actually execute after being called. App Services will only execute the action if the expression resolves to true. If you do not specify an expression, Can Evaluate defaults to true.
4

Push the rule configuration to deploy it to your app. Once you have deployed, App Services immediately begins to enforce the rule.

realm-cli push

Back

Configure Service Webhooks

On this page