コンテンツにスキップ

組織・ユーザー API

共通仕様

認証・エラー形式・レート制限・共通ヘッダーは API 概要・認証 を参照してください。

組織とユーザーの管理を行う API です。


ユーザー管理

プロフィール取得

GET /api/user/profile/

ユーザー詳細取得

GET /api/user/<user_id>/

ユーザー作成

POST /api/user/<user_id>/

ユーザー更新

PUT /api/user/<user_id>/

ユーザー削除

DELETE /api/user/<user_id>/

特定ユーザーのプロフィール(管理者向け)

GET /api/user/<user_id>/profile/

ユーザー情報の一括取得

複数ユーザーの情報をまとめて取得します。

POST /api/users/multiple/

リクエストボディ:

{
  "user_ids": ["user-uuid-1", "user-uuid-2", "user-uuid-3"]
}

組織管理

組織詳細取得

GET /api/user/<user_id>/organization/

レスポンス例:

{
  "name": "Security Team Alpha",
  "domain": "alpha-sec",
  "uuid": "org-uuid-xxx",
  "verified": true,
  "created_at": "2025-01-01T00:00:00Z"
}

組織メンバー一覧

POST /api/user/<user_id>/organization/

組織設定更新

PUT /api/user/<user_id>/organization/

リクエストボディ:

{
  "name": "Security Team Alpha",
  "address": "Tokyo, Japan",
  "contact_person": "Taro Yamada",
  "phone": "+81-3-1234-5678",
  "email": "security@example.com"
}

組織ユーザー一覧

GET /api/user/<user_id>/organization/users/

招待

招待メール送信

POST /api/user/<user_id>/invite/

リクエストボディ:

{
  "email": "new-member@example.com"
}

招待の承認

POST /api/accept-invitation/<token>/

API キー管理

API キー一覧

GET /api/user/<user_id>/api-key/

API キー作成

POST /api/user/<user_id>/api-key/

レスポンス例:

{
  "id": "key-001",
  "key": "sk_live_xxxxxxxxxxxxxxxxxx",
  "created_at": "2025-01-15T10:30:00Z"
}

API キーの取り扱い

key フィールドは作成時のレスポンスにのみ含まれます。 作成後は再表示できないため、安全な場所に保管してください。 API キーの権限は scope によって制御します。

特定の API キー取得

GET /api/user/<user_id>/api-key/<key_id>/

API キー削除

DELETE /api/user/<user_id>/api-key/<key_id>/

全 API キー削除

DELETE /api/user/<user_id>/api-key/

スロットリング(レート制限)

スロットル状態取得

GET /api/user/<user_id>/organization/throttle/

レスポンス例:

{
  "requests_remaining": 950,
  "requests_limit": 1000,
  "reset_at": "2025-01-15T11:00:00Z"
}

監査ログ

監査ログ検索

GET /api/user/<user_id>/organization/audit/search/

クエリパラメータ:

パラメータ 説明
query string 検索キーワード
dateFrom string 開始日時
dateTo string 終了日時
limit integer 取得件数
offset integer 開始位置

エスカレーションポリシー

一覧取得

GET /api/user/<user_id>/escalation-policies/

ポリシー作成

POST /api/user/<user_id>/escalation-policies/

ポリシー詳細取得

GET /api/user/<user_id>/escalation-policies/<policy_id>/

ポリシー更新

PUT /api/user/<user_id>/escalation-policies/<policy_id>/

テスト通知送信

POST /api/user/<user_id>/escalation-policies/<policy_id>/test/