GET /api/reviews

Returns a list of all reviews.

Authorization Roles/Permissions: Must be logged in and have permission to view the requested resources. If the user is logged in but doesn't have permission to view certain resources, the operation works, but limited (or empty) results are returned.

This topic includes the following sections:

HTTP Method

GET

URL

https://{hostname}/api/reviews[?ReviewSubjectID={ReviewSubjectID}]
[&RetrievingUserID={RetrievingUserID}][&ItemID={ItemID}]
[&ReviewAuthorID=ReviewAuthorID][&SortBy=SortBy][&IncludeComments=IncludeComments]
[&NumberOfComments=NumberOfComments][&start=start][&count=count]

Sample Request

Request URL #1

Returns all reviews.

https://{hostname}/api/reviews

Request URL #2

Returns all reviews written by the specified user.

https://{hostname}/api/reviews?ReviewAuthorID=d4e9b5d9-bd93-4c4e-acfd-bcf23527c729.acmepaymentscorp

Sample request headers

Accept: application/json

Sample request body

Not applicable.

Request Headers

For general information on request header values, refer to HTTP Request Headers.

Header Description
Accept application/vnd.soa.v71+json, text/xml,application/vnd.soa.v71+json, application/vnd.soa.v71+xml, application/vnd.soa.v72+json, application/vnd.soa.v72+xml
Cookie AtmoAuthToken_{fedmemberid}={cookie value, which usually starts with TokenID}—The platform cookie. This is the Akana API Platform authorization token, and must be sent with every API request that requires login. For more information and an example, see Session cookies.
X-Csrf-Token_{fedmemberID} The CSRF prevention header; may or may not be required, depending on platform settings. See CSRF Prevention on the Platform. By default, the CSRF header is not required for GET operations and is required for all others, with a few exceptions relating to user login.

Request Parameters

Parameter Parm Type Data Type Required Description
ReviewSubjectID Query string Optional The unique ID for the resource being reviewed; for example, an App ID.
RetrievingUserID Query string Optional The unique UserID of the user performing a specific action.
ItemID Query string Optional

The unique ID for a specific forum entry.

If specified, results are limited to information relating to that item ID. If not specified, no filter is applied.

ReviewAuthorID Query string Optional The unique UserID for the author of the review.
SortBy Query string Optional An optional parameter allowing users to sort results by a specific value; for example, com.soa.sort.order.updated sorts with the most updated entries first. For valid values, see Sort By Values. If not specified, items are returned in the sort order of DescendingDate, which means that the most recent items are first.
IncludeComments Query boolean Optional Indicates whether comments should be included in the information returned. Default: true. If set to false, comments are excluded.
NumberOfComments Query integer Optional The number of comments to be returned (if IncludeComments is not set to false). Default value: 2.
start Query integer Optional An index number indicating the starting point for the results to be returned. If not specified, results start at position 0, the first result.
count Query integer Optional The number of results to be returned, from the specified starting point. If not specified, all matching results are returned.
IncludeSelfAuthored Query string Optional

Indicates whether resources authored by the requestor should be included.

Default: true.

PublishedState Query string Optional

Indicates that only resources in a specific state should be returned. Valid values: published or unpublished.

Default: published, indicating that only resources that have been published are returned.

IncludeActions Query boolean Optional Indicates whether workflow actions currently valid for the resource should be included in the results. Default: true. For valid workflow actions, see Workflow Actions.

Response

If successful, this operation returns HTTP status code 200, with information about the reviews. The response is in the form of an RSS feed in JSON or XML format.

Sample Response

The sample response below shows successful completion of Request #2. The response includes all reviews written by the specified user (2 reviews).

Sample response headers: application/json

Status Code: 200 OK
Content-Type: application/json
Date: Wed, 05 Jun 2013 16:10:24 GMT

Sample response body: application/json

{
  "channel" : {
    "title" : "",
    "link" : "../acmepaymentscorp#/forum/reviews",
    "description" : "",
    "startIndex" : 0,
    "itemsPerPage" : 0,
    "item" : [ {
      "title" : "Fun game!",
      "link" : "../acmepaymentscorp#/forum/review/review24109.acmepaymentscorp/details",
      "description" : "This is a really fun game. I recommend it.",
      "category" : [ {
        "value" : "REVIEW",
        "domain" : "uddi:soa.com:resourcetype"
      } ],
      "guid" : {
        "value" : "review24109.acmepaymentscorp"
      },
      "pubDate" : "2013-06-05T16:42:07.000Z",
      "AuthoringUser" : {
        "ID" : "d4e9b5d9-bd93-4c4e-acfd-bcf23527c729.acmepaymentscorp",
        "Name" : "JenniferMeadows",
        "Image" : {
          "Url" : "https://{hostname}/api/users/d4e9b5d9-bd93-4c4e-acfd-bcf23527c729.acmepaymentscorp/avatars/54855681-ba54-43f0-bc76-a300c4772b8b.png",
          "Title" : "JenniferMeadows",
          "Link" : "#/users/d4e9b5d9-bd93-4c4e-acfd-bcf23527c729.acmepaymentscorp/details"
        }
      },
      "Image" : {
        "Url" : "https://{hostname}/api/users/d4e9b5d9-bd93-4c4e-acfd-bcf23527c729.acmepaymentscorp/avatars/54855681-ba54-43f0-bc76-a300c4772b8b.png",
        "Link" : "../acmepaymentscorp#/user/d4e9b5d9-bd93-4c4e-acfd-bcf23527c729.acmepaymentscorp/details"
      },
      "CreatedDate" : "2013-06-05T16:42:07.000Z",
      "Marks" : {
        "Count" : 0,
        "IsMarkedByReader" : false
      },
      "CommentsPreview" : {
        "Count" : 0,
        "Comment" : [ ]
      },
      "EntityReference" : [ {
        "Title" : "PaaStime",
        "Guid" : "app16964.acmepaymentscorp",
        "Category" : [ {
          "value" : "app",
          "domain" : "uddi:soa.com:resourcetype"
        } ]
      }, {
        "Title" : "2.0",
        "Guid" : "4iXro2Uxs2h4LviCshR9pK9w.acmepaymentscorp",
        "Category" : [ {
          "value" : "app-version",
          "domain" : "uddi:soa.com:resourcetype"
        } ]
      } ]
    }, {
      "title" : "Great learning tool",
      "link" : "../acmepaymentscorp#/forum/review/review24085.acmepaymentscorp/details",
      "description" : "Wow, this is great. So much fun. My son played for two hours straight and I know it's helping him with his spelling.",
      "category" : [ {
        "value" : "REVIEW",
        "domain" : "uddi:soa.com:resourcetype"
      } ],
      "guid" : {
        "value" : "review24085.acmepaymentscorp"
      },
      "pubDate" : "2013-06-04T22:51:14.000Z",
      "AuthoringUser" : {
        "ID" : "d4e9b5d9-bd93-4c4e-acfd-bcf23527c729.acmepaymentscorp",
        "Name" : "JenniferMeadows",
        "Image" : {
          "Url" : "https://{hostname}/api/users/d4e9b5d9-bd93-4c4e-acfd-bcf23527c729.acmepaymentscorp/avatars/54855681-ba54-43f0-bc76-a300c4772b8b.png",
          "Title" : "JenniferMeadows",
          "Link" : "#/users/d4e9b5d9-bd93-4c4e-acfd-bcf23527c729.acmepaymentscorp/details"
        }
      },
      "Image" : {
        "Url" : "https://{hostname}/api/users/d4e9b5d9-bd93-4c4e-acfd-bcf23527c729.acmepaymentscorp/avatars/54855681-ba54-43f0-bc76-a300c4772b8b.png",
        "Link" : "../acmepaymentscorp#/user/d4e9b5d9-bd93-4c4e-acfd-bcf23527c729.acmepaymentscorp/details"
      },
      "CreatedDate" : "2013-06-04T22:51:14.000Z",
      "Marks" : {
        "Count" : 3,
        "IsMarkedByReader" : false
      },
      "CommentsPreview" : {
        "Count" : 0,
        "Comment" : [ ]
      },
      "EntityReference" : [ {
        "Title" : "Learning Puzzles",
        "Guid" : "app24056.acmepaymentscorp",
        "Category" : [ {
          "value" : "app",
          "domain" : "uddi:soa.com:resourcetype"
        } ]
      }, {
        "Title" : "1.0",
        "Guid" : "gbGPCs7Uvz4VV8D0Zuvzdq6C.acmepaymentscorp",
        "Category" : [ {
          "value" : "app-version",
          "domain" : "uddi:soa.com:resourcetype"
        } ]
      } ]
    } ]
  },
  "version" : "1.0"
}

Response Headers

For general information on response header values, refer to HTTP Response Headers.

Header Description
Content-Type application/json, application/xml, application/vnd.soa.v71+json, application/vnd.soa.v71+xml, application/vnd.soa.v72+json, application/vnd.soa.v72+xml

Response Body

The response body is in the form of an RSS channel, and includes the items listed below. The RSS version is 1.0. The Title field is empty, the Link field has a link to the reviews board on the platform, and the Description field is empty. The channel includes paging values: StartIndex and ItemsPerPage. Each item in the channel represents a review, and includes the information listed below.

Name Description
title The title given to the review by the user who wrote the reivew.
link URL for the location of the review in the platform.
description The content of the review written by the user.
category[ ]

An array of sets of two name/value pairs, each including Value and Domain, with a value for each. For example:

"value" : "REVIEW",
"domain" : "uddi:soa.com:resourcetype"

The example above indicates that the item is a review.

GUID The unique ID for a specific review.It is the ReviewID.
pubdate The date/timestamp when the information was generated.
AuthoringUser

Information about the user who authored the review, including:

  • ID: the unique UserID
  • Name: The user's name as it appears in the platform
  • Image: Information about the user's image, including URL, Title, and Link
Image Information about the image for the resource that the review is associated with, including URL and link.
CreatedDate The date/timestamp when the review was created.
CommentsPreview Information about comments on the review, including a numeric count and information about the specific comments, if applicable.
EntityReference

An array of one or more entity references for the review. Each includes:

  • Title
  • GUID: the unique ID for the item.
  • Category[ ]: An array of sets of two name/value pairs, each including Value and Domain, with a value for each.

Error Codes/Messages

If the call is unsuccessful an error code/message is returned. One or more examples of possible errors for this operation are shown below.

Item Value
401 Unauthorized. For example, you would get this response if you didn't include the custom X-Csrf-Token_{fedmemberID} header in the request, when it was required by the platform settings; or if you included an invalid or expired value for this header. You would also get this response for any operation that requires login (almost all) if the login cookie was missing.
405 Method Not Allowed. You might get this if there is an error in the URL, or if you used the wrong HTTP verb.
500 An error occurred processing the call.

More information about Akana API Platform API error messages.