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

# GET (/serviceconfigs/{scid}/hoppers/{name}/stats)

> GET (/serviceconfigs/{scid}/hoppers/{name}/stats)

# GET (/serviceconfigs/{scid}/hoppers/{name}/stats)

获取 hopper 的统计信息。

> **重要:**\
> 此方法仅供合约 103 或更高版本使用,并且每个请求都需要设置 X-Xbl-Contract-Version: 103 或更高版本的标头元素。

* [备注](#ID4ET)
* [URI 参数](#ID4E5)
* [授权](#ID4EJB)
* [HTTP 状态代码](#ID4E3C)
* [请求正文](#ID4EFD)
* [响应正文](#ID4EQD)

## 备注

此 HTTP/REST 方法在服务配置 ID (SCID) 级别从指定的 hopper 获取统计信息。此方法可通过 **Microsoft.Xbox.Services.Matchmaking.MatchmakingService.GetHopperStatisticsAsync** API 进行包装。

## URI 参数

\| 参数 | 类型 | 说明 |
\| --- | --- | --- | --- |
\| scid | GUID | 会话的服务配置标识符 (SCID)。 |
\| name | string | hopper 的名称。 |

## 授权

\| 类型 | 是否必需 | 说明 | 缺失时的响应 |
\| --- | --- | --- | --- | --- | --- | --- | --- |
\| XUID (用户 ID) | 是 | 发出请求的用户必须是票证所引用的票证会话的成员。 | 403 |
\| 权限与设备类型 | 是 | 当用户的 deviceType 设置为 console 时,只有其声明中具有多人游戏权限的用户才允许调用匹配服务。 | 403 |
\| Title ID/购买证明/设备类型 | 是 | 正在参与匹配的标题必须允许为指定的标题声明和设备类型组合进行匹配。 | 403 |

## HTTP 状态代码

服务返回适用于 MPSD 的 HTTP 状态代码。

## 请求正文

此请求正文中未发送任何对象。

## 响应正文

\| 成员 | 类型 | 说明 |
\| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
\| hopperName | string | 选定 hopper 的名称。 |
\| waitTime | 32 位有符号整数 | hopper 的平均匹配时间(整数秒)。 |
\| population | 32 位有符号整数 | hopper 中等待匹配的人数。 |

### 示例响应

```cpp theme={null}
{
      "hopperName":"contosoawesome2",
      "waitTime":30,
      "population":1
    }


```

## 另请参阅

##### 父主题

[/serviceconfigs/{scid}/hoppers/{name}/stats](https://devdocs.xbox.com/zh-CN/reference/live/rest/uri/matchtickets/uri-serviceconfigsscidhoppershoppernamestats)


## Related topics

- [XblMatchmakingGetHopperStatisticsAsync](https://devdocs.xbox.com/reference/live/xsapi-c/matchmaking_c/functions/xblmatchmakinggethopperstatisticsasync.md)
- [XblMatchmakingGetMatchTicketDetailsAsync](https://devdocs.xbox.com/reference/live/xsapi-c/matchmaking_c/functions/xblmatchmakinggetmatchticketdetailsasync.md)
