Subscriber Defined Filtering DSL Reference

Adobe I/O Events Subscriber Defined Filtering (SDF) uses a powerful, JSON-based Domain Specific Language (DSL) to let you precisely control which events you receive. This page provides a comprehensive reference for the supported operators, their syntax, and practical examples using real event payloads.

Note: The SDF DSL is based on a subset of the Event Ruler DSL (which is also used as the AWS EventBridge event pattern syntax). Some advanced or rarely used operators may not be supported. See the restrictions section below.

Event Example

Here is a real event payload you might receive from Adobe I/O Events:

{
  "specversion": "1.0",
  "type": "aem.assets.asset.published",
  "source": "author-p12345-e123456.adobeaemcloud.com",
  "id": "123e4567-e89b-12d3-a456-426614174000",
  "time": "2024-04-22T23:26:09.036Z",
  "datacontenttype": "application/json",
  "data": {
    "assetId": "urn:aaid:aem:abcd1234-ab12-ab12-ab12-abcdef123456",
    "user": {
      "imsUserId": "11362B9E62F4CD400A495ECF@09f51d11618ca7b4495ee0.e",
      "principalId": "testuser@adobe.com",
      "displayName": "Test User"
    },
    "tier": "publish",
    "repositoryMetadata": {
      "aem:assetState": "processed",
      "repo:name": "city.jpeg",
      "repo:path": "/content/dam/city.jpeg",
      "repo:size": 338049
    },
    "assetMetadata": {
      "customProperty1": "customValue",
      "customProperty2": true,
      "customProperty3": 1234
    }
  }
}

Supported Operators

Operator
Description
Example Syntax
equals
Exact match (default)
"type": ["aem.assets.asset.published"]
anything-but
Not equal / not in list
"tier": [{"anything-but": "author"}]
prefix
Value starts with
"repo:path": [{"prefix": "/content/dam/"}]
suffix
Value ends with
"repo:name": [{"suffix": ".jpeg"}]
numeric
Numeric comparison
"repo:size": [{"numeric": [">", 100000]}]
exists
Field exists or not
"assetMetadata": {"customProperty1": [{"exists": true}]}
equals-ignore-case
Case-insensitive match
"tier": [{"equals-ignore-case": "PUBLISH"}]
$or
Logical OR across fields or conditions
"$or": [{"tier": ["publish"]}, {"repo:size": [{"numeric": [">", 1000000]}]}]
cidr
IP address matches CIDR range (both IPv4 and IPv6)
"ip": [{"cidr": "192.168.0.0/16"}]

The and logical operator is implicit. Fields in JSON objects in the rule are conditions in and.

Operator Details & Examples

1. equals (default)

Matches if the field value is exactly equal to one of the listed values.

{
  "type": ["aem.assets.asset.published", "aem.assets.asset.deleted"]
}

2. anything-but

Matches if the field value is NOT equal to the given value or values.

{
  "data": {
    "tier": [{"anything-but": "author"}]
  }
}

3. prefix

Matches if the field value starts with the given string.

{
  "data": {
    "repositoryMetadata": {
      "repo:path": [{"prefix": "/content/dam/"}]
    }
  }
}

4. suffix

Matches if the field value ends with the given string.

{
  "data": {
    "repositoryMetadata": {
      "repo:name": [{"suffix": ".jpeg"}]
    }
  }
}

6. numeric

Matches if the field value (number) satisfies the numeric comparison(s).

{
  "data": {
    "repositoryMetadata": {
      "repo:size": [{"numeric": [">", 100000, "<=", 500000]}]
    }
  }
}

7. exists

Matches if the field exists (or does not exist) in the event.

{
  "data": {
    "assetMetadata": {
      "customProperty1": [{"exists": true}]
    }
  }
}

Note Exists match only works on the leaf nodes. It does not work on intermediate nodes.

8. equals-ignore-case

Matches if the field value equals the given value, ignoring case.

{
  "data": {
    "tier": [{"equals-ignore-case": "PUBLISH"}]
  }
}

9. $or

Matches if any of the listed conditions are true (logical OR across fields or sub-conditions).

{
  "data": {
    "$or": [
      {"tier": ["publish"]},
      {"repositoryMetadata": {"repo:size": [{"numeric": [">", 1000000]}]}}
    ]
  }
}

10. cidr

Matches if the field value (an IP address) is within the specified CIDR range(s).

{
  "data": {
    "detail": {
      "source-ip": [{"cidr": "192.168.0.0/16"}]
    }
  }
}

Practical Filter Examples

For end-to-end setup and API usage, see the SDF Overview.

Example 1: Only receive published JPEG assets larger than 300KB

{
  "type": ["aem.assets.asset.published"],
  "data": {
    "repositoryMetadata": {
      "repo:name": [{"suffix": ".jpeg"}],
      "repo:size": [{"numeric": [">", 300000]}]
    }
  }
}

Example 2: Exclude events for assets in a specific folder

{
  "data": {
    "repositoryMetadata": {
      "repo:path": [{"anything-but": {"prefix": "/content/dam/exclude/"}}]
    }
  }
}

Example 3: Match if asset is published OR asset size is over 1MB

{
  "$or": [
    {"type": ["aem.assets.asset.published"]},
    {"data": {"repositoryMetadata": {"repo:size": [{"numeric": [">", 1000000]}]}}}
  ]
}

Example 4: Only receive events where a custom property exists

{
  "data": {
    "assetMetadata": {
      "customProperty1": [{"exists": true}]
    }
  }
}

Restrictions

Best Practices

Further Reading