> ## Documentation Index
> Fetch the complete documentation index at: https://docs.windsurf.com/llms.txt
> Use this file to discover all available pages before exploring further.

# 利用上限設定の取得

> Enterprise の請求管理のために、チーム、グループ、または個々のユーザーのスコープで照会されるユーザーごとのアドオンクレジット利用上限設定を取得します。

<div id="overview">
  ## 概要
</div>

組織の現在のユーザー単位のアドオン用クレジット上限設定を取得します。上限は常にユーザー単位です。チームまたはグループのスコープで照会すると、レスポンスには、そのチームまたはグループに属するユーザーに適用されているユーザー単位の上限が返されます。

<div id="request">
  ## リクエスト
</div>

<ParamField body="service_key" type="string" required>
  「請求 Read」権限を持つサービスキー
</ParamField>

<div id="scope-configuration-choose-one">
  ### スコープ設定（いずれか1つを選択）
</div>

<ParamField body="team_level" type="boolean">
  チーム内のすべてのユーザーに適用されるユーザーごとの上限を取得するには、`true` を設定します
</ParamField>

<ParamField body="group_id" type="string">
  グループ ID を指定して、特定のグループ内のすべてのユーザーに適用されるユーザーごとの上限を取得します
</ParamField>

<ParamField body="user_email" type="string">
  メールアドレスを指定して、特定のユーザーの設定を取得します
</ParamField>

<Info>
  スコープを定義するには、`team_level`、`group_id`、`user_email` のいずれか1つを指定する必要があります。
</Info>

<div id="example-request-get-per-user-cap-for-all-users-on-team">
  ### リクエスト例 - チーム内全ユーザーのユーザーごとの上限値を取得
</div>

```bash theme={null}
curl -X POST --header "Content-Type: application/json" \
--data '{
  "service_key": "your_service_key_here",
  "team_level": true
}' \
https://server.codeium.com/api/v1/GetUsageConfig
```

<div id="example-request-get-per-user-cap-for-all-users-in-a-group">
  ### リクエスト例：グループ内の全ユーザーのユーザー別上限の取得
</div>

```bash theme={null}
curl -X POST --header "Content-Type: application/json" \
--data '{
  "service_key": "your_service_key_here",
  "group_id": "engineering_team"
}' \
https://server.codeium.com/api/v1/GetUsageConfig
```

<div id="example-request-get-user-configuration">
  ### リクエスト例 - ユーザー設定の取得
</div>

```bash theme={null}
curl -X POST --header "Content-Type: application/json" \
--data '{
  "service_key": "your_service_key_here",
  "user_email": "user@example.com"
}' \
https://server.codeium.com/api/v1/GetUsageConfig
```

<div id="response">
  ## レスポンス
</div>

<ResponseField name="addOnCreditCap" type="integer">
  設定されているアドオンのクレジット上限値。このフィールドがレスポンスに含まれていない場合、リクエストされたスコープレベルでは上限は設定されていません。
</ResponseField>

<div id="example-response-with-cap-configured">
  ### レスポンス例 - 上限を設定した場合
</div>

```json theme={null}
{
  "addOnCreditCap": 10000
}
```

<div id="example-response-no-cap-configured">
  ### レスポンス例 - 上限未設定時
</div>

```json theme={null}
{}
```

<div id="error-responses">
  ## エラーレスポンス
</div>

一般的なエラーシナリオ：

* 無効なサービスキーまたは権限不足
* 複数の scope パラメーターが指定されている
* scope パラメーターが指定されていない
* 無効なグループ ID またはユーザーのメールアドレス
* レート制限を超過した
