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

Fixedapplication/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:

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:

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