> For the complete documentation index, see [llms.txt](https://docs.ggwp.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.ggwp.com/jp/apidokyumento-2/sukoa-batchi.md).

# 評判スコア: バッチ

\[ ベース URL: `api.ggwp.com`]

`POST` /users/v1/reputation-score

## **説明**

Reputation Score API を使用すると、すべてのユーザーの最新の評判スコアを CSV 形式で取得できます。ファイルは URL からダウンロード可能で、URL はメール、Webhook サブスクリプション、またはその両方で返されます。CSV には、ユーザー ID、ユーザー名、現在の評判スコアに加えて、各ユーザーのポジティブ、ネガティブ、エンゲージメントの指標も含まれます。評判スコアはゲーム内でのユーザーの行動から算出され、150 から 850 の範囲で、値が低いほどより有害またはネガティブな行動を示します。

注意:&#x20;

1. CSV の URL は生成時刻から 30 分間有効です。
2. ユーザー数が 1,000,000 を超える場合、データは複数の CSV ファイルに分割されます。

## **パラメータ**

`ボディ`: 次のフィールドを含む辞書:

* **mode**: CSV 配信のモード。対応値: `all`, `email`, `webhook`
  * 選択する場合 `webhook`、以下を設定してください [Webhook](/jp/webhook.md) システムを設定し、次のイベントを購読してください [Player Reputation Score Batch イベント](https://docs.ggwp.com/jp/apidokyumento-2/pages/596cc55347ea91c99beee26efe90c0925209b295#id-6.-player-reputation-score-batch)
* （任意） **email**: CSV 配信用のメールアドレス。mode が次の場合にのみ適用されます `all`/`email`
* （任意） **score\_range:** 入力範囲内の評判スコアを持つすべてのプレイヤーを返します。有効な入力範囲は 150 から 850 です。
  * 例:&#x20;
    * `"score_range": "bw:150-850"`&#x20;
    * `"score_range": "bw:150-250"`&#x20;
    * `"score_range": "bw:550-850"`
* （任意） **sanction\_status** : プレイヤーの制裁ステータスでフィルタします。このパラメーターは複数の値を受け取れます。複数の値が渡された場合、API はそれらの間に OR 演算子を適用します。
  * 対応値:
    * `chat_active`
    * `chat_muted`
    * `chat_session_muted`
    * `discord_active`
    * `discord_muted`
    * `game_active`
    * `game_muted`
  * 例：&#x20;
    * `"sanction_status": "in:'chat_active','game_active'"`&#x20;

サンプル呼び出し:

```bash
curl --request POST 'https://api.ggwp.com/users/v1/reputation-score' \
--header 'x-api-key: api_key' \\
--header 'Content-Type: application/json' \\
--data-raw '{
    "mode": "email",
    "email": "abc@xyz.com",
    "score_range": "bw:150-850",
    "sanction_status": "in:'\''chat_muted'\'','\''game_muted'\''"
}'
```

## **出力**

* 200 - 成功した操作

```json
{"success": true}
```

* 403
  * 無効な API キー、または API キーがありません
* 404
  * UserInvalid または 'mode' が不足しています - mode が見つからない場合provided
  * メールアドレスがありません - email id が指定されていない場合
  * Webhook イベントが購読されていません - reputation-score 用の webhook が購読されていない場合。
* 500
  * エラーレスポンス。レピュテーションスコアを取得できませんでした

#### 注：

* 配信モードとして webhook を選択した場合、Webhook の応答は次の形式になります:

```
{
  "type": "player-reputation-batch-export",
  "event_id": "<event_id>",
  "created_at": "2024-10-06 16:30:09",
  "data": {
    "csv_urls": [
      "csv_url_1",
      "csv_url_2"
    ]
  }
}
```
