# Http access to Plex Media server

**URL:** <https://forums.plex.tv/t/http-access-to-plex-media-server/1830>\
**Category:** Dev/API Corner\
**Tags:** other-dev\
**Created:** [May 22, 2009, 8:36pm UTC](https://forums.plex.tv/t/http-access-to-plex-media-server/1830 "2009-05-22T20:36:43Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jurgen](https://avatars.discourse-cdn.com/v4/letter/j/779978/32.png) [@Jurgen](https://forums.plex.tv/u/Jurgen)\
**Post date:** [May 22, 2009, 8:36pm UTC](https://forums.plex.tv/t/http-access-to-plex-media-server/1830/1 "2009-05-22T20:36:43Z")

</div>

description of how to access Mediaserver databases via http
All,  
  
Does anybody know how I can access the music and video databases as used by the Plex Media server?  
The current http api only foresees access to the xbmc databases. It works but I would prefer to use the databases of the Plex Media server. Especially as Plex is departing from support of the xbmc database ??! .. looking to the "Now Playing" option which only works for music selected from iTunes (read Plex Media server), all music selected from the 'old' 'xbmc' database just shows a grey screen........  
  
Thanks already for your reply.  
  
Rgds  
  
PS starting to play a file using http api generates an error .. but stills starts to play the file ;-)

---

<div class="post-metadata">

**Author:** ![jam](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/jam/32/186050_2.png) [@jam](https://forums.plex.tv/u/jam)\
**Post date:** [May 22, 2009, 9:15pm UTC](https://forums.plex.tv/t/http-access-to-plex-media-server/1830/2 "2009-05-22T21:15:46Z")

</div>

The media server accepts standard HTTP requests, and responds with either XML directory listings or actual content. Simply use Firefox (or a HTTP client that displays the XML - Safari doesn’t do this) and hit [http://localhost:32400](http://localhost:32400), and you should start getting directory lists back. The “key” attribute of the items specifies which path to go to next, e.g. [http://localhost:32400/music](http://localhost:32400/music), [http://localhost:32400/music/iTunes](http://localhost:32400/music/iTunes), etc.

---

<div class="post-metadata">

**Author:** ![Jurgen](https://avatars.discourse-cdn.com/v4/letter/j/779978/32.png) [@Jurgen](https://forums.plex.tv/u/Jurgen)\
**Post date:** [May 23, 2009, 8:44am UTC](https://forums.plex.tv/t/http-access-to-plex-media-server/1830/3 "2009-05-23T08:44:21Z")

</div>

EXCELLENT!  
  
  
  
I was looking for this!.. it does mean I have to fully rewrite my processing and query process on the Pronto but this is what I needed!!  
  
  
  
Thanks again!

---

<div class="post-metadata">

**Author:** ![cmspooner\_gmail.com](https://avatars.discourse-cdn.com/v4/letter/c/bcef8e/32.png) [@cmspooner\_gmail.com](https://forums.plex.tv/u/cmspooner_gmail.com)\
**Post date:** [November 22, 2011, 4:32am UTC](https://forums.plex.tv/t/http-access-to-plex-media-server/1830/4 "2011-11-22T04:32:47Z")

</div>

Is there anyway to get/set the current position that the file is at? I am writing a set of tools to keep my iTunes library in sync with my Plex library. I am using itunes.py to handle the iTunes end of things. I have successfully removed deleted items from the iTunes library and will use this info for marking items as watched/unwatched; but I think it would be great if I started watching a video in Plex on my laptop, and then finished in iTunes on my mac mini hooked to my tv.

---

<div class="post-metadata">

**Author:** ![wutname1](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/wutname1/32/142638_2.png) [@wutname1](https://forums.plex.tv/u/wutname1)\
**Post date:** [November 22, 2011, 6:24am UTC](https://forums.plex.tv/t/http-access-to-plex-media-server/1830/5 "2011-11-22T06:24:04Z")

</div>

> [@](#):
>
> Is there anyway to get/set the current position that the file is at? I am writing a set of tools to keep my iTunes library in sync with my Plex library. I am using itunes.py to handle the iTunes end of things. I have successfully removed deleted items from the iTunes library and will use this info for marking items as watched/unwatched; but I think it would be great if I started watching a video in Plex on my laptop, and then finished in iTunes on my mac mini hooked to my tv.

  
  
  
The only way to write data back into the plex database is by using SQLite and modifying the database directly if you want to know more see my post here: http://forums.plexapp.com/index.php/topic/33378-plex-database-access/page\_\_view\_\_findpost\_\_p\_\_213611 the API as is now only lets you read the DB since all the API does is display the DB in XML format

---

<div class="post-metadata">

**Author:** ![jam](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/jam/32/186050_2.png) [@jam](https://forums.plex.tv/u/jam)\
**Post date:** [November 22, 2011, 4:23pm UTC](https://forums.plex.tv/t/http-access-to-plex-media-server/1830/6 "2011-11-22T16:23:20Z")

</div>

This isn’t true. The web-based media manager uses the HTTP API to make all modifications to the database, and the clients send back modifications to view count & offset etc. I suggest you watch the logs while using these features to see how it’s done. We do not recommend modifying the database directly - none of our apps do 🙂

---

<div class="post-metadata">

**Author:** ![alon.albert](https://avatars.discourse-cdn.com/v4/letter/a/278dde/32.png) [@alon.albert](https://forums.plex.tv/u/alon.albert)\
**Post date:** [November 30, 2011, 6:04pm UTC](https://forums.plex.tv/t/http-access-to-plex-media-server/1830/7 "2011-11-30T18:04:44Z")

</div>

> [@](#):
>
> This isn't true. The web-based media manager uses the HTTP API to make all modifications to the database, and the clients send back modifications to view count & offset etc. I suggest you watch the logs while using these features to see how it's done. We do not recommend modifying the database directly - none of our apps do :)

  
Is there some documentation anywhere for the XML API? Asking developers to reverse engineer from the logs is a very poor documentation strategy, for example, I am interested in how to mark an item watched/unwatched so I played it and then examined the logs and found this:  
  
  

```auto

<br />
Nov 30, 2011 09:58:22 [14708] DEBUG - Request: GET /:/scrobble?key=161&identifier=com.plexapp.plugins.library [127.0.0.1] (1 live)<br />
Nov 30, 2011 09:58:22 [14708] DEBUG - * key => 161<br />
Nov 30, 2011 09:58:22 [14708] DEBUG - * identifier => com.plexapp.plugins.library<br />
Nov 30, 2011 09:58:22 [14708] DEBUG - Library item 161 'The Kingsroad' got played!<br />

```

  
  
  
Is this how an item gets marked as watched? What does scrobble stand for? Is it possible to mark it as unwacthed?

---

<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:** [December 20, 2019, 8:27pm UTC](https://forums.plex.tv/t/http-access-to-plex-media-server/1830/8 "2019-12-20T20:27:00Z")

</div>

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
