# 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      | Fixed`application/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:

```bash
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:

```json
{
    "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"
            ]
        }
    ]
}
```
