2.6.4-Document File Knowledge Query Batch

1. Overview

  • Interface name: File knowledge batch query

  • Version number: v1.0.0

2. Information

  • Request method: GET

  • Request URL: https://DOMAIN/openapi/v1/knowledge/file/

  • 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

username

string

Yes

User account

knowledge_base_id

string

Yes

Knowledge Base id

file_id

int

Yes

File id

page

int

Yes

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

Has more pages

has_previous

bool

Has previous pages

max_page_num

int

Total page count

list

array

content

5. Example

Request Example:

curl 'https://_DOMAIN_/openapi/v1/knowledge/file/?username=me@host.com&knowledge_base_id=324&file_id=3028' \
-H 'Content-Type: application/json' \
-H 'cybertron-robot-key: l8ia2IOc*************Z724%2BU%3D' \
-H 'cybertron-robot-token: MTc0Mzk5****************************************cGRCUTg9' \
-X GET -d '{}'

Response example:

{
    "code": "000000",
    "message": "ok",
    "data": {
        "total": 9,
        "list": [
            {
                "id": 179718,
                "knowledge_image_list": [],
                "creator_name": "zhengdong.zhou",
                "editor_name": "zhengdong.zhou",
                "section_pk": "3028_0",
                "content": "Document: content_article.txt\n\n****Return**[[--ContentED.LRyG4bM8gq7xI9cnNfEsX5||2022 Foreign Currency Exchange Discount Activities Overview||KM1109505||Article--]]**\n---\n**Abstract**\nThis article introduces the discount details of 2Q liquid financial management or online financial management foreign exchange transactions in 2022 effective from April 1 - June 30, 2022.\n**Detailed information**\n**Promotion period**|\n**April 1 - June 30, 2022\n----\n**Promotion code**|\n* Y22-A0-SGEN0102\n**Target Customer**| **Version 1 (On-us - Targeted Usage)**\n* The total foreign currency exchange transaction amount of the customer in the first quarter of 2022 is less than HK$1 million\n* Foreign currency exchange transactions have been conducted in the past 4-6 months, but no foreign currency exchange has been exchanged in the past 3 months\n",
                "data_source": 1,
                "knowledge_image": "{}",
                "emb_status": 2,
                "create_time": "2024-07-24 17:37:28",
                "update_time": "2024-07-24 17:37:28",
                "knowledge_base": 324,
                "knowledge_file": 3028,
                "creator": 61,
                "editor": 61
            },
            {
                "id": 179719,
                "knowledge_image_list": [],
                "creator_name": "zhengdong.zhou",
                "editor_name": "zhengdong.zhou",
                "section_pk": "3028_1",
                "content": "Document: content_article.txt\n\n**Version 2 (Off-us - Acq)**\n* Customers who have not exchanged foreign currency at HSBC between October 1, 2021 - March 31, 2022\n** Discount details**| **Version 1 (On-us - Targeted Usage)***** Offer 1: Foreign currency transaction cash reward discount (up to HKD 600 cash reward)**\n* Customers who exchange foreign currency according to their category in the second quarter can receive the corresponding cash reward. Transactions can be conducted via online financial management, mobile financial management, telephone financial management or branch. | Customer category (total foreign currency exchange in the first quarter) | Cumulative foreign currency exchange in the second quarter (or equivalent foreign currency) | Cash Reward (HKD)\n---|---|---\nCategory 1 (<150K)| HKD200,000| 200\nCategory 2 (150K - < 250K)| HKD300,000| 400\n",
                "data_source": 1,
                "knowledge_image": "{}",
                "emb_status": 2,
                "create_time": "2024-07-24 17:37:28",
                "update_time": "2024-07-24 17:37:28",
                "knowledge_base": 324,
                "knowledge_file": 3028,
                "creator": 61,
                "editor": 61
            }
        ],
        "page": 1,
        "page_size": 2,
        "has_next": true,
        "has_previous": false,
        "max_page_num": 5
    }
}