3.2.2-Query Uploaded File Parsing Results in Chatflow

1. Overview

  • Interface Name: Query file parsing results

  • Version number: v1.0.0

2. Information

  • Request method: POST

  • Request URL: https://DOMAIN/openapi/v1/chatflow/get_file_content/

  • 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 body field:

Parameter name
Type
Required
Description

username

string

Yes

User account

file_ids

array

Yes

Collection of file IDs to be queried

is_result

bool

No

Whether to return the parsed content

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

array

message body

file_id

int

File ID

file_name

string

File name

status

int

File status: 1:uploading 2:upload finish 3:upload failed 4:parsing 5: parse finish 6:parse failed

is_parse

bool

Whether the file resolves

parse_result

array

The parsing result will have the value

5. Example

Request Example:

curl --location --request POST 'https://_DOMAIN_/openapi/v1/chatflow/get_file_content/' \
--header 'username: xxxxx' \
--header 'cybertron-robot-key: xxxxx' \
--header 'cybertron-robot-token: xxxxx' \
--header 'Content-Type: application/json' \
--data-raw '{"file_ids": [391], "is_result": true}'

Response example:

{
    "code": "000000",
    "message": "success",
    "data": [
        {
            "file_id": 34,
            "file_name": "111.html",
            "status": 5,
            "is_parse": 1,
            "parse_result": [
                "Announcement of the Bank of the World [2021]. 3"
            ]
        },
        {
            "file_id": 35,
            "file_name": "111.html",
            "status": 5,
            "is_parse": 1,
            "parse_result": [
                "\n\n| **[[--ContentED.syONDwSSexAPrBcjL3pBf5--Return to CIVR"
            ]
        }
    ]
}