---
title: "更新知识"
method: PUT
path: "/knowledge/{id}"
tags: ["知识管理"]
---

# 更新知识

`PUT /knowledge/{id}`

更新知识条目信息

## Path parameters

- `id` string, required

## Request body

- GithubComTencentWeKnoraInternalTypesKnowledge
  - `channel` string — Channel indicates through which channel the knowledge was ingested (web, api, browser_extension, wechat, etc.)
  - `created_at` string — Creation time of the knowledge
  - `custom_metadata` integer[] — CustomMetadata is user-authored descriptive metadata. It is deliberately separate from Metadata, which contains internal ingestion state and IDs.
  - `deleted_at` GormDeletedAt
    - `time` string
    - `valid` boolean — Valid is true if Time is not NULL
  - `description` string — Description of the knowledge
  - `embedding_model_id` string — ID of the embedding model
  - `enable_status` string — Enable status of the knowledge
  - `error_message` string — Error message of the knowledge
  - `file_hash` string — File hash of the knowledge
  - `file_name` string — File name of the knowledge
  - `file_path` string — File path of the knowledge
  - `file_size` integer — File size of the knowledge
  - `file_type` string — File type of the knowledge
  - `folder_path` string — FolderPath is the canonical relative directory this entry belongs to inside the knowledge base, e.g. "docs/spec" for a folder upload of "docs/spec/design.md". Empty means the knowledge base root. It is a display/navigation concern only: it never affects where the file is physically stored (see FilePath).
  - `id` string — Unique identifier of the knowledge
  - `knowledge_base_id` string — ID of the knowledge base
  - `knowledge_base_name` string — Knowledge base name (not stored in database, populated on query)
  - `last_faq_import_result` integer[] — Last FAQ import result (for FAQ type knowledge only)
  - `metadata` integer[] — Metadata of the knowledge
  - `parse_status` string — Parse status of the knowledge
  - `pending_subtasks_count` integer — PendingSubtasksCount is the outstanding enrichment subtask count (summary + question + graph chunks). Only meaningful while ParseStatus == "finalizing"; defaults to 0 in any terminal state.
  - `processed_at` string — Processed time of the knowledge
  - `source` string — Source of the knowledge (e.g. URL address for url type, "manual" for manual type)
  - `storage_size` integer — Storage size of the knowledge
  - `summary_status` string — Summary status for async summary generation
  - `tags` GithubComTencentWeKnoraInternalTypesKnowledgeTag[] — Tags holds the tags associated with this knowledge (populated on query, not persisted directly).
    - `color` string — Optional display color
    - `created_at` string — Creation time
    - `id` string — Unique identifier of the tag (UUID)
    - `knowledge_base_id` string — Knowledge base ID that this tag belongs to
    - `name` string — Tag name, unique within the same knowledge base
    - `seq_id` integer — SeqID is an auto-increment integer ID for external API usage
    - `sort_order` integer — Sort order within the same knowledge base
    - `tenant_id` integer — Workspace ID
    - `updated_at` string — Last updated time
  - `tenant_id` integer — Workspace ID
  - `title` string — Title of the knowledge
  - `type` string — Type of the knowledge
  - `updated_at` string — Last updated time of the knowledge

## Response `200`

更新成功

- object

## Other responses

- `400` — 请求参数错误

---

[API](https://skmtc.net/tencentblueking/apis/weknora-api.md) · [All operations](https://skmtc.net/tencentblueking/apis/weknora-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/tencentblueking/weknora-api/versions/d6921ae22ce0/schema)
