Ably · Schema

rule_source

RealtimeWebSocketsPub/SubMessagingStreamingPush NotificationsChatLiveSync

Properties

Name Type Description
channelFilter string This field allows you to filter your rule based on a regular expression that is matched against the complete channel name. Leave this empty if you want the rule to apply to all channels.
type string Ably currently supports the following sources for all rule types, in both single and batch mode: `channel.message`, `channel.presence`, `channel.lifecycle` and `channel.occupancy`. If the source `chan
View JSON Schema on GitHub

JSON Schema

ably-rule-source-schema.json Raw ↑
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "#/components/schemas/rule_source",
  "title": "rule_source",
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "channelFilter": {
      "type": "string",
      "description": "This field allows you to filter your rule based on a regular expression that is matched against the complete channel name. Leave this empty if you want the rule to apply to all channels.",
      "example": "^my-channel.*"
    },
    "type": {
      "type": "string",
      "description": "Ably currently supports the following sources for all rule types, in both single and batch mode: `channel.message`, `channel.presence`, `channel.lifecycle` and `channel.occupancy`. If the source `channel.message` is selected, you receive notifications when messages are published on a channel. If the source `channel.presence` is selected, you receive notifications of presence events when clients enter, update their data, or leave channels. If the source `channel.lifecycle` is selected, you receive notifications of channel lifecycle events, such as when a channel is created (following the first client attaching to this channel) or discarded (when there are no more clients attached to the channel). If the source `channel.occupancy` is selected, you receive notifications of occupancy events, which relate to the number and type of occupants in the channel.",
      "example": "channel.message"
    }
  },
  "required": [
    "channelFilter",
    "type"
  ]
}