Triggers

Triggers only exist in the context of a Review and a Review Rule; they are a sub-resource. Their base url always includes a Review's ID and a Review Rule's ID:

GET  /v2/reviews/1001/review-rules/1412/triggers
POST /v2/reviews/1001/review-rules/1412/triggers
GET  /v2/reviews/1001/review-rules/1412/triggers/987
...

Definition

A Trigger is a term, sentence, or absence of something that is used to determine if a Review Rule should be displayed as potentially risky.

Retrieving the Triggers for a Review Rule

In the context of a Review Rule, Triggers represent the content that Red Marker determined in the Asset as likely to be risky, due to how the rule has been defined. They can be retrieved by requesting the Index endpoint:

Request

GET /v2/reviews/1001/review-rules/1412/triggers HTTP/1.1
Content-Type: application/vnd.api+json
Accept: application/vnd.api+json

Response

HTTP/1.1 200 OK
Content-Type: application/vnd.api+json

{
  "meta": {
    "page": {
      "current-page": 1,
      "per-page": 10,
      "from": 1,
      "to": 3,
      "total": 3,
      "last-page": 1
    }
  },
  "links": {
    "first": "https://api.redmarker.ai/v2/reviews/1001/review-rules/1412/triggers?sort=id&page%5Bnumber%5D=1&page%5Bsize%5D=10",
    "last": "https://api.redmarker.ai/v2/reviews/1001/review-rules/1412/triggers?sort=id&page%5Bnumber%5D=1&page%5Bsize%5D=10"
  },
  "data": [
    {
      "type": "triggers",
      "id": "160",
      "attributes": {
        "text": "Provident ut esse qui blanditiis quo eos. Quidem quas magni quia blanditiis omnis. Veritatis dolorem et dolor maiores hic voluptatem eum. Earum placeat dolores et aut a ab.",
        "classifier": "Natus cum in autem illum officia quo assumenda. Cu",
        "triggerType": "sentence",
        "status": "pending",
        "displayable": true,
        "coordinates": null,
        "sentenceReference": 1,
        "startOffset": 0,
        "endOffset": 0,
        "confidence": null,
        "manual": false,
        "createdAt": "2020-02-20T02:05:01+00:00"
      },
      "relationships": {
        "review-rule": {
          "data": {
            "type": "review-rules",
            "id": "1412"
          },
          "links": {
            "related": "https://api.redmarker.ai/v2/reviews/1001/review-rules/1412"
          }
        }
      },
      "links": {
        "self": "https://api.redmarker.ai/v2/reviews/1001/review-rules/1412/triggers/160"
      }
    },
    {
      "type": "triggers",
      "id": "161",
      "attributes": {
        "text": "Rerum facere ducimus dolor. Numquam deserunt voluptas quia libero. Non qui qui et illum ab. Consectetur et sequi quod.",
        "classifier": "Beatae quis ullam in eaque. Sunt rerum consequatur",
        "triggerType": "sentence",
        "status": "pending",
        "displayable": true,
        "coordinates": null,
        "sentenceReference": 2,
        "startOffset": 0,
        "endOffset": 0,
        "confidence": null,
        "manual": false,
        "createdAt": "2020-02-20T02:05:01+00:00"
      },
      "relationships": {
        "review-rule": {
          "data": {
            "type": "review-rules",
            "id": "1412"
          },
          "links": {
            "related": "https://api.redmarker.ai/v2/reviews/1001/review-rules/1412"
          }
        }
      },
      "links": {
        "self": "https://api.redmarker.ai/v2/reviews/1001/review-rules/1412/triggers/161"
      }
    },
    {
      "type": "triggers",
      "id": "162",
      "attributes": {
        "text": "Autem quo porro totam ducimus ut. Expedita nulla autem saepe adipisci facilis sunt. Veniam quia qui eos eos tenetur. Rerum est voluptatem eligendi cum.",
        "classifier": "Qui sed consequatur quibusdam dolore quia eius dis",
        "triggerType": "sentence",
        "status": "pending",
        "displayable": true,
        "coordinates": null,
        "sentenceReference": 3,
        "startOffset": 0,
        "endOffset": 0,
        "confidence": null,
        "manual": false,
        "createdAt": "2020-02-20T02:05:01+00:00"
      },
      "relationships": {
        "review-rule": {
          "data": {
            "type": "review-rules",
            "id": "1412"
          },
          "links": {
            "related": "https://api.redmarker.ai/v2/reviews/1001/review-rules/1412"
          }
        }
      },
      "links": {
        "self": "https://api.redmarker.ai/v2/reviews/1001/review-rules/1412/triggers/162"
      }
    }
  ]
}

Multiple documents

Note that in the response the data attribute is an array containing 0 or more Triggers resources