# On Deck via API?

**URL:** <https://forums.plex.tv/t/on-deck-via-api/136293>\
**Category:** Dev/API Corner\
**Tags:** other-dev\
**Created:** [February 22, 2016, 2:22pm UTC](https://forums.plex.tv/t/on-deck-via-api/136293 "2016-02-22T14:22:56Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![jaffab](https://avatars.discourse-cdn.com/v4/letter/j/e495f1/32.png) [@jaffab](https://forums.plex.tv/u/jaffab)\
**Post date:** [February 22, 2016, 2:22pm UTC](https://forums.plex.tv/t/on-deck-via-api/136293/1 "2016-02-22T14:22:56Z")

</div>

Hi All,

Does anybody know if the ‘on deck’ list can be manipulated via an API? I have my own home-brew home automation system which contains a catalogue of my movies and suggests movies based on when it was last watched etc (no, I dont want to use plex for this) - but when a movie is selected, I would like to put the movie on deck.

I can find plenty of API calls to LIST items from plex, but not many to poke information back into the system.

Anybody?

---

<div class="post-metadata">

**Author:** ![jaffab](https://avatars.discourse-cdn.com/v4/letter/j/e495f1/32.png) [@jaffab](https://forums.plex.tv/u/jaffab)\
**Post date:** [February 29, 2016, 8:13pm UTC](https://forums.plex.tv/t/on-deck-via-api/136293/2 "2016-02-29T20:13:42Z")

</div>

Bounce bounce. Anybody? No way of doing this?

Plex, can it be added to the API system?

---

<div class="post-metadata">

**Author:** ![dontshowmyemail](https://avatars.discourse-cdn.com/v4/letter/d/8dc957/32.png) [@dontshowmyemail](https://forums.plex.tv/u/dontshowmyemail)\
**Post date:** [March 4, 2018, 9:43pm UTC](https://forums.plex.tv/t/on-deck-via-api/136293/3 "2018-03-04T21:43:14Z")

</div>

A year late, but I’ve been waiting for this a long time, too. Finally had the endurance to find a solution:

You need to make two calls:

```
/:/timeline?ratingKey=$key&state=playing&time=60000&duration=$duration&X-Plex-Client-Identifier=$plexClientIdentifier

```

(immediately) followed by

```
/:/timeline?ratingKey=$key&state=stopped&time=120000&duration=$duration&X-Plex-Client-Identifier=$plexClientIdentifier

```

- `$key` is the `ratingKey` of the item you want to add
- `$duration` is the duration of the item in milliseconds - not sure if it needs to be correct, but it needs to be there
- `$plexClientIdentifier` the client identifier your app signed in with - not sure either if this needs to be a valid one, but my server at least insists on the parameter being there

These calls basically say

- Hey, I’m watching this thing, and I’m at the one minute mark!
- Meh, I stopped watching at the two minute mark…

And thus it appears on deck, with the option to continue from 2 min.

The exact numbers probably don’t matter, but they need to be different.

---

<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:55pm UTC](https://forums.plex.tv/t/on-deck-via-api/136293/4 "2020-01-08T19:55:50Z")

</div>


