Skip to main content
GET
/
api
/
v1
/
rules:list
ListRules
curl --request GET \
  --url https://your-sift-api-url.com/api/v1/rules:list \
  --header 'Authorization: Bearer <token>'
{
  "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": {
                        "name": "<string>",
                        "type": "METADATA_KEY_TYPE_UNSPECIFIED",
                        "archivedDate": "2023-11-07T05:31:56Z"
                      },
                      "stringValue": "<string>",
                      "numberValue": 123,
                      "booleanValue": true,
                      "archivedDate": "2023-11-07T05:31:56Z"
                    }
                  ]
                }
              },
              "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"
      },
      "assetConfiguration": {
        "assetIds": [
          "<string>"
        ],
        "tagIds": [
          "<string>"
        ]
      },
      "contextualChannels": {
        "channels": [
          {
            "name": "<string>",
            "component": "<string>"
          }
        ]
      },
      "isExternal": true,
      "metadata": [
        {
          "key": {
            "name": "<string>",
            "type": "METADATA_KEY_TYPE_UNSPECIFIED",
            "archivedDate": "2023-11-07T05:31:56Z"
          },
          "stringValue": "<string>",
          "numberValue": 123,
          "booleanValue": true,
          "archivedDate": "2023-11-07T05:31:56Z"
        }
      ],
      "clientKey": "<string>",
      "deletedDate": "2023-11-07T05:31:56Z"
    }
  ],
  "nextPageToken": "<string>"
}

Authorizations

Authorization
string
header
required

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

Query Parameters

pageSize
integer<int64>

The maximum number of Rules to return. The service may return fewer than this value. If unspecified, at most 50 Rules will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.

pageToken
string

A page token, received from a previous ListRules call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to ListRules must match the call that provided the page token.

filter
string

A Common Expression Language (CEL) filter string. Available fields to filter by are rule_id, client_key, name, description, asset_id, tag_id, and deleted_date. For further information about how to use CELs, please refer to this guide. Optional.

orderBy
string

How to order the retrieved Rules. Formatted as a comma-separated string i.e. "FIELD_NAME[ desc],...". Available fields to order_by are created_date and modified_date. If left empty, items are ordered by created_date in descending order (newest-first).

Response

A successful response.

rules
object[]
required
nextPageToken
string