Reviews

Update or Create a Review

put
/api/resources/{resourceId}/reviews/self

Create or update a user's review for a resource. You cannot create multiple reviews for a single user on a resource. If a user tries to create a second review on a resource it will just update their first review. You must provide a textual review, rating, or both. A 200 status code is returned upon a successful update and a 201 status code is returned on successful creation.

Example:

  curl -X PUT -H "X-Session-ID: 0123456789" -H "Content-Type:application/json" --data @data.json "https://lor.instructure.com/api/resources/9cd972bef89b9fc7de6357a473f845db/reviews/self"
  data.json:
  {
    "body": "I find your lack of faith disturbing",
    "rating": 1
  }
Authorizations
x-session-idstringRequired

Session authentication. The session ID can be provided in any of the following ways: [Cookie: 'session'] [Header: 'x-session-id'] [Query parameter: 'session-id'] [Query parameter: first value of 'state'] [Body property: 'sessionId']

Path parameters
resourceIdstringRequired

The id of the resource to review

Body
anyOptional
or
anyOptional
Responses
chevron-right
200

Review updated successfully

application/json
bodystringOptional

The text of the review

createDatestring · date-timeOptional

The date the review was created (ISO date string)

resourceIdstringOptional

The id of resource the review was created for

ratingintegerOptional

The number rating given for the resource in this review (1-5)

updateDatestring · date-timeOptional

The date the review was last updated (ISO date string)

userAvatarUrlstringOptional

The url for the avatar of the user who created the review

userFullNamestringOptional

The full name of the user who created the review

userIdstringOptional

The id of the user who created the review

voteCountintegerOptional

The number of times the review has been upvoted by other Commons users

put
/api/resources/{resourceId}/reviews/self

Get a Review

get
/api/resources/{resourceId}/reviews/self

Get a review for the resource that was authored by the current user.

Example:

  curl -X GET -H "X-Session-ID: 0123456789" "https://lor.instructure.com/api/resources/9cd972bef89b9fc7de6357a473f845db/reviews/self"
Authorizations
x-session-idstringRequired

Session authentication. The session ID can be provided in any of the following ways: [Cookie: 'session'] [Header: 'x-session-id'] [Query parameter: 'session-id'] [Query parameter: first value of 'state'] [Body property: 'sessionId']

Path parameters
resourceIdstringRequired

The id of the resource to get the review for

Responses
chevron-right
200

Review found

application/json
bodystringOptional

The text of the review

createDatestring · date-timeOptional

The date the review was created (ISO date string)

resourceIdstringOptional

The id of resource the review was created for

ratingintegerOptional

The number rating given for the resource in this review (1-5)

updateDatestring · date-timeOptional

The date the review was last updated (ISO date string)

userAvatarUrlstringOptional

The url for the avatar of the user who created the review

userFullNamestringOptional

The full name of the user who created the review

userIdstringOptional

The id of the user who created the review

voteCountintegerOptional

The number of times the review has been upvoted by other Commons users

get
/api/resources/{resourceId}/reviews/self

Destroy Review by This User

delete
/api/resources/{resourceId}/reviews/self

Destroy a user's review for this resource.

Example:

  curl -X DELETE -H "X-Session-ID: 0123456789" "https://lor.instructure.com/api/resources/9cd972bef89b9fc7de6357a473f845db/reviews/self"
Authorizations
x-session-idstringRequired

Session authentication. The session ID can be provided in any of the following ways: [Cookie: 'session'] [Header: 'x-session-id'] [Query parameter: 'session-id'] [Query parameter: first value of 'state'] [Body property: 'sessionId']

Path parameters
resourceIdstringRequired

The id of the resource to delete the review for

Responses
delete
/api/resources/{resourceId}/reviews/self

No content

List Reviews for a Resource

get
/api/resources/{resourceId}/reviews

List reviews for the specified resource.

curl -H "X-Session-ID: 0123456789" "https://lor.instructure.com/api/resources/0123456789/reviews?cursor=abcdefg"

Authorizations
x-session-idstringRequired

Session authentication. The session ID can be provided in any of the following ways: [Cookie: 'session'] [Header: 'x-session-id'] [Query parameter: 'session-id'] [Query parameter: first value of 'state'] [Body property: 'sessionId']

Path parameters
resourceIdstringRequired

The id of the resource to list reviews for

Query parameters
cursorstringOptional

An identifier from a prior query to continue retrieving results for

Responses
chevron-right
200

List of reviews for a resource

application/json
get
/api/resources/{resourceId}/reviews

Last updated

Was this helpful?