2.5.2-Paragraph Text Knowledge Modify

1. Overview

  • Interface name: Paragraph text knowledge modification

  • Version number: v1.0.0

2. Information

  • Request method: PUT

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

  • 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

id

int

Yes

Paragraph text id

knowledge_base_id

string

Yes

Knowledge Base id

text_content

string

Yes

Paragraph text content

knowledge_image

array

No

Knowledge-related pictures (returned image name is required through the uploading platform for the image upload interface)

knowledge_attachment

array

No

Knowledge-related attachments

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

id

int

paragraph text id

5. Example

Request Example:

curl 'https://_DOMAIN_/openapi/v1/knowledge/text/' \
-H 'Content-Type: application/json' \
-H 'cybertron-robot-key: l8ia2IOc************Z724%2BU%3D' \
-H 'cybertron-robot-token: MTc0Mzk5************************************************cGRCUTg9' \
-X PUT -d '{
    "username": "me@host.com",
    "id": 3033,
    "knowledge_base_id": "324",
    "text_content": "v1 ****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",
    "knowledge_image": [
        "172180700265d0ffb0-e821-44f4-9a12-be289220b151.jpeg"
    ],
    "knowledge_attachment": [
        "172180700265d0ffb0-e821-44f4-9a12-be289220b151.jpeg"
    ]
}'

Response example:

{
    "code": "000000",
    "message": "Knowledge has been entered, and is being studied...",
    "data": {
        "id": 3033,
        "response_create_time": "2024-07-24 16:57",
        "response_update_time": "2024-07-24 17:00",
        "response_knowledge_provider": "zhengdong.zhou",
        "response_editor": "zhengdong.zhou",
        "response_data_source": "Manual entry",
        "response_knowledge_image": [
            "api/app/cybertron/knowledge_file/image/knowledge/paragraph_text_img/172180700265d0ffb0-e821-44f4-9a12-be289220b151.jpeg"
        ],
        "text_content": "v1 ****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",
        "data_source": 1,
        "create_time": "2024-07-24 16:57:31",
        "update_time": "2024-07-24 17:00:09",
        "knowledge_image": "{\"172180700265d0ffb0-e821-44f4-9a12-be289220b151.jpeg\": \"172180700265d0ffb0-e821-44f4-9a12-be289220b151.jpeg\"}",
        "emb_status": 1,
        "folder": 2902,
        "knowledge_base": 324,
        "knowledge_provider": 61,
        "editor": 61
    }
}