Reviews

Definition

A Review is when Red Marker scan an Asset for risky content using Rules. For example, scanning a Marketing Brochure for risk.

Create a Review

Request

POST /v2/reviews HTTP/1.1
Content-Type: application/vnd.api+json
Accept: application/vnd.api+json

{
    "data": {
        "type": "reviews",
        "attributes": {},
        "relationships": {
            "asset": {
                "data": {
                    "type": "assets",
                    "id": "1002"
                }
            },
            "categorisation": {
                "data": {
                    "type": "categorisations",
                    "id": "1003"
                }
            }
        }
    }
}

Response

HTTP/1.1 201 Created
Content-Type: application/vnd.api+json

{
    "data": {
        "type": "reviews",
        "id": "1001",
        "attributes": {
            "status": "pending"
        },
        "relationships": {
            "asset": {
                "data": {
                    "type": "assets",
                    "id": "1002"
                }
            },
            "categorisation": {
                "data": {
                    "type": "categorisations",
                    "id": "1003"
                }
            },
            "issues": {
                "data": []
            }
        },
        "links": {
            "self": "https://api.redmarker.ai/v2/reviews/1001"
        }
    }
}

Retrieving a Review

After creating a Review, you can retrieve it again. This is a good way to check to see if the Review has completed, via the status attribute.

Request

GET /v2/reviews/1001 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

{
    "data": {
        "type": "reviews",
        "id": "1001",
        "attributes": {
            "status": "finished"
        },
        "relationships": {
            "asset": {
                "data": {
                    "type": "assets",
                    "id": "1002"
                }
            },
            "categorisation": {
                "data": {
                    "type": "categorisations",
                    "id": "1003"
                }
            },
            "issues": {
                "data": []
            }
        },
        "links": {
            "self": "https://api.redmarker.ai/v2/reviews/1001"
        }
    }
}

Following with the JSON:API Specification, you can include a Review's related resources by adding the include parameter to the query string. The follow resources are available:

Relationship URL Key Description
Asset asset The Asset this Review will check for risky content
Categorisation categorisation The selected Category options assigned to the Review
Creator creator The user who created the review
Owner owner The company who owns the review (company of the creator)

Example:

GET /v2/reviews/1001?include=asset,creator,owner HTTP/1.1