# 5.2-Feedback Query Openapi

## 1. Overview

* **Interface name**: Query interface
* **Version number**: v1.0.0

## 2. Information

* **Request method**: GET
* **Request URL**: https\://*DOMAIN*/openapi/v1/conversation/get\_conversation\_segment\_history/
* **Domain**: *Refer to "Service address description"*

## 3. Request parameters

Request header http header field:

| Parameter name        | Type   | Required | Description             |
| --------------------- | ------ | -------- | ----------------------- |
| Content-Type          | string | Yes      | Fixed`application/json` |
| cybertron-robot-key   | string | Yes      | Robot key               |
| cybertron-robot-token | string | Yes      | Robot token             |

Request query field:

| Parameter name | Type   | Required | Description                                            |
| -------------- | ------ | -------- | ------------------------------------------------------ |
| user\_code     | string | Yes      | User account                                           |
| segment\_code  | string | Yes      | Session id                                             |
| page           | int    | No       | Number of pages, default is 1                          |
| pagesize       | int    | No       | The number of results returned per page, default is 10 |

## 4. Response field description

HTTP status code: 200 OK

Response field description:

| Field Name      | Type   | Description                                                                             |
| --------------- | ------ | --------------------------------------------------------------------------------------- |
| code            | string | "000000" is normal, other exceptions                                                    |
| message         | string | Status description                                                                      |
| data            | object | message body                                                                            |
| total           | int    | Total record number                                                                     |
| page            | int    | Current page number                                                                     |
| page\_size      | int    | Records per page                                                                        |
| has\_next       | bool   | Is it possible to turn the page backwards                                               |
| has\_previous   | bool   | Can I turn the page forward                                                             |
| max\_page\_num  | int    | Total page count                                                                        |
| list            | array  | content                                                                                 |
| id              | int    | message id                                                                              |
| segment\_code   | string | session id                                                                              |
| dialog\_id      | string | dialog id (one question and answer in dialog, one question and answer in dialog stream) |
| message\_source | string | Source                                                                                  |
| feedback        | int    | Feedback 0: Not commented 1: Like 2: Not like                                           |

## 5. Example

Request Example:

```bash
curl 'https://_DOMAIN_/openapi/v1/conversation/get_conversation_segment_history/?user_code=test1&segment_code=123' \
-H 'Content-Type: application/json' \
-H 'cybertron-robot-key: l8ia2IOc************Z724%2BU%3D' \
-H 'cybertron-robot-token: MTc0Mzk5************************************************cGRCUTg9' \
-X GET
```

Response example:

```json
{
    "code": "000000",
    "message": "ok",
    "data": {
        "total": 0,
        "list": [],
        "page": 0,
        "page_size": 0,
        "has_next": false,
        "has_previous": false,
        "max_page_num": 0
    }
}
```
