> ## 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}/sessiontemplates/{sessionTemplateName}/sessions/{sessionName})

> GET (/serviceconfigs/{scid}/sessiontemplates/{sessionTemplateName}/sessions/{sessionName})

# GET (/serviceconfigs/{scid}/sessiontemplates/{sessionTemplateName}/sessions/{sessionName})

セッション オブジェクトを取得します。

> **重要:**\
> この URI メソッドでは、すべてのリクエストにヘッダー要素 X-Xbl-Contract-Version: 104/105 以降が必要です。

* [解説](#ID4ET)
* [URI パラメーター](#ID4EMB)
* [HTTP ステータス コード](#ID4EZB)
* [リクエスト本文](#ID4E6B)
* [レスポンス本文](#ID4EKC)

## 解説

この HTTP/REST メソッドは、指定された名前のセッション ドキュメントを読み込み、セッションを取得します。成功時は、サーバーから取得された、すべての属性を持つセッション オブジェクトを返します。このメソッドは **Microsoft.Xbox.Services.Multiplayer.MultiplayerService.GetCurrentSessionAsync** によってラップできます。GET メソッドのパラメーターは、**GetCurrentSessionAsync** の *sessionReference* パラメーターで渡されるセッションの **MultiplayerSessionReference** オブジェクトで指定されるものと直接対応しています。

GET メソッドのワイヤー形式を以下に示します。

```cpp theme={null}
GET /serviceconfigs/00000000-0000-0000-0000-000000000000/sessiontemplates/quick/sessions/00000000-0000-0000-0000-000000000001 HTTP/1.1
      Content-Type: application/json

```

## URI パラメーター

\| パラメーター | 型 | 説明 |
\| --- | --- | --- | --- |
\| scid| GUID| サービス構成識別子 (SCID)。セッション識別子のパート 1。|
\| sessionTemplateName| string| セッション テンプレートの現在のインスタンスの名前。セッション識別子のパート 2。|
\| sessionName| GUID| セッションの一意の ID。セッション識別子のパート 3。|

## HTTP ステータス コード

サービスは、MPSD に適用される HTTP ステータス コードを返します。

## リクエスト本文

このリクエストの本文にはオブジェクトを送信しません。

## レスポンス本文

レスポンス構造については、[MultiplayerSession (JSON)](https://devdocs.xbox.com/ja-jp/reference/live/rest/json/json-multiplayersession) を参照してください。

## 関連項目

##### 親

[/serviceconfigs/{scid}/sessiontemplates/{sessionTemplateName}/sessions/{sessionName}](https://devdocs.xbox.com/ja-jp/reference/live/rest/uri/sessiondirectory/uri-serviceconfigsscidsessiontemplatessessiontemplatenamesessionssessionname)


## Related topics

- [XblMultiplayerSessionReferenceUri](https://devdocs.xbox.com/reference/live/xsapi-c/multiplayer_c/structs/xblmultiplayersessionreferenceuri.md)
- [XblMultiplayerSessionReference](https://devdocs.xbox.com/reference/live/xsapi-c/multiplayer_c/structs/xblmultiplayersessionreference.md)
