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

# MultiplayerSessionRequest (JSON)

> MultiplayerSessionRequest (JSON)

# MultiplayerSessionRequest (JSON)

针对 **MultiplayerSession** 对象的操作所传递的请求 JSON 对象。

MultiplayerSessionRequest JSON 对象具有以下规范。

| 成员 | 类型 | 说明 |
| - | - | - |
| constants | object | 与会话模板合并以生成会话常量的只读设置。 |
| properties | object | 要合并到会话属性中的更改。 |
| members.me | object | 常量和属性,其工作方式与顶层同名项非常相似。任何 PUT 方法都要求用户是会话的成员,如有必要会将该用户添加进来。如果将 “me” 指定为 null,则会将发出请求的成员从会话中移除。 |
| members | object | 表示要添加到会话中的用户的其他对象,以从零开始的索引作为键。请求中的成员数始终从 0 开始,即使会话已经包含成员也是如此。成员按其在请求中出现的顺序添加到会话中。成员属性只能由属于自己的用户设置。 |
| servers | object | 指示对会话所关联服务器参与者集合的更新和添加的值。如果将某服务器指定为 null,则会将该服务器项从会话中移除。 |

## 请求结构

```json theme={null}
{
  "constants": { /* Property Bag */ },
  "properties": { /* Property Bag */ },
  "members": {
    // Requires a service principal. Existing members can be deleted by index.
    // Not available on large sessions.
    "5": null,

    // Reservation requests must start with zero. New users will get added in order to the end of the session's member list.
    // Large sessions don't support reservations.
    "reserve_0": {
      "constants": { /* Property Bag */ }
    },
    "reserve_1": {
      "constants": { /* Property Bag */ }
    },

    // Requires a user principal with a xuid claim. Can be 'null' to remove myself from the session.
    "me": {
      "constants": { /* Property Bag */ },
      "properties": { /* Property Bag */ },
    }
  },

  // Requires a server principal.
  "servers": {
    // Can be any name. The value can be 'null' to remove the server from the session.
    "name": {
      "constants": {  /* Property Bag */ },
      "properties": {  /* Property Bag */ }
    }
  }
}
```

## 另请参阅

##### 父主题

[JavaScript 对象表示法 (JSON) 对象参考](/zh-CN/reference/live/rest/json/atoc-xboxlivews-reference-json)

##### 参考

[MultiplayerSession (JSON)](/zh-CN/reference/live/rest/json/json-multiplayersession)

[PUT (/serviceconfigs/{scid}/sessiontemplates/{sessionTemplateName}/sessions/{sessionName})](/zh-CN/reference/live/rest/uri/sessiondirectory/uri-serviceconfigsscidsessiontemplatessessiontemplatenamesessionssessionnameput)


## Related topics

- [Multiplayer FAQ and troubleshooting](/services/xbox-services/multiplayer/mpsd/concepts/live-multiplayer-2015-faq.md)
- [Perguntas frequentes e solução de problemas de multiplayer](/pt-BR/services/xbox-services/multiplayer/mpsd/concepts/live-multiplayer-2015-faq.md)
- [FAQ et résolution des problèmes multijoueurs](/fr-CA/services/xbox-services/multiplayer/mpsd/concepts/live-multiplayer-2015-faq.md)
- [Multiplayer Session Directory overview](/services/xbox-services/multiplayer/mpsd/live-mpsd-overview.md)
- [Preguntas frecuentes y solución de problemas de multijugador](/es/services/xbox-services/multiplayer/mpsd/concepts/live-multiplayer-2015-faq.md)
