GET /api/reviews

Returns a list of all reviews.

Authorization Roles/Permissions:   Anyone can use this operation; login is not required. However, note that for any operations that do not require login, information about private resources is not returned unless the user is logged in and is authorized to view information about those resources. Without login, only public information is returned.

This topic includes the following sections:

HTTP Method

GET

Back to top

URL

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

Back to top

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
X-Csrf-Token_{tenant}: {TokenID}

Sample request body

Not applicable.

Back to top

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
X-Csrf-Token_{fedmemberID} The CSRF prevention header; may or may not be required, depending on platform settings. See CSRF Prevention on the Platform.

Back to top

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.

Back to top

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.

Back to top

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"
}

Sample response body: application/xml

<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:ns2="http://soa.com/xsd/business/1.0" xmlns:ns3="http://soa.com/xsd/user/1.0" xmlns:ns4="http://soa.com/xsd/rss/1.0" xmlns:ns5="http://soa.com/xsd/comment/1.0" xmlns:ns6="http://a9.com/-/spec/opensearch/1.1/" xmlns:ns7="http://soa.com/xsd/resource/1.0" xmlns:ns8="http://soa.com/xsd/fault/1.0" xmlns:ns9="http://soa.com/xsd/api/1.0" xmlns:ns10="http://soa.com/xsd/board/1.0" version="1.0">
  <channel>
    <title></title>
    <link>../acmepaymentscorp#/forum/reviews</link>
    <description></description>
    <ns6:startIndex>0</ns6:startIndex>
    <ns6:itemsPerPage>0</ns6:itemsPerPage>
    <item>
      <title>Fun game!</title>
      <link>../acmepaymentscorp#/forum/review/review24109.acmepaymentscorp/details</link>
      <description>This is a really fun game. I recommend it.</description>
      <category domain="uddi:soa.com:resourcetype">REVIEW</category>
      <guid>review24109.acmepaymentscorp</guid>
      <pubDate>2013-06-05T16:42:07.000Z</pubDate>
      <ns4:Image>
        <Url>https://{hostname}/api/users/d4e9b5d9-bd93-4c4e-acfd-bcf23527c729.acmepaymentscorp/avatars/54855681-ba54-43f0-bc76-a300c4772b8b.png</Url>
        <Link>../acmepaymentscorp#/user/d4e9b5d9-bd93-4c4e-acfd-bcf23527c729.acmepaymentscorp/details</Link>
      </ns4:Image>
      <ns4:CreatedDate>2013-06-05T16:42:07.000Z</ns4:CreatedDate>
      <ns4:Marks>
        <Count>0</Count>
        <IsMarkedByReader>false</IsMarkedByReader>
      </ns4:Marks>
      <ns5:CommentsPreview>
        <ns5:Count>0</ns5:Count>
      </ns5:CommentsPreview>
      <ns4:AuthoringUser>
        <ID>d4e9b5d9-bd93-4c4e-acfd-bcf23527c729.acmepaymentscorp</ID>
        <Name>JenniferMeadows</Name>
        <ns4:Image>
          <Url>https://{hostname}/api/users/d4e9b5d9-bd93-4c4e-acfd-bcf23527c729.acmepaymentscorp/avatars/54855681-ba54-43f0-bc76-a300c4772b8b.png</Url>
          <Title>JenniferMeadows</Title>
          <Link>#/users/d4e9b5d9-bd93-4c4e-acfd-bcf23527c729.acmepaymentscorp/details</Link>
        </ns4:Image>
      </ns4:AuthoringUser>
      <ns4:EntityReference>
        <Title>PaaStime</Title>
        <Guid>app16964.acmepaymentscorp</Guid>
        <ns4:Category domain="uddi:soa.com:resourcetype">app</ns4:Category>
      </ns4:EntityReference>
      <ns4:EntityReference>
        <Title>2.0</Title>
        <Guid>4iXro2Uxs2h4LviCshR9pK9w.acmepaymentscorp</Guid>
        <ns4:Category domain="uddi:soa.com:resourcetype">app-version</ns4:Category>
      </ns4:EntityReference>
    </item>
    <item>
      <title>Great learning tool</title>
      <link>../acmepaymentscorp#/forum/review/review24085.acmepaymentscorp/details</link>
      <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.</description>
      <category domain="uddi:soa.com:resourcetype">REVIEW</category>
      <guid>review24085.acmepaymentscorp</guid>
      <pubDate>2013-06-04T22:51:14.000Z</pubDate>
      <ns4:Image>
        <Url>https://{hostname}/api/users/d4e9b5d9-bd93-4c4e-acfd-bcf23527c729.acmepaymentscorp/avatars/54855681-ba54-43f0-bc76-a300c4772b8b.png</Url>
        <Link>../acmepaymentscorp#/user/d4e9b5d9-bd93-4c4e-acfd-bcf23527c729.acmepaymentscorp/details</Link>
      </ns4:Image>
      <ns4:CreatedDate>2013-06-04T22:51:14.000Z</ns4:CreatedDate>
      <ns4:Marks>
        <Count>3</Count>
        <IsMarkedByReader>false</IsMarkedByReader>
      </ns4:Marks>
      <ns5:CommentsPreview>
        <ns5:Count>0</ns5:Count>
      </ns5:CommentsPreview>
      <ns4:AuthoringUser>
        <ID>d4e9b5d9-bd93-4c4e-acfd-bcf23527c729.acmepaymentscorp</ID>
        <Name>JenniferMeadows</Name>
        <ns4:Image>
          <Url>https://{hostname}/api/users/d4e9b5d9-bd93-4c4e-acfd-bcf23527c729.acmepaymentscorp/avatars/54855681-ba54-43f0-bc76-a300c4772b8b.png</Url>
          <Title>JenniferMeadows</Title>
          <Link>#/users/d4e9b5d9-bd93-4c4e-acfd-bcf23527c729.acmepaymentscorp/details</Link>
        </ns4:Image>
      </ns4:AuthoringUser>
      <ns4:EntityReference>
        <Title>Learning Puzzles</Title>
        <Guid>app24056.acmepaymentscorp</Guid>
        <ns4:Category domain="uddi:soa.com:resourcetype">app</ns4:Category>
      </ns4:EntityReference>
      <ns4:EntityReference>
        <Title>1.0</Title>
        <Guid>gbGPCs7Uvz4VV8D0Zuvzdq6C.acmepaymentscorp</Guid>
        <ns4:Category domain="uddi:soa.com:resourcetype">app-version</ns4:Category>
      </ns4:EntityReference>
    </item>
  </channel>
</rss>

Back to top

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

Back to top

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.

Back to top

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.
405 Method Not Allowed. For example, you might get this if you specified an invalid Accept header or omitted a required Content-Type header.
500 An error occurred processing the call.

More information about Akana API Platform API error messages.

Back to top

Related Topics