API DocsRESTRule service

SearchRules

Queries rules based on provided search parameters.

POST
/api/v1/rules/search

Request Body

application/jsonRequired

limitinteger

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

Format: "int64"

offsetinteger

Only applies if limit provided.

Format: "int64"

orderstring

Default: "SEARCH_ORDER_UNSPECIFIED"Value in: "SEARCH_ORDER_UNSPECIFIED" | "SEARCH_ORDER_ASC" | "SEARCH_ORDER_DESC"

nameMatchesstring

caseSensitiveboolean

regexpboolean

orderBystring

ruleIdsIf provided, only returns rules with the given ids

assetIdsIf provided, only returns rules that apply to the given asset ids

includeDeletedboolean

assetTagsobject

curl -X POST "<API_URL>/api/v1/rules/search" \
  -H "Authorization: Bearer <API_KEY>" \
  -H "Content-Type: application/json" \
  -d '{
    "limit": 0,
    "offset": 0,
    "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"
        ]
      }
    }
  }'

A successful response.

{
  "count": 0,
  "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"
            }
          },
          "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"
    }
  ]
}