API DocsRESTRule service

ListRules

Retrieves a list of rules.

GET
/api/v1/rules:list

Query Parameters

pageSizeinteger

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.

Format: "int64"

pageTokenstring

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.

filterstring

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

orderBystring

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 ascending order (oldest-first).

curl -X GET "<API_URL>/api/v1/rules:list?pageSize=0&pageToken=string&filter=string&orderBy=string" \
  -H "Authorization: Bearer <API_KEY>"

A successful response.

{
  "rules": [
    {
      "ruleId": "string",
      "assetId": "string",
      "name": "string",
      "description": "string",
      "isEnabled": true,
      "createdDate": "2019-08-24T14:15:22Z",
      "modifiedDate": "2019-08-24T14:15:22Z",
      "createdByUserId": "string",
      "modifiedByUserId": "string",
      "organizationId": "string",
      "conditions": [
        {
          "ruleConditionId": "string",
          "ruleId": "string",
          "expression": {
            "singleChannelComparison": {
              "channelComponent": "string",
              "channelName": "string",
              "comparator": "CONDITION_COMPARATOR_UNSPECIFIED",
              "double": 0.1,
              "string": "string",
              "lastValue": {}
            },
            "calculatedChannel": {
              "channelReferences": {
                "property1": {
                  "name": "string",
                  "component": "string"
                },
                "property2": {
                  "name": "string",
                  "component": "string"
                }
              },
              "expression": "string",
              "functionDependencies": [
                {
                  "userDefinedFunctionVersionId": "string"
                }
              ]
            }
          },
          "createdDate": "2019-08-24T14:15:22Z",
          "modifiedDate": "2019-08-24T14:15:22Z",
          "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"
                }
              },
              "createdDate": "2019-08-24T14:15:22Z",
              "modifiedDate": "2019-08-24T14:15:22Z",
              "createdByUserId": "string",
              "modifiedByUserId": "string",
              "ruleActionVersionId": "string"
            }
          ],
          "ruleConditionVersionId": "string"
        }
      ],
      "ruleVersion": {
        "ruleId": "string",
        "ruleVersionId": "string",
        "version": "string",
        "createdDate": "2019-08-24T14:15:22Z",
        "createdByUserId": "string",
        "versionNotes": "string",
        "generatedChangeMessage": "string",
        "deletedDate": "2019-08-24T14:15:22Z"
      },
      "clientKey": "string",
      "assetConfiguration": {
        "assetIds": [
          "string"
        ],
        "tagIds": [
          "string"
        ]
      },
      "contextualChannels": {
        "channels": [
          {
            "name": "string",
            "component": "string"
          }
        ]
      },
      "deletedDate": "2019-08-24T14:15:22Z"
    }
  ],
  "nextPageToken": "string"
}