mirror of
https://github.com/langgenius/dify-docs.git
synced 2026-03-27 13:28:32 +07:00
docs(api): add end-user lookup (#684)
* docs(api): add end-user lookup * update zh and ja docs --------- Co-authored-by: RiskeyL <7a8y@163.com>
This commit is contained in:
@@ -136,6 +136,35 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/end-users/{end_user_id}": {
|
||||
"get": {
|
||||
"summary": "获取终端用户",
|
||||
"description": "通过 ID 获取终端用户信息。\n\n当其他 API 返回终端用户 ID(例如文件上传接口返回的 `created_by`)时,可使用该接口查询对应的终端用户信息。",
|
||||
"operationId": "getEndUserChatCn",
|
||||
"tags": ["终端用户"],
|
||||
"parameters": [
|
||||
{
|
||||
"name": "end_user_id",
|
||||
"in": "path",
|
||||
"required": true,
|
||||
"description": "终端用户 ID。",
|
||||
"schema": { "type": "string", "format": "uuid" }
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "成功获取终端用户信息。",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": { "$ref": "#/components/schemas/EndUserDetailCn" }
|
||||
}
|
||||
}
|
||||
},
|
||||
"404": { "$ref": "#/components/responses/EndUserNotFoundCn" },
|
||||
"500": { "$ref": "#/components/responses/InternalServerErrorCn" }
|
||||
}
|
||||
}
|
||||
},
|
||||
"/files/{file_id}/preview": {
|
||||
"get": {
|
||||
"summary": "文件预览",
|
||||
@@ -589,7 +618,8 @@
|
||||
"S3ErrorFileCn": { "description": "S3 存储服务错误。可能原因:s3_connection_failed, s3_permission_denied, s3_file_too_large。", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponseCn" } } } },
|
||||
"InternalServerErrorCn": { "description": "服务内部异常。", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponseCn" } } } },
|
||||
"SuccessResultCn": { "description": "操作成功。", "content": { "application/json": { "schema": { "type": "object", "properties": { "result": { "type": "string", "example": "success" } } } } } },
|
||||
"ConversationNotFoundCn": { "description": "对话不存在。", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponseCn" } } } }
|
||||
"ConversationNotFoundCn": { "description": "对话不存在。", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponseCn" } } } },
|
||||
"EndUserNotFoundCn": { "description": "终端用户不存在。错误码:`end_user_not_found`", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponseCn" } } } }
|
||||
},
|
||||
"schemas": {
|
||||
"BasicChatRequestCn": {
|
||||
@@ -707,6 +737,21 @@
|
||||
"UsageCn": { "type": "object", "description": "模型用量信息。", "properties": { "prompt_tokens": { "type": "integer" }, "prompt_unit_price": { "type": "string" }, "prompt_price_unit": { "type": "string" }, "prompt_price": { "type": "string" }, "completion_tokens": { "type": "integer" }, "completion_unit_price": { "type": "string" }, "completion_price_unit": { "type": "string" }, "completion_price": { "type": "string" }, "total_tokens": { "type": "integer" }, "total_price": { "type": "string" }, "currency": { "type": "string" }, "latency": { "type": "number", "format": "double" } } },
|
||||
"RetrieverResourceCn": { "type": "object", "description": "引用和归属分段信息。", "properties": { "position": { "type": "integer" }, "dataset_id": { "type": "string", "format": "uuid" }, "dataset_name": { "type": "string" }, "document_id": { "type": "string", "format": "uuid" }, "document_name": { "type": "string" }, "segment_id": { "type": "string", "format": "uuid" }, "score": { "type": "number", "format": "float" }, "content": { "type": "string" } } },
|
||||
"FileUploadResponseCn": { "type": "object", "description": "文件上传成功后的响应。", "properties": { "id": { "type": "string", "format": "uuid", "description": "ID。" }, "name": { "type": "string", "description": "文件名。" }, "size": { "type": "integer", "description": "文件大小 (byte)。" }, "extension": { "type": "string", "description": "文件后缀。" }, "mime_type": { "type": "string", "description": "文件 mime-type。" }, "created_by": { "type": "string", "format": "uuid", "description": "上传人 ID。" }, "created_at": { "type": "integer", "format": "int64", "description": "上传时间。" } } },
|
||||
"EndUserDetailCn": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": { "type": "string", "format": "uuid" },
|
||||
"tenant_id": { "type": "string", "format": "uuid" },
|
||||
"app_id": { "type": "string", "format": "uuid", "nullable": true },
|
||||
"type": { "type": "string", "example": "service_api" },
|
||||
"external_user_id": { "type": "string", "nullable": true },
|
||||
"name": { "type": "string", "nullable": true },
|
||||
"is_anonymous": { "type": "boolean" },
|
||||
"session_id": { "type": "string" },
|
||||
"created_at": { "type": "string", "format": "date-time" },
|
||||
"updated_at": { "type": "string", "format": "date-time" }
|
||||
}
|
||||
},
|
||||
"MessageFeedbackRequestCn": { "type": "object", "required": ["user"], "properties": { "rating": { "type": "string", "enum": ["like", "dislike", null], "nullable": true, "description": "点赞 'like', 点踩 'dislike', 撤销点赞 null。" }, "user": { "type": "string", "description": "用户标识。" }, "content": { "type": "string", "nullable": true, "description": "消息反馈的具体信息。" } } },
|
||||
"AppFeedbacksResponseCn": { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/components/schemas/FeedbackItemCn" }, "description": "返回该APP的点赞、反馈列表。" } } },
|
||||
"FeedbackItemCn": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid" }, "app_id": { "type": "string", "format": "uuid" }, "conversation_id": { "type": "string", "format": "uuid" }, "message_id": { "type": "string", "format": "uuid" }, "rating": { "type": "string", "enum": ["like", "dislike", null], "nullable": true }, "content": { "type": "string" }, "from_source": { "type": "string" }, "from_end_user_id": { "type": "string", "format": "uuid" }, "from_account_id": { "type": "string", "format": "uuid", "nullable": true }, "created_at": { "type": "string", "format": "date-time" }, "updated_at": { "type": "string", "format": "date-time" } } },
|
||||
@@ -756,6 +801,7 @@
|
||||
"tags": [
|
||||
{ "name": "对话消息", "description": "与对话消息和交互相关的操作。" },
|
||||
{ "name": "文件操作", "description": "文件上传和预览相关的操作。" },
|
||||
{ "name": "终端用户", "description": "终端用户信息相关的操作。" },
|
||||
{ "name": "消息反馈", "description": "用户对消息的反馈操作。" },
|
||||
{ "name": "会话管理", "description": "管理对话会话相关的操作。" },
|
||||
{ "name": "语音与文字转换", "description": "文本转语音和语音转文本操作。" },
|
||||
|
||||
Reference in New Issue
Block a user