openapi: 3.2.0 info: title: Sakura Internet User API version: 2.1.0 contact: name: SAKURA internet Inc. description: 'Operations tagged user across 2 of this provider''s published API definitions: iam-api.yaml, sakura-internet-iam-openapi.yml. Each path carries the servers of the definition it was published in.' servers: - url: https://secure.sakura.ad.jp/cloud/api/iam/1.0 security: - ServicePrincipalAuth: [] tags: - name: User x-displayName: ユーザ description: ユーザに関する機能 paths: /compat/users: get: operationId: listUsers tags: - User summary: ユーザ一覧を取得する parameters: - $ref: '#/components/parameters/PaginationPage' - $ref: '#/components/parameters/PaginationPerPage' - name: ordering in: query description: '並び替えキー * `code` - ユーザコード昇順 * `-code` - ユーザコード降順 ' schema: type: string enum: - code - -code responses: '200': description: 成功 content: application/json: schema: allOf: - type: object required: - items properties: items: type: array items: $ref: '#/components/schemas/User' - $ref: '#/components/schemas/Pagination' '401': description: 認証情報が無効 content: application/json: schema: $ref: '#/components/schemas/Http401Unauthorized' '403': description: アクセス権限がない content: application/json: schema: $ref: '#/components/schemas/Http403Forbidden' '429': description: APIリクエストのレートリミット超過 content: application/json: schema: $ref: '#/components/schemas/Http429TooManyRequests' post: operationId: createUser tags: - User summary: ユーザを作成する requestBody: required: true content: application/json: schema: type: object properties: name: type: string example: ユーザの名前 description: ユーザの名前 password: type: string example: '********' description: 'ユーザのパスワード 英数字とASCII標準文字における記号 !"#$%&''()*+,-./:;<=>?@[\]^_`{|}~ のみ受け付ける 英字と数字を必ず含める必要がある ' code: type: string example: user_code description: ユーザコード description: type: string example: ユーザの説明 email: type: string format: email description: SSOプロファイル有効時に外部IdPのログインで利用するメールアドレス required: - name - password - code - description responses: '201': description: 成功 content: application/json: schema: $ref: '#/components/schemas/User' '400': description: 不正なリクエスト content: application/json: schema: $ref: '#/components/schemas/Http400BadRequest' '401': description: 認証情報が無効 content: application/json: schema: $ref: '#/components/schemas/Http401Unauthorized' '403': description: アクセス権限がない content: application/json: schema: $ref: '#/components/schemas/Http403Forbidden' '409': description: ユーザコードやメールアドレスの重複 content: application/json: schema: $ref: '#/components/schemas/Http409Conflict' '429': description: APIリクエストのレートリミット超過 content: application/json: schema: $ref: '#/components/schemas/Http429TooManyRequests' '503': description: 一時的な処理エラー content: application/json: schema: $ref: '#/components/schemas/Http503ServiceUnavailable' servers: - url: https://secure.sakura.ad.jp/cloud/api/iam/1.0 /compat/users/{user_id}: parameters: - $ref: '#/components/parameters/UserID' get: operationId: readUser tags: - User summary: 指定したユーザを取得する responses: '200': description: 成功 content: application/json: schema: $ref: '#/components/schemas/User' '401': description: 認証情報が無効 content: application/json: schema: $ref: '#/components/schemas/Http401Unauthorized' '403': description: アクセス権限がない content: application/json: schema: $ref: '#/components/schemas/Http403Forbidden' '404': description: 指定したユーザが存在しない content: application/json: schema: $ref: '#/components/schemas/Http404NotFound' '429': description: APIリクエストのレートリミット超過 content: application/json: schema: $ref: '#/components/schemas/Http429TooManyRequests' put: operationId: updateUser tags: - User summary: 指定したユーザを更新する requestBody: required: true content: application/json: schema: type: object required: - name - description properties: name: type: string example: ユーザの名前 password: type: string example: '********' description: type: string example: ユーザの説明 responses: '200': description: 成功 content: application/json: schema: $ref: '#/components/schemas/User' '400': description: 不正なリクエスト content: application/json: schema: $ref: '#/components/schemas/Http400BadRequest' '401': description: 認証情報が無効 content: application/json: schema: $ref: '#/components/schemas/Http401Unauthorized' '403': description: アクセス権限がない content: application/json: schema: $ref: '#/components/schemas/Http403Forbidden' '404': description: 指定したユーザが存在しない content: application/json: schema: $ref: '#/components/schemas/Http404NotFound' '429': description: APIリクエストのレートリミット超過 content: application/json: schema: $ref: '#/components/schemas/Http429TooManyRequests' '503': description: 一時的な処理エラー content: application/json: schema: $ref: '#/components/schemas/Http503ServiceUnavailable' delete: operationId: deleteUser tags: - User summary: 指定したユーザを削除する responses: '204': description: 成功 '401': description: 認証情報が無効 content: application/json: schema: $ref: '#/components/schemas/Http401Unauthorized' '403': description: アクセス権限がない content: application/json: schema: $ref: '#/components/schemas/Http403Forbidden' '404': description: 指定したユーザが存在しない content: application/json: schema: $ref: '#/components/schemas/Http404NotFound' '429': description: APIリクエストのレートリミット超過 content: application/json: schema: $ref: '#/components/schemas/Http429TooManyRequests' '503': description: 一時的な処理エラー content: application/json: schema: $ref: '#/components/schemas/Http503ServiceUnavailable' servers: - url: https://secure.sakura.ad.jp/cloud/api/iam/1.0 /compat/users/{user_id}/register-email: parameters: - $ref: '#/components/parameters/UserID' post: operationId: registerEmail tags: - User summary: ユーザにメールアドレスを登録する requestBody: required: true content: application/json: schema: type: object required: - email properties: email: type: string description: メールアドレス example: user@example.com responses: '204': description: 成功 '401': description: 認証情報が無効 content: application/json: schema: $ref: '#/components/schemas/Http401Unauthorized' '403': description: アクセス権限がない content: application/json: schema: $ref: '#/components/schemas/Http403Forbidden' '404': description: 指定したユーザが存在しない content: application/json: schema: $ref: '#/components/schemas/Http404NotFound' '409': description: メールアドレスが重複している content: application/json: schema: $ref: '#/components/schemas/Http409Conflict' '429': description: APIリクエストのレートリミット超過 content: application/json: schema: $ref: '#/components/schemas/Http429TooManyRequests' servers: - url: https://secure.sakura.ad.jp/cloud/api/iam/1.0 /compat/users/{user_id}/unregister-email: parameters: - $ref: '#/components/parameters/UserID' post: operationId: unregisterEmail tags: - User summary: ユーザのメールアドレスを削除する responses: '204': description: 成功 '401': description: 認証情報が無効 content: application/json: schema: $ref: '#/components/schemas/Http401Unauthorized' '403': description: アクセス権限がない content: application/json: schema: $ref: '#/components/schemas/Http403Forbidden' '404': description: 指定したユーザが存在しない content: application/json: schema: $ref: '#/components/schemas/Http404NotFound' '429': description: APIリクエストのレートリミット超過 content: application/json: schema: $ref: '#/components/schemas/Http429TooManyRequests' servers: - url: https://secure.sakura.ad.jp/cloud/api/iam/1.0 components: parameters: UserID: in: path name: user_id description: ユーザID required: true schema: type: integer PaginationPage: in: query name: page schema: type: integer PaginationPerPage: in: query name: per_page schema: type: integer schemas: Http404NotFound: type: object required: - type - status - title - detail properties: type: type: string description: 問題を説明するドキュメントへのURI(基本的にはabout:blank) example: about:blank status: type: integer description: HTTPステータスコード example: 404 title: type: string description: 問題を表す簡単な文字列 example: not_found detail: type: string description: 問題の詳細を説明した文字列(人が読んで問題解決に繋がるような説明) example: 見つかりませんでした。 Http429TooManyRequests: type: object required: - type - status - title - detail properties: type: type: string description: 問題を説明するドキュメントへのURI(基本的にはabout:blank) example: about:blank status: type: integer description: HTTPステータスコード example: 429 title: type: string description: 問題を表す簡単な文字列 example: throttled detail: type: string description: 問題の詳細を説明した文字列(人が読んで問題解決に繋がるような説明) example: リクエストの処理は絞られました。 60秒後に利用可能になります。 Http503ServiceUnavailable: type: object required: - type - status - title - detail properties: type: type: string description: 問題を説明するドキュメントへのURI(基本的にはabout:blank) example: about:blank status: type: integer description: HTTPステータスコード example: 503 title: type: string description: 問題を表す簡単な文字列 example: temporary_unavailable detail: type: string description: 問題の詳細を説明した文字列(人が読んで問題解決に繋がるような説明) example: 一時的にエラーが発生しました。 Http409Conflict: type: object required: - type - status - title - detail properties: type: type: string description: 問題を説明するドキュメントへのURI(基本的にはabout:blank) example: about:blank status: type: integer description: HTTPステータスコード example: 409 title: type: string description: 問題を表す簡単な文字列 example: conflict detail: type: string description: 問題の詳細を説明した文字列(人が読んで問題解決に繋がるような説明) example: 状態の競合によりリクエストを処理できません。 Http403Forbidden: type: object required: - type - status - title - detail properties: type: type: string description: 問題を説明するドキュメントへのURI(基本的にはabout:blank) example: about:blank status: type: integer description: HTTPステータスコード example: 403 title: type: string description: 問題を表す簡単な文字列 example: permission_denied detail: type: string description: 問題の詳細を説明した文字列(人が読んで問題解決に繋がるような説明) example: このアクションを実行する権限がありません。 User: type: object required: - id - member - name - code - status - description - otp - is_security_key_registered - email - is_passwordless - created_at - updated_at properties: id: type: integer description: ユーザID readOnly: true example: 111111111111 member: type: object readOnly: true required: - id - code properties: id: type: integer description: 会員のID example: 1 code: type: string description: 会員ID(xxx00000) example: abc01234 name: type: string description: ユーザ名 example: ユーザの名前 code: type: string description: ユーザコード readOnly: true example: user_code status: type: string description: ユーザのステータス enum: - available readOnly: true example: available description: type: string description: ユーザの説明 example: ユーザの説明 otp: type: object required: - status - has_recovery_code properties: status: type: string description: 'OTP設定状態 * deactivated OTP無効状態 * activated OTP有効状態 * activating OTP有効化中 ' enum: - deactivated - activated - activating example: deactivated has_recovery_code: type: boolean description: リカバリーコード作成済みかどうか example: false is_security_key_registered: type: boolean description: セキュリティキーを登録済みかどうか email: type: string description: メールアドレス readOnly: true example: user@example.com is_passwordless: type: boolean description: パスワードレス認証かどうか readOnly: true example: false created_at: type: string description: 作成日時 readOnly: true example: 2024-05-02 16:32:23+00:00 updated_at: type: string description: 更新日時 readOnly: true example: 2024-05-02 16:32:23+00:00 Pagination: type: object required: - count - next - previous properties: count: type: integer description: データ総数 example: 100 next: type: - string - 'null' format: uri description: 次のページへのURL example: https://api.example.com/?page=3&per_page=10 previous: type: - string - 'null' format: uri description: 前のページへのURL example: https://api.example.com/?per_page=10 Http400BadRequest: type: object required: - type - status - title - detail - errors properties: type: type: string description: 問題を説明するドキュメントへのURI(基本的にはabout:blank) example: about:blank status: type: integer description: HTTPステータスコード example: 400 title: type: string description: 問題を表す簡単な文字列 example: invalid detail: type: string description: 問題の詳細を説明した文字列(人が読んで問題解決に繋がるような説明) example: 不正な入力です。 errors: type: object additionalProperties: type: array items: type: object required: - message - code properties: message: type: string description: エラー内容を説明した文字列 code: type: string description: エラーの内容を表す文字列 description: リクエストボディの特定キーに関するエラー properties: non_field_errors: type: array items: type: object required: - message - code properties: message: type: string description: エラー内容を説明した文字列 code: type: string description: エラーの内容を表す文字列 description: リクエストボディの特定キーに関係しないエラー example: key1: - message: この項目は必須です。 code: required key2: - message: 有効な値ではありません。 code: invalid key3: - message: この項目は少なくとも*文字以上にしてください。 code: min_length key4: - message: この項目が*文字より長くならないようにしてください。 code: max_length Http401Unauthorized: type: object required: - type - status - title - detail properties: type: type: string description: 問題を説明するドキュメントへのURI(基本的にはabout:blank) example: about:blank status: type: integer description: HTTPステータスコード example: 401 title: type: string description: 問題を表す簡単な文字列 example: authentication_failed detail: type: string description: 問題の詳細を説明した文字列(人が読んで問題解決に繋がるような説明) example: 認証情報が含まれていません。 securitySchemes: ServicePrincipalAuth: description: 'サービスプリンシパル認証 - サービスプリンシパルのアクセストークンを指定 ' type: http scheme: bearer ProjectApiKeyAuth: description: 'APIキー認証 - ユーザー名に発行したAPIキーのアクセストークンを指定 - パスワードに発行したAPIキーのアクセストークンシークレットを指定 ' type: http scheme: basic x-refined-from: - iam-api.yaml - sakura-internet-iam-openapi.yml