Tags

Tags are a powerful feature that allows you to categorize, organize, and group related rules within the system. This functionality simplifies the process of managing large numbers of rules and provides a streamlined way to retrieve specific subsets of rules using the REST API.

Purpose of Tags

Tags serve as simple, user-defined labels that can be associated with rules. Their primary use cases include:

  • Grouping rules by purpose (e.g., security, compliance, marketing)

  • Filtering rules for reporting or processing

  • Selectively retrieving rules via the REST API

Adding Tags to Rules

When creating or editing a rule, you can attach one or more tags to it.

How to Add Tags

  1. Navigate to the rule configuration page of the rule you want to enrich with tags.

  2. In the upper left click on "Add Tag"

  3. Enter the name of the tag. Tags should be simple strings (e.g., highpriority, beta, finance).

  4. Appply the tag.

  5. Save the rule.

REST API

Get all distinct tags used on any rules

get
Authorizations
Responses
200

OK

application/json
Responsestring[]
get
GET /rules/tags/v1 HTTP/1.1
Host: api.moost.io
Authorization: Bearer JWT
Accept: */*
[
  "text"
]

REST API Endpoint

Get Rules

get
Authorizations
Query parameters
tagsstring[]Optional
Responses
200

OK

application/json
get
GET /rules/v1 HTTP/1.1
Host: api.moost.io
Authorization: Bearer JWT
Accept: */*
[
  {
    "id": "text",
    "createdAt": 1,
    "customerId": "text",
    "name": "text",
    "description": "text",
    "ruleState": "ACTIVE",
    "notification": {
      "actionQualifier": {
        "ANY_ADDITIONAL_PROPERTY": "DISMISS"
      },
      "texts": {
        "ANY_ADDITIONAL_PROPERTY": {
          "title": "text",
          "message": "text",
          "actions": {
            "ANY_ADDITIONAL_PROPERTY": {
              "text": "text",
              "parameter": "text"
            }
          }
        }
      },
      "command": "text"
    },
    "notificationCases": [
      {
        "label": "text",
        "caseCondition": "text",
        "notification": {
          "actionQualifier": {
            "ANY_ADDITIONAL_PROPERTY": "DISMISS"
          },
          "texts": {
            "ANY_ADDITIONAL_PROPERTY": {
              "title": "text",
              "message": "text",
              "actions": {
                "ANY_ADDITIONAL_PROPERTY": {
                  "text": "text",
                  "parameter": "text"
                }
              }
            }
          },
          "command": "text"
        }
      }
    ],
    "match_threshold": 1,
    "time_between_triggers_seconds": 1,
    "resetStateWhenMatched": true,
    "condition": "text",
    "isStreak": true,
    "streakCondition": "text",
    "isRestrictedToEarlyAdopters": true,
    "isTimeBased": true,
    "timeBasedCron": "text",
    "messageQueueSetting": {
      "isOverflowProtectionActive": true
    },
    "datasets": [
      {
        "name": "text",
        "description": "text",
        "type": "SINGLEVALUE",
        "source_types": [
          "APPLIANCE"
        ],
        "event_types": [
          "CHARGING_MODE"
        ],
        "timeframe": 1
      }
    ],
    "topicIcon": "text",
    "impactIcon": "text",
    "templateRuleId": "text",
    "tags": [
      "text"
    ]
  }
]

Last updated