# Reviews

The Reviews endpoint allows viewing reviews and comments. This end point allows reviews to be viewed for Apps, Stories OR Pathways. &#x20;

{% hint style="info" %}
Streams items do not use the reviews endpoint, instead use the `/analytics/stream-ratings` endpoint.
{% endhint %}

## Available Reviews Endpoints

`v1/analytics/reviews/apps`\
Get reviews for all content published for an app or a list of apps.

`v1/analytics/reviews/pathways`\
Get reviews for a pathway or a list of pathways.

`v1/analytics/reviews/stories`\
Get reviews for a story or a list of stories.

## Parameters <a href="#parameters" id="parameters"></a>

The items parameter allows you to filter items based on the name or ID of the item. If the item parameter is not provided the endpoint will return the latest 10 items.

## Parameters <a href="#parameters" id="parameters"></a>

The items parameter allows you to filter items based on the name or ID of the item. If the item parameter is not provided the endpoint will return the latest 10 items.

<table><thead><tr><th width="194"></th><th></th></tr></thead><tbody><tr><td><strong>Key</strong></td><td><strong>Value</strong></td></tr><tr><td><strong>items</strong></td><td><strong>Array of Strings</strong> <br>Item name or ID</td></tr></tbody></table>

## Examples

### Get All Content Reviews On An App

The example below retrieves all story and pathway reviews for a given app.

```
curl -X POST \
  v1/analytics/reviews/apps \
  -H 'Authorization: Basic <Your Base64 Encoded Token>'\
  -d '{
    "items" : ["Falkor"]
  }'
```

### Get Reviews On Several Stories

The example below retrieves reviews for a collection of stories.&#x20;

```
curl -X POST \
  v1/analytics/reviews/stories \
  -H 'Authorization: Basic <Your Base64 Encoded Token>'\
  -d '{
    "items" : ["Story A","Story B","Story C",...]
  }'
```

## Success Response

Whichever `reviews` endpoint you are using a successful response will return an array of items with each item containing a context item (app, pathway or story) and corresponding `reviews` data. The example below shows a successful response when using the `reviews/apps` endpoint.

### Review Item

|              |                                                                                                        |
| ------------ | ------------------------------------------------------------------------------------------------------ |
| **Key**      | **Value**                                                                                              |
| **Ratings**  | <p><strong>Object</strong><br>With average rating and number of users that have rated the content.</p> |
| **Comments** | **Array Comment Items**                                                                                |

### Comment Item

|               |                                           |
| ------------- | ----------------------------------------- |
| **Key**       | **Value**                                 |
| **firstname** | String                                    |
| **lastname**  | String                                    |
| **email**     | String                                    |
| **telephone** | String                                    |
| **country**   | String                                    |
| **city**      | String                                    |
| **comment**   | String                                    |
| **timestamp** | String                                    |
| **item**      | <p>Object<br>The related content item</p> |

```
{
    "status": "success",
    "data": [
        {
            "app": {
                "name": "Falkor",
                "version": "2.10.1",
                "type": "app",
                "ID": "io.falkor.demo"
            },
            "reviews": {
                "ratings": {
                    "average": 4.3,
                    "users": 10427
                },
                "comments": [
                    {
                        "firstname": "User",
                        "lastname": "One",
                        "email": "user.one@acme.com",
                        "telephone": "",
                        "country": "United Kingdom",
                        "city": "London",
                        "rating": 4,
                        "comment": "This is great thanks! 😀",
                        "timestamp": "2021-03-12T16:59:42+02:00",
                        "item": {
                            "type": "story",
                            "name": "Workplace Culture"
                        }
                    },
                    {
                        "firstname": "User",
                        "lastname": "Two",
                        "email": "user.two@acme.com",
                        "telephone": "",
                        "country": "********",
                        "city": "********",
                        "rating": 5,
                        "comment": "This was very informative - 5 Stars",
                        "timestamp": "2021-03-12T16:12:06+02:00",
                        "item": {
                            "type": "pathway",
                            "name": "Onboarding Pathway"
                        }
                    },
                    ...etc
                ]
            }
        },
        ...etc
    ],
    "hash": "67d5e81356c9ad8f419e38cfbbb6b396",
    "response_time": 0.19236993789672852
}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://everyday-digital.gitbook.io/falkor-dev-docs/analytics/reviews.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
