このページの内容
APIリファレンス: テナント管理
テナントエンドポイント
テナント情報取得
特定のテナントの詳細情報を取得します。
エンドポイント: GET /tenant/{tenantId}
パラメータ:
| Name | Type | Location | Required | Description |
|---|---|---|---|---|
| tenantId | string | path | Yes | テナントのユニークID |
レスポンス:
{
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"displayName": "My Company",
"createdAt": "2024-01-15T10:30:00Z",
"plan": "professional"
}
テナント情報更新
テナントの表示名などの設定を更新します。
エンドポイント: PUT /tenant/{tenantId}
パラメータ:
| Name | Type | Location | Required | Description |
|---|---|---|---|---|
| tenantId | string | path | Yes | テナントのユニークID |
リクエストボディ:
{
"displayName": "New Company Name"
}
レスポンス: 更新後のテナントオブジェクトが返されます。
テナント利用統計取得
テナントの利用統計を取得します。
エンドポイント: GET /tenant/{tenantId}/statistics
パラメータ:
| Name | Type | Location | Required | Description |
|---|---|---|---|---|
| tenantId | string | path | Yes | テナントのユニークID |
レスポンス:
{
"processCount": 15,
"datasetCount": 8,
"userCount": 5,
"storageUsedBytes": 1073741824
}
テナントユーザーエンドポイント
テナントユーザー一覧取得
テナントにアクセスできる全ユーザーを取得します。
エンドポイント: GET /tenant/{tenantId}/users
パラメータ:
| Name | Type | Location | Required | Description |
|---|---|---|---|---|
| tenantId | string | path | Yes | テナントのユニークID |
レスポンス:
[
{
"id": "b2c3d4e5-f6a7-8901-bcde-f23456789012",
"email": "user@example.com",
"firstName": "John",
"lastName": "Doe",
"createdAt": "2024-01-15T10:30:00Z",
"lastLoginAt": "2024-03-01T14:00:00Z",
"tenantId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"isActiveInTenant": true,
"isAdminInTenant": false,
"isDeveloperInTenant": false,
"organizationId": "c3d4e5f6-a7b8-9012-cdef-345678901234",
"isActiveInOrganization": true,
"isAdminInOrganization": false
}
]
テナントユーザー追加
新しいユーザーをテナントに追加します。ユーザーが存在しない場合は新規作成され、すでにアカウントがある場合はテナントに参加します。レスポンスでユーザーIDが返却されます。
エンドポイント: POST /tenant/{tenantId}/users
パラメータ:
| Name | Type | Location | Required | Description |
|---|---|---|---|---|
| tenantId | string | path | Yes | テナントのユニークID |
リクエストボディ:
{
"email": "newuser@example.com",
"firstName": "John",
"lastName": "Doe",
"isAdminInTenant": false,
"isActiveInTenant": true,
"isDeveloperInTenant": false
}
| Field | Type | Required | Description |
|---|---|---|---|
| string | Yes | ユーザーのメールアドレス | |
| firstName | string | No | ユーザーの名 |
| lastName | string | No | ユーザーの姓 |
| isAdminInTenant | boolean | No | テナント内管理者権限 |
| isActiveInTenant | boolean | No | テナントで有効かどうか |
| isDeveloperInTenant | boolean | No | テナント内開発者権限 |
レスポンス:
{
"id": "b2c3d4e5-f6a7-8901-bcde-f23456789012",
"message": "User added to tenant."
}
テナントユーザー権限更新
テナント内のユーザー権限を更新します。
エンドポイント: PUT /tenant/{tenantId}/users
リクエストボディ:
{
"userId": "b2c3d4e5-f6a7-8901-bcde-f23456789012",
"tenantId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"isAdminInTenant": true,
"isActiveInTenant": true,
"isDeveloperInTenant": false
}
| Field | Type | Required | Description |
|---|---|---|---|
| userId | string | Yes | ユーザーのユニークID |
| tenantId | string | Yes | テナントのユニークID |
| isAdminInTenant | boolean | No | 管理者権限かどうか |
| isActiveInTenant | boolean | No | テナント内で有効か |
| isDeveloperInTenant | boolean | No | 開発者権限かどうか |
レスポンス:
{
"message": "User tenant settings updated."
}
テナントユーザー削除
ユーザーのテナントへのアクセス権を削除します。
エンドポイント: DELETE /tenant/{tenantId}/users
リクエストボディ:
{
"userId": "b2c3d4e5-f6a7-8901-bcde-f23456789012",
"tenantId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
}
| Field | Type | Required | Description |
|---|---|---|---|
| userId | string | Yes | 削除するユーザーのユニークID |
| tenantId | string | Yes | テナントのユニークID |
レスポンス:
{
"message": "User removed from tenant."
}