feat: Service API - add end-user lookup endpoint (#32015)

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
This commit is contained in:
盐粒 Yanli
2026-02-09 14:01:22 +08:00
committed by yyh
parent 6f50915d2b
commit a303560b98
21 changed files with 986 additions and 4 deletions

View File

@ -736,6 +736,71 @@ import { Row, Col, Properties, Property, Heading, SubProperty, Paragraph } from
---
<Heading
url='/end-users/:end_user_id'
method='GET'
title='エンドユーザーを取得'
name='#end-user'
/>
<Row>
<Col>
エンドユーザー ID からエンドユーザー情報を取得します。
他の API がエンドユーザー IDファイルアップロードの `created_by`)を返す場合に利用できます。
### パスパラメータ
- `end_user_id` (uuid) 必須
エンドユーザー ID。
### レスポンス
EndUser オブジェクトを返します。
- `id` (uuid) ID
- `tenant_id` (uuid) テナント ID
- `app_id` (uuid) アプリ ID
- `type` (string) エンドユーザー種別
- `external_user_id` (string) 外部ユーザー ID
- `name` (string) 名前
- `is_anonymous` (boolean) 匿名ユーザーかどうか
- `session_id` (string) セッション ID
- `created_at` (string) ISO 8601 日時
- `updated_at` (string) ISO 8601 日時
### エラー
- 404, `end_user_not_found`, エンドユーザーが見つかりません
- 500, 内部サーバーエラー
</Col>
<Col sticky>
### リクエスト例
<CodeGroup
title="Request"
tag="GET"
label="/end-users/:end_user_id"
targetCode={`curl -X GET '${props.appDetail.api_base_url}/end-users/6ad1ab0a-73ff-4ac1-b9e4-cdb312f71f13' \\
--header 'Authorization: Bearer {api_key}'`}
/>
### レスポンス例
<CodeGroup title="Response">
```json {{ title: 'Response' }}
{
"id": "6ad1ab0a-73ff-4ac1-b9e4-cdb312f71f13",
"tenant_id": "8c0f3f3a-66b0-4b55-a0bf-8b8e0d6aee7d",
"app_id": "6c8c3f41-2c6f-4e1b-8f4f-7f11c8f2ad2a",
"type": "service_api",
"external_user_id": "abc-123",
"name": "Alice",
"is_anonymous": false,
"session_id": "abc-123",
"created_at": "2024-01-01T00:00:00Z",
"updated_at": "2024-01-01T00:00:00Z"
}
```
</CodeGroup>
</Col>
</Row>
---
<Heading
url='/workflows/logs'
method='GET'
@ -1047,4 +1112,3 @@ import { Row, Col, Properties, Property, Heading, SubProperty, Paragraph } from
</Col>
</Row>
___