Skip to main content
POST
/
api
/
v1
/
rules
/
search
SearchRules
curl --request POST \
  --url https://your-sift-api-url.com/api/v1/rules/search \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "limit": 123,
  "offset": 123,
  "order": "SEARCH_ORDER_UNSPECIFIED",
  "nameMatches": "<string>",
  "caseSensitive": true,
  "regexp": true,
  "orderBy": "<string>",
  "ruleIds": [
    "<string>"
  ],
  "assetIds": [
    "<string>"
  ],
  "includeDeleted": true,
  "assetTags": {
    "ids": {
      "ids": [
        "<string>"
      ]
    },
    "names": {
      "names": [
        "<string>"
      ]
    }
  }
}'
{
  "count": 123,
  "rules": [
    {
      "ruleId": "<string>",
      "assetId": "<string>",
      "name": "<string>",
      "description": "<string>",
      "isEnabled": true,
      "createdDate": "2023-11-07T05:31:56Z",
      "modifiedDate": "2023-11-07T05:31:56Z",
      "createdByUserId": "<string>",
      "modifiedByUserId": "<string>",
      "organizationId": "<string>",
      "conditions": [
        {
          "ruleConditionId": "<string>",
          "ruleId": "<string>",
          "expression": {
            "singleChannelComparison": {
              "channelComponent": "<string>",
              "channelName": "<string>",
              "comparator": "CONDITION_COMPARATOR_UNSPECIFIED",
              "double": 123,
              "string": "<string>",
              "lastValue": {}
            },
            "calculatedChannel": {
              "channelReferences": {},
              "expression": "<string>",
              "functionDependencies": [
                {
                  "userDefinedFunctionVersionId": "<string>"
                }
              ]
            }
          },
          "createdDate": "2023-11-07T05:31:56Z",
          "modifiedDate": "2023-11-07T05:31:56Z",
          "createdByUserId": "<string>",
          "modifiedByUserId": "<string>",
          "actions": [
            {
              "ruleActionId": "<string>",
              "ruleConditionId": "<string>",
              "actionType": "ACTION_KIND_UNSPECIFIED",
              "configuration": {
                "notification": {
                  "recipientUserIds": [
                    "<string>"
                  ]
                },
                "annotation": {
                  "tagIds": [
                    "<string>"
                  ],
                  "annotationType": "ANNOTATION_TYPE_UNSPECIFIED",
                  "assignedToUserId": "<string>",
                  "metadata": [
                    {
                      "key": "<any>",
                      "stringValue": "<any>",
                      "numberValue": "<any>",
                      "booleanValue": "<any>",
                      "archivedDate": "<any>"
                    }
                  ]
                }
              },
              "createdDate": "2023-11-07T05:31:56Z",
              "modifiedDate": "2023-11-07T05:31:56Z",
              "createdByUserId": "<string>",
              "modifiedByUserId": "<string>",
              "ruleActionVersionId": "<string>"
            }
          ],
          "ruleConditionVersionId": "<string>"
        }
      ],
      "ruleVersion": {
        "ruleId": "<string>",
        "ruleVersionId": "<string>",
        "version": "<string>",
        "createdDate": "2023-11-07T05:31:56Z",
        "createdByUserId": "<string>",
        "versionNotes": "<string>",
        "generatedChangeMessage": "<string>",
        "deletedDate": "2023-11-07T05:31:56Z"
      },
      "clientKey": "<string>",
      "assetConfiguration": {
        "assetIds": [
          "<string>"
        ],
        "tagIds": [
          "<string>"
        ]
      },
      "contextualChannels": {
        "channels": [
          {
            "name": "<string>",
            "component": "<string>"
          }
        ]
      },
      "deletedDate": "2023-11-07T05:31:56Z",
      "isExternal": true,
      "metadata": [
        {
          "key": {},
          "stringValue": "<string>",
          "numberValue": 123,
          "booleanValue": true,
          "archivedDate": "2023-11-07T05:31:56Z"
        }
      ]
    }
  ]
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
limit
integer

Max number of rules to return (returns all if omitted).

offset
integer

Only applies if limit provided.

order
enum<string>
default:SEARCH_ORDER_UNSPECIFIED
Available options:
SEARCH_ORDER_UNSPECIFIED,
SEARCH_ORDER_ASC,
SEARCH_ORDER_DESC
nameMatches
string
caseSensitive
boolean
regexp
boolean
orderBy
string
ruleIds
string[]
assetIds
string[]
includeDeleted
boolean
assetTags
object

Response

A successful response.

count
integer
required
rules
object[]
required

Conditions are not included in the search response. The latest version of the rule is returned.