> ## 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.

# POST (/batch)

> POST (/batch)

# POST (/batch)

여러 타이틀에 걸친 여러 플레이어 통계에 대한 복잡한 배치 요청에 대해 GET 메서드처럼 작동하는 POST 메서드입니다.
이러한 URI의 도메인은 `userstats.xboxlive.com`입니다.

## 설명

타이틀 개발자는 Partner Center를 사용하여 통계를 공개(open) 또는 제한(restricted)으로 표시할 수 있습니다. 순위표는 공개 통계입니다. 사용자가 샌드박스에 대해 권한이 부여된 경우, 공개 통계는 Smartglass는 물론 iOS, Android, Windows, Windows Phone 및 웹 애플리케이션에서 액세스할 수 있습니다. 샌드박스에 대한 사용자 권한은 Partner Center를 통해 관리됩니다.

* [설명](#ID4ET)
* [설명](#ID4EFB)
* [권한 부여](#ID4EUB)
* [필수 요청 헤더](#ID4ETC)
* [선택적 요청 헤더](#ID4E3D)
* [요청 본문](#ID4EAF)
* [HTTP 상태 코드](#ID4EWF)
* [응답 본문](#ID4ENBAC)

## 설명

호출자는 사용자의 배열, 서비스 구성 ID(SCID), SCID별로 검색할 통계 이름의 목록이 포함된 메시지 본문을 제공합니다.

이 복잡한 배치 모드 페이지를 읽기 전에 간단한 단일 통계 [GET](/ko/reference/live/rest/uri/userstats/uri-usersxuidscidsscidstatsget) 메서드를 검토하는 것이 더 유용할 수 있습니다.

## 권한 부여

콘텐츠 격리 및 액세스 제어 시나리오에 대해 권한 부여 논리가 구현됩니다.

* 호출자가 요청과 함께 유효한 XSTS 토큰을 제출하는 한, 순위표와 사용자 통계는 모두 모든 플랫폼의 클라이언트에서 읽을 수 있습니다. 쓰기는 명백히 에서 지원하는 클라이언트로 제한됩니다.
* 타이틀 개발자는 Partner Center를 사용하여 통계를 공개(open) 또는 제한(restricted)으로 표시할 수 있습니다. 순위표는 공개 통계입니다. 사용자가 샌드박스에 대해 권한이 부여된 경우, 공개 통계는 Smartglass는 물론 iOS, Android, Windows, Windows Phone 및 웹 애플리케이션에서 액세스할 수 있습니다. 샌드박스에 대한 사용자 권한은 Partner Center를 통해 관리됩니다.

다음 예제는 검사에 대한 의사 코드입니다.

```cpp theme={null}
If (!checkAccess(serviceConfigId, resource, CLAIM[userid, deviceid, titleid]))
{
        Reject request as Unauthorized
}

// else accept request.
         
```

## 필수 요청 헤더

| 헤더 | 형식 | 설명 |
| - | - | - |
| Authorization | string | HTTP 인증에 대한 인증 자격 증명입니다. 예시 값: “XBL3.0 x=\<userhash>;\<token>”. |

## 선택적 요청 헤더

\| 헤더| 형식| 설명|
\| --- | --- | --- | --- | --- | --- |
\| X-RequestedServiceVersion|  | 이 요청을 라우팅해야 하는 서비스의 빌드 이름/번호입니다. 헤더의 유효성, 인증 토큰의 클레임 등을 검증한 후에만 요청이 해당 서비스로 라우팅됩니다. 기본값: 1.|

## 요청 본문

### 샘플 요청

다음 POST 본문은 두 명의 서로 다른 사용자에 대해 서로 다른 두 SCID에서 네 개의 통계를 요청한다는 것을 서비스에 알립니다.

```cpp theme={null}
{    
"requestedusers": [
                1234567890123460,
                1234567890123234
            ],
            "requestedscids": [
                {
                    "scid": "c402ff50-3e76-11e2-a25f-0800200c1212",
                    "requestedstats": [
                        "Test4FirefightKills",
                        "Test4FirefightHeadshots"
                    ]
                },
                {
                    "scid": "c402ff50-3e76-11e2-a25f-0800200c0343",
                    "requestedstats": [
                        "OverallTestKills",
                        "TestHeadshots"
                    ]
                }
            ] 
}
      
```

## HTTP 상태 코드

이 리소스에서 이 메서드로 수행한 요청에 대한 응답으로 서비스는 이 섹션의 상태 코드 중 하나를 반환합니다. XBOX Live Services에서 사용되는 표준 HTTP 상태 코드의 전체 목록은 [Standard HTTP status codes](/ko/reference/live/rest/additional/httpstatuscodes)를 참고하십시오.

\| 코드| Reason phrase| 설명|
\| --- | --- | --- | --- | --- | --- | --- | --- | --- |
\| 200| OK| 세션을 성공적으로 검색했습니다.|
\| 304| Not Modified| 마지막 요청 이후 리소스가 수정되지 않았습니다.|
\| 400| Bad Request| 서비스가 잘못된 형식의 요청을 이해할 수 없습니다. 일반적으로 잘못된 매개 변수입니다.|
\| 401| Unauthorized| 요청에 사용자 인증이 필요합니다.|
\| 403| Forbidden| 사용자 또는 서비스에 대해 요청이 허용되지 않습니다.|
\| 404| Not Found| 지정된 리소스를 찾을 수 없습니다.|
\| 406| Not Acceptable| 리소스 버전이 지원되지 않습니다.|
\| 408| Request Timeout| 리소스 버전이 지원되지 않습니다. MVC 계층에서 거부해야 합니다.|

## 응답 본문

### 샘플 응답

```cpp theme={null}
{    
   "users":[          
       {    
	  "xuid": "123456789"
        "gamertag": "WarriorSaint",
        "scids":[
          {
             "scid":"c402ff50-3e76-11e2-a25f-0800200c1212",
             "stats":  [
		  {
		         "statname":"Test4FirefightKills",
		         "type":"Integer",
		         "value":7
             },
		  {
		         "statname":"Test4FirefightHeadshots",
		         "type":"Integer",
		         "value":4
             }]
                        },
          {
             "scid":"c402ff50-3e76-11e2-a25f-0800200c0343",
             "stats":  [
		  {
		         "statname":"OverallTestKills",
		         "type":"Integer",
		         "value":3434
             },
		  {
		         "statname":"TestHeadshots",
		         "type":"Integer",
		         "value":41
             }]
          }],
                   },
    {    
                   "gamertag":"TigerShark",
                   "xuid":1234567890123234
        "scids":[
          {
             "scid":"123456789",
             "stats":  [
		  {
		         "statname":"Test4FirefightKills",
		         "type":"Integer",
		         "value":63
             },
		  {
		         "statname":"Test4FirefightHeadshots",
		         "type":"Integer",
		         "value":12
             }]
                        },
          {
"scid":"987654321",
             "stats":  [
		  {
		         "statname":"OverallTestKills",
		         "type":"Integer",
		         "value":375
             },
		  {
		         "statname":"TestHeadshots",
		         "type":"Integer",
		         "value":34
             }]
          }],
                   }]
}
         
```

## 참고 항목

##### 상위

[/batch](/ko/reference/live/rest/uri/userstats/uri-batch)


## Related topics

- [XblUserStatisticsGetMultipleUserStatisticsAsync](/reference/live/xsapi-c/user_statistics_c/functions/xbluserstatisticsgetmultipleuserstatisticsasync.md)
- [XblUserStatisticsGetMultipleUserStatisticsForMultipleServiceConfigurationsAsync](/reference/live/xsapi-c/user_statistics_c/functions/xbluserstatisticsgetmultipleuserstatisticsformultipleserviceconfigurationsasync.md)
