Retrieving Rules

Listing the Rules within your Project.

The following call will list the Rules in the Project with ID 398748937:
(Click here to learn how to get your Project ID)

curl -X GET https://api.brandwatch.com/projects/398748937/rules

The response will look like this. It has been edited for brevity by excluding Filters that are not affected by the Rule.

{
  "resultsTotal": 1,
  "resultsPage": -1,
  "resultsPageSize": -1,
  "results": [
    {
      "id": 1998324680,
      "projectId": 1494022974,
      "name": "Dropped calls",
      "filter": {
        "queryId": [
          1501738808
        ],
        "search": "\"dropped call\"",
      },
      "scope": "query",
      "enabled": true,
      "ruleAction": {
        "sentiment": "negative",
      },
      "queryName": "Mobile phones",
      "projectName": "Telecoms"
    }
  ]
}

This particular example shows a Rule that applies negative sentiment whenever the term "dropped call" is found in the text of a Mention.

If you know the Rule id then you can get information on that specific Rule using the call below:

curl -X GET https://api.brandwatch.com/projects/398748937/rules/1998324680