Q&Aリストを取得
Q&Aリストを取得
エージェントのチャット履歴からQ&Aリストを取得します。
リクエストメソッド
GET
リクエストURL
https://api.gptbots.ai/v1/message/qa/record/page
リクエスト認証
認証の詳細は「概要」セクションをご参照ください。
リクエスト
リクエスト例
curl --location 'https://api.gptbots.ai/v1/message/qa/record/page?page=1&page_size=10&start_time=1732982400000&end_time=1735660799999&user_feedback=ALL' \
--header 'Authorization: Bearer your_apikey' \
--header 'Content-Type: application/json'
curl --location 'https://api.gptbots.ai/v1/message/qa/record/page?page=1&page_size=10&start_time=1732982400000&end_time=1735660799999&user_feedback=ALL' \
--header 'Authorization: Bearer your_apikey' \
--header 'Content-Type: application/json'
このコードブロックをポップアップで表示
リクエストヘッダー
フィールド | タイプ | 詳細 |
---|---|---|
Authorization | Bearer ${token} | 認証には Authorization: Bearer ${token} を使用してください。トークンはAPIキーページから取得できます。 |
Content-Type | application/json | データの形式は application/json を設定してください。 |
リクエストボディ
フィールド | タイプ | 必須 | 詳細 |
---|---|---|---|
user_feedback | String | 必須 | ユーザーからのフィードバック。 |
start_time | Long | 必須 | クエリ対象期間の開始時刻(タイムスタンプ形式)。QAの「質問(Q)」の時刻が対象です。 |
end_time | Long | 必須 | クエリ対象期間の終了時刻(タイムスタンプ形式)。QAの「質問(Q)」の時刻が対象です。 |
page | Integer | 必須 | ページ番号(1から開始) |
page_size | Integer | 必須 | 1ページあたりの取得件数。10〜100の範囲で指定してください。 |
レスポンス
レスポンス例
{
"qa": [
{
"id": "xxxxxx",
"q_time": 1699891200,
"q": "xxxxxx",
"a": "xxxxxx",
"user_feedback": "GOOD",
"convo_id": "xxxxxx",
"convo_type": "API",
"aid": "xxxxxx",
"user_id": "xxxxxx"
},
{
"id": "xxxxxx",
"q_time": 1699891214,
"q": "xxxxxx",
"a": "xxxxxx",
"user_feedback": "BAD",
"convo_id": "xxxxxx",
"convo_type": "API",
"aid": "xxxxxx",
"user_id": "xxxxxx"
}
]
}
{
"qa": [
{
"id": "xxxxxx",
"q_time": 1699891200,
"q": "xxxxxx",
"a": "xxxxxx",
"user_feedback": "GOOD",
"convo_id": "xxxxxx",
"convo_type": "API",
"aid": "xxxxxx",
"user_id": "xxxxxx"
},
{
"id": "xxxxxx",
"q_time": 1699891214,
"q": "xxxxxx",
"a": "xxxxxx",
"user_feedback": "BAD",
"convo_id": "xxxxxx",
"convo_type": "API",
"aid": "xxxxxx",
"user_id": "xxxxxx"
}
]
}
このコードブロックをポップアップで表示
成功時のレスポンス
フィールド名 | タイプ | 説明 |
---|---|---|
qa | Array<Object> | Q&A のリストです。 |
id | String | Q&A の一意の ID |
q_time | Long | 質問が発行された時刻のタイムスタンプ |
q | String | 質問の内容 |
a | String | 回答の内容 |
user_feedback | String | ユーザーからのフィードバック |
convo_id | String | 関連する会話の ID |
convo_type | String | 関連する会話のタイプ |
user_id | String | ユーザー ID。サードパーティ経由でエージェント開発者が指定したカスタム ID で、特定のユーザーを識別するために使用されます。 |
エラー時のレスポンス
フィールド | タイプ | 詳細 |
---|---|---|
code | Int | エラーコード |
message | String | エラーの詳細内容 |