> ## Documentation Index
> Fetch the complete documentation index at: https://docs.devin.ai/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>
  「Billing 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">
  ### リクエスト例 - 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>

一般的なエラーの例:

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