Skip to content

Review Rules

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

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

Definition

A Review Rule is a representation of a Rule that has been triggered as part of a Review. They may have zero or more Triggers that define where in the Asset and why the Rule was triggered.

Retrieving the Review Rules for a Review

In the context of a Review, the Review Rules represent the rules that triggered on potentially risky content in the Asset. They can be retrieved by requesting the Index endpoint:

Request

GET /v2/reviews/1001/review-rules 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": 1,
      "total": 1,
      "last-page": 1
    }
  },
  "links": {
    "first": "https://api.redmarker.ai/v2/reviews/1001/review-rules?sort=id&page%5Bnumber%5D=1&page%5Bsize%5D=10",
    "last": "https://api.redmarker.ai/v2/reviews/1001/review-rules?sort=id&page%5Bnumber%5D=1&page%5Bsize%5D=10"
  },
  "data": [
    {
      "type": "review-rules",
      "id": "115",
      "attributes": {
        "reference": "11.9.3A",
        "group": "Checklist A - DISCLAIMERS FOR TRADEMARKS OF OTHER ORGANISATIONS",
        "description": "1.2) Messages must not suggest or imply that a product or service is endorsed or approved by a regulator such as ASIC, APRA, ATO or ACCC.",
        "feedback": "Your message appears to suggest endorsement or approval by a regulator. As this is prohibited, remove the suggestion.",
        "score": 5,
        "riskScore": 5,
        "status": "pending",
        "requiresJudgement": false,
        "judged": false,
        "manual": true,
        "hidden": false,
        "createdAt": "2019-10-23T11:15:10+00:00"
      },
      "relationships": {
        "review": {
          "data": {
            "type": "reviews",
            "id": "1001"
          }
        },
        "triggers": {
          "data": [
            {
              "type": "triggers",
              "id": "159"
            }
          ]
        }
      },
      "links": {
        "self": "https://api.redmarker.ai/v2/reviews/1001/review-rules/115"
      }
    }
  ]
}

Multiple documents

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