# API query to view watch history?

**URL:** https://forums.plex.tv/t/api-query-to-view-watch-history/125913
**Category:** Dev/API Corner
**Tags:** other-dev
**Created:** [December 3, 2015, 5:14pm UTC](https://forums.plex.tv/t/api-query-to-view-watch-history/125913 "2015-12-03T17:14:45Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![rycramer](https://avatars.discourse-cdn.com/v4/letter/r/3ab097/32.png) [@rycramer](https://forums.plex.tv/u/rycramer)
#### Post date: [December 3, 2015, 5:14pm UTC](https://forums.plex.tv/t/api-query-to-view-watch-history/125913/1 "2015-12-03T17:14:45Z")

</div>

Hi All,

I’ve been playing around with the Plex API and had what I thought to be a way to list the watch history using the following:

http://:32400/status/sessions/history/all

However upon closer investigation I’ve found this only returns a _partial_ result. Am I missing something? Am I issuing the command incorrectly?

---

<div class="post-metadata">

### Author: ![rycramer](https://avatars.discourse-cdn.com/v4/letter/r/3ab097/32.png) [@rycramer](https://forums.plex.tv/u/rycramer)
#### Post date: [December 3, 2015, 5:16pm UTC](https://forums.plex.tv/t/api-query-to-view-watch-history/125913/2 "2015-12-03T17:16:01Z")

</div>

FYI, my server IP precedes the port# in the example above.  
Example: [http://10.0.1.11:32400/status/sessions/history/all](http://10.0.1.11:32400/status/sessions/history/all)

---

<div class="post-metadata">

### Author: ![hthighway](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/hthighway/32/82003_2.png) [@hthighway](https://forums.plex.tv/u/hthighway)
#### Post date: [December 3, 2015, 5:20pm UTC](https://forums.plex.tv/t/api-query-to-view-watch-history/125913/3 "2015-12-03T17:20:06Z")

</div>

Plex doesn’t store watched history for very long.  
It will disappear as the log file fills up with new data.

---

<div class="post-metadata">

### Author: ![rycramer](https://avatars.discourse-cdn.com/v4/letter/r/3ab097/32.png) [@rycramer](https://forums.plex.tv/u/rycramer)
#### Post date: [December 3, 2015, 5:27pm UTC](https://forums.plex.tv/t/api-query-to-view-watch-history/125913/4 "2015-12-03T17:27:26Z")

</div>

Ah, that explains it… so the output from the API call is only a “recent history” and not a full history if I understand you correctly. If this is the case what would be the best way to begin monitoring watch history in your opinion? Should I monitor the Plex Media Server log and correlate the playqueID with a field in one of the sqlite tables that maps back to the metadata (movie title, etc)? The end goal is to simply provide a full history/analysis of what media is being played and how often.

---

<div class="post-metadata">

### Author: ![hthighway](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/hthighway/32/82003_2.png) [@hthighway](https://forums.plex.tv/u/hthighway)
#### Post date: [December 3, 2015, 5:30pm UTC](https://forums.plex.tv/t/api-query-to-view-watch-history/125913/5 "2015-12-03T17:30:09Z")

</div>

Well, it is the full history that plex has, as plex doesn’t store anything other than what is currently in the log file. And as you have seen the data in there isn’t very long.

Take a look at `PlexPy` what you want is already been developed.  
[https://forums.plex.tv/discussion/169591/plexpy-another-plex-monitoring-program/p1](https://forums.plex.tv/discussion/169591/plexpy-another-plex-monitoring-program/p1)

---

<div class="post-metadata">

### Author: ![system](https://global.discourse-cdn.com/plex/original/3X/2/a/2acb9765406f63293d357b4ec509ec39aa28f2ad.png) [@system](https://forums.plex.tv/u/system)
#### Post date: [January 8, 2020, 7:53pm UTC](https://forums.plex.tv/t/api-query-to-view-watch-history/125913/6 "2020-01-08T19:53:31Z")

</div>


