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

# PresenceRecord (JSON)

> PresenceRecord (JSON)

# PresenceRecord (JSON)

單一使用者線上狀態的相關資料。

## PresenceRecord

PresenceRecord 物件具有下列規格。

| 成員 | 類型 | 描述 |
| - | - | - |
| xuid | string | 目標使用者的 XBOX 使用者識別碼 (XUID)。所提供的狀態資料屬於此使用者。 |
| devices | [DeviceRecord](https://docs.xbox.com/zh-TW/reference/live/rest/json/json-devicerecord.md) 陣列 | 使用者的裝置記錄清單。 |
| state | string | 使用者在 XBOX LIVE 上的活動。可能的值：<ul><li>Online：使用者至少有一筆裝置記錄。</li><li>Away：使用者已登入 XBOX LIVE，但未在任何遊戲中處於使用狀態。</li><li>Offline：使用者未出現在任何裝置上。</li></ul> |
| lastSeen | [LastSeenRecord](https://docs.xbox.com/zh-TW/reference/live/rest/json/json-lastseenrecord.md) | 只有在使用者沒有有效的 DeviceRecord 時，才會提供上次上線資訊。如果物件已從快取中移除，則可能不會傳回其資料，因為沒有永續性存放區。 |

## 範例 JSON 語法

```json theme={null}
{
  xuid:"0123456789",
  state:"online",
  devices:
  [{
    type:"D",
    titles:
    [{
      id:"12341234",
      name:"Contoso 5",
      state:"active",
      placement:"fill",
      timestamp:"2012-09-17T07:15:23.4930000",
      activity:
      {
        richPresence:"Team Deathmatch on Nirvana"
      }
    },
    {
      id:"12341235",
      name:"Contoso Waypoint",
      timestamp:"2012-09-17T07:15:23.4930000",
      placement:"snapped",
      state:"active",
      activity:
      {
        richPresence:"Using radar"
      }
    }]
  },
  {
    type:"W8",
    titles:
    [{
      id:"23452345",
      name:"Contoso Gamehelp",
      state:"active",
      placement:"full",
      timestamp:"2012-09-17T07:15:23.4930000",
      activity:
      {
        richPresence:"Nirvana page"
      }
    }]
  }]
}

```

## 另請參閱

##### 上層

[JavaScript Object Notation (JSON) 物件參考](https://docs.xbox.com/zh-TW/reference/live/rest/json/atoc-xboxlivews-reference-json.md)

##### 參考

[POST (/users/batch)](https://docs.xbox.com/zh-TW/reference/live/rest/uri/presence/uri-usersbatchpost.md)

[GET (/users/me)](https://docs.xbox.com/zh-TW/reference/live/rest/uri/presence/uri-usersmeget.md)

[DELETE (/users/xuid({xuid})/devices/current/titles/current)](https://docs.xbox.com/zh-TW/reference/live/rest/uri/presence/uri-usersxuiddevicescurrenttitlescurrentdelete.md)

[GET (/users/xuid({xuid}))](https://docs.xbox.com/zh-TW/reference/live/rest/uri/presence/uri-usersxuidget.md)


## Related topics

- [XblSocialManagerPresenceRecordIsUserPlayingTitle](https://docs.xbox.com/zh-TW/reference/live/xsapi-c/social_manager_c/functions/xblsocialmanagerpresencerecordisuserplayingtitle.md)
- [Presence URI](https://docs.xbox.com/zh-TW/reference/live/rest/uri/presence/atoc-reference-presence.md)
- [GET (/users/me/groups/{moniker} )](https://docs.xbox.com/zh-TW/reference/live/rest/uri/presence/uri-usersmegroupsmonikerget.md)
- [GET (/users/xuid({xuid})/groups/{moniker} )](https://docs.xbox.com/zh-TW/reference/live/rest/uri/presence/uri-usersxuidgroupsmonikerget.md)
- [GET (/users/xuid({xuid})/groups/{moniker}/broadcasting )](https://docs.xbox.com/zh-TW/reference/live/rest/uri/presence/uri-usersxuidgroupsmonikerbroadcastingget.md)
