Omniplex Docs
PopplioStaging

Reviews

These API endpoints are related to reviews on IBL

GET
/{target_type}/{target_id}/reviews

Get Reviews

Gets the reviews of a bot by its ID or vanity.

/{target_type}/{target_id}/reviews

Path Parameters

target_type
Required
string

The target type of the entity

target_id
Required
string

The target ID of the entity

curl -X GET "https://spider-staging.omniplex.gg/string/string/reviews"

Success

{
  "reviews": [
    {
      "author": {
        "avatar": "string",
        "bot": true,
        "display_name": "string",
        "extra_data": {
          "property1": null,
          "property2": null
        },
        "flags": [
          "string"
        ],
        "id": "string",
        "status": "string",
        "username": "string"
      },
      "content": "string",
      "created_at": "2019-08-24T14:15:22Z",
      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      "owner_review": true,
      "parent_id": "1c6ca187-e61f-4301-8dcb-0e9749e89eef",
      "stars": 0,
      "target_id": "string",
      "target_type": "string"
    }
  ]
}

POST
/{target_type}/{target_id}/reviews

Create Review

Creates a new review for an entity. A user may have only one root review per entity. Triggers a garbage collection step to remove any orphaned reviews afterwards. Note that non-users can only create an 'owner review'. Returns 204 on success

/{target_type}/{target_id}/reviews

The Authorization access token

Authorization

User-Auth<token>

Requires a user token. Should be prefixed with User in Authorization header.

In: header

Bot-Auth<token>

Requires a bot token. Should be prefixed with Bot in Authorization header.

In: header

Server-Auth<token>

Requires a server API session token. Should be prefixed with Server in Authorization header.

In: header

Team-Auth<token>

Requires a team API session token. Should be prefixed with Team in Authorization header.

In: header

Request Body

application/jsonRequired

contentstring

owner_reviewboolean

Whether or not the review is an owner review

parent_idstring

starsinteger

Format: "int32"

Path Parameters

target_type
Required
string

The target type of the entity

target_id
Required
string

The target ID of the entity

curl -X POST "https://spider-staging.omniplex.gg/string/string/reviews" \
  -H "User-Auth: <token>" \
  -H "Content-Type: application/json" \
  -d '{
    "content": "string",
    "owner_review": true,
    "parent_id": "string",
    "stars": 0
  }'

Success

{
  "context": {
    "property1": "string",
    "property2": "string"
  },
  "message": "string"
}

PATCH
/{target_type}/{target_id}/reviews/{review_id}

Edit Review

Edits a review by review ID. The user must be the author of this review. This will automatically trigger a garbage collection task. Note that non-users can only edit 'owner review's. Returns 204 on success

/{target_type}/{target_id}/reviews/{review_id}

The Authorization access token

Authorization

User-Auth<token>

Requires a user token. Should be prefixed with User in Authorization header.

In: header

Bot-Auth<token>

Requires a bot token. Should be prefixed with Bot in Authorization header.

In: header

Server-Auth<token>

Requires a server API session token. Should be prefixed with Server in Authorization header.

In: header

Team-Auth<token>

Requires a team API session token. Should be prefixed with Team in Authorization header.

In: header

Request Body

application/jsonRequired

contentstring

starsinteger

Format: "int32"

Path Parameters

target_type
Required
string

The target type of the entity

target_id
Required
string

The target ID of the entity

review_id
Required
string

The review ID of the entity

curl -X PATCH "https://spider-staging.omniplex.gg/string/string/reviews/string" \
  -H "User-Auth: <token>" \
  -H "Content-Type: application/json" \
  -d '{
    "content": "string",
    "stars": 0
  }'

Success

{
  "context": {
    "property1": "string",
    "property2": "string"
  },
  "message": "string"
}

DELETE
/{target_type}/{target_id}/reviews/{review_id}

Delete Review

Deletes a review by review ID. The user must be the author of this review. This will automatically trigger a garbage collection task and returns 204 on success

/{target_type}/{target_id}/reviews/{review_id}

The Authorization access token

Authorization

User-Auth<token>

Requires a user token. Should be prefixed with User in Authorization header.

In: header

Bot-Auth<token>

Requires a bot token. Should be prefixed with Bot in Authorization header.

In: header

Server-Auth<token>

Requires a server API session token. Should be prefixed with Server in Authorization header.

In: header

Team-Auth<token>

Requires a team API session token. Should be prefixed with Team in Authorization header.

In: header

Path Parameters

target_type
Required
string

The target type of the entity

target_id
Required
string

The target ID of the entity

review_id
Required
string

The review ID of the entity

curl -X DELETE "https://spider-staging.omniplex.gg/string/string/reviews/string" \
  -H "User-Auth: <token>"

Success

{
  "context": {
    "property1": "string",
    "property2": "string"
  },
  "message": "string"
}