获取知识详情
获取知识文档详细信息,包括知识名称、类型、大小、令牌计数、更新者。 (-- api-linter: core::0131::response-message-name=disabled aip.dev/not-precedent: We need to do this because reasons. --)
Path Parameters
dataset_id string required
知识库ID。
document_id string required
知识ID。
Responses
- 200
- default
OK
application/json
Schema
Example (from schema)
Schema
document_id string
知识ID
display_name string
知识名称
type enum
知识类型
document_size int64
知识大小
token_count int64
令牌计数
segment_count int64
段落计数
dataset_id string
知识库ID
dataset_display string
知识库名称
p_id string
父知识ID
data_source_type enum
数据源类型
creator string
知识创建者
create_time date-time
创建时间。
update_time date-time
更新时间
segments object[]
uri string
文档在OSS中的预签名URI
{
"document_id": "string",
"display_name": "string",
"type": 0,
"document_size": 0,
"token_count": 0,
"segment_count": 0,
"dataset_id": "string",
"dataset_display": "string",
"p_id": "string",
"data_source_type": 0,
"creator": "string",
"create_time": "2025-04-11T06:11:38.474Z",
"update_time": "2025-04-11T06:11:38.474Z",
"segments": [
{
"segment_id": "string",
"dataset_id": "string",
"document_id": "string",
"content": "string",
"token_count": 0,
"number": 0,
"metadata": {
"key_words": [
"string"
],
"image_name_value": "string",
"image_size": 0,
"table_name_value": "string",
"table_rows": 0,
"table_columns": [
"string"
],
"score": 0
},
"words": 0,
"segment_type": 0,
"table_content": "string",
"image_key": "string",
"image_uri": "string",
"display_type": 0,
"image_keys": "string",
"display_content": "string"
}
],
"uri": "string"
}
Default error response
application/json
Schema
Example (from schema)
Schema
code int32
The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code].
message string
A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the [google.rpc.Status.details][google.rpc.Status.details] field, or localized by the client.
details object[]
{
"code": 0,
"message": "string",
"details": [
{
"@type": "string"
}
]
}
GET /v1/datasets/:dataset_id/documents/:document_id
Authorization
name: bearerAuthtype: httpscheme: bearer
Request
Request
curl / cURL
curl -L -X GET 'https://aidmp.cn-sh-01.sensecoreapi.cn/studio/rag/data/v1/datasets/:dataset_id/documents/:document_id' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <TOKEN>'
python / requests
curl -L -X GET 'https://aidmp.cn-sh-01.sensecoreapi.cn/studio/rag/data/v1/datasets/:dataset_id/documents/:document_id' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <TOKEN>'
go / native
curl -L -X GET 'https://aidmp.cn-sh-01.sensecoreapi.cn/studio/rag/data/v1/datasets/:dataset_id/documents/:document_id' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <TOKEN>'
nodejs / axios
curl -L -X GET 'https://aidmp.cn-sh-01.sensecoreapi.cn/studio/rag/data/v1/datasets/:dataset_id/documents/:document_id' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <TOKEN>'
ruby / Net::HTTP
curl -L -X GET 'https://aidmp.cn-sh-01.sensecoreapi.cn/studio/rag/data/v1/datasets/:dataset_id/documents/:document_id' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <TOKEN>'
csharp / RestSharp
curl -L -X GET 'https://aidmp.cn-sh-01.sensecoreapi.cn/studio/rag/data/v1/datasets/:dataset_id/documents/:document_id' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <TOKEN>'
php / cURL
curl -L -X GET 'https://aidmp.cn-sh-01.sensecoreapi.cn/studio/rag/data/v1/datasets/:dataset_id/documents/:document_id' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <TOKEN>'
java / OkHttp
curl -L -X GET 'https://aidmp.cn-sh-01.sensecoreapi.cn/studio/rag/data/v1/datasets/:dataset_id/documents/:document_id' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <TOKEN>'
powershell / RestMethod
curl -L -X GET 'https://aidmp.cn-sh-01.sensecoreapi.cn/studio/rag/data/v1/datasets/:dataset_id/documents/:document_id' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <TOKEN>'