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

# PresenceRecord (JSON)

> PresenceRecord (JSON)

# PresenceRecord (JSON)

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

<a id="ID4EN" />

## PresenceRecord

PresenceRecord 物件具有下列規格。

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

<a id="ID4E2C" />

## 範例 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"
      }
    }]
  }]
}

```

<a id="ID4EED" />

## 另請參閱

<a id="ID4EGD" />

##### 上層

[JavaScript Object Notation (JSON) 物件參考](/zh-TW/reference/live/rest/json/atoc-xboxlivews-reference-json)

<a id="ID4EQD" />

##### 參考

[POST (/users/batch)](/zh-TW/reference/live/rest/uri/presence/uri-usersbatchpost)

[GET (/users/me)](/zh-TW/reference/live/rest/uri/presence/uri-usersmeget)

[DELETE (/users/xuid({xuid})/devices/current/titles/current)](/zh-TW/reference/live/rest/uri/presence/uri-usersxuiddevicescurrenttitlescurrentdelete)

[GET (/users/xuid({xuid}))](/zh-TW/reference/live/rest/uri/presence/uri-usersxuidget)


## Related topics

- [XblSocialManagerPresenceRecordIsUserPlayingTitle](/reference/live/xsapi-c/social_manager_c/functions/xblsocialmanagerpresencerecordisuserplayingtitle.md)
- [Updating a user's Presence via REST](/services/xbox-services/community/presence/how-to/live-updating-presence-rest.md)
