Skip to content

Media history (JSON)

The Media history format lets you add watch history and reviews for titles that Ryot can look up with a metadata provider, such as TMDB movies and shows. Use it when another tool can write this format, when you write a small script to convert data from an app Ryot does not support, or to add history by hand.

  • Ryot fetches each title from its provider during the import, so that provider must be set up on your server. For TMDB titles, that is the TMDB access token; see Movies and shows.
  • You need the provider’s ID for each title, such as the number in a TMDB address.
  1. Save your history as a .json file in the format below.
  2. In Ryot, open Settings → Import data, select Start an import and choose Media history (JSON).
  3. Upload the file under Media history file, select Continue, then Start import.

The file is a JSON array with one entry per title:

Field Meaning
title The title’s name. It is only used in the import report.
entitySchemaSlug The kind of media, such as show, movie or podcast.
providerSlug The provider that knows the title, such as show.tmdb.
externalId The title’s ID at that provider.
events The history to add to the title, in any order.

Each event has:

Field Meaning
eventSchemaSlug What happened, such as progress, complete or review.
occurredAt When it happened, as a UTC timestamp such as 2024-01-02T20:30:00Z.
episode Optional. The episode or season of a show or podcast the event belongs to.
properties The event’s details, using the same fields as history you record in Ryot.

An episode takes one of these forms:

  • { "type": "show", "seasonNumber": 1, "episodeNumber": 2 } for a show episode
  • { "type": "show-season", "seasonNumber": 1 } for a review of a whole season
  • { "type": "podcast", "episodeNumber": 12 } for a podcast episode by number
  • { "type": "podcast-title", "episodeTitle": "Pilot" } for a podcast episode by title

Common properties are:

  • progressPercent: how far through you are, from 0 to 100.
  • startedOn: when you started.
  • timeSpent: how long you spent, in minutes.
  • consumedOn: a list of where you watched or listened, such as ["Plex"].
  • calendarDate: the day, when you know the day but not the time.
  • dateUnknown: true when you do not know the date at all.
  • rating (0 to 100), text and isSpoiler: for reviews.
  • sourceRun: any text. Events of one title that share it belong to the same viewing.
history.json
[
{
"title": "Example Show",
"entitySchemaSlug": "show",
"providerSlug": "show.tmdb",
"externalId": "1399",
"events": [
{
"eventSchemaSlug": "complete",
"occurredAt": "2024-01-02T20:30:00Z",
"episode": { "type": "show", "seasonNumber": 1, "episodeNumber": 2 },
"properties": { "consumedOn": ["Plex"] }
},
{
"eventSchemaSlug": "review",
"occurredAt": "2024-01-03T09:00:00Z",
"episode": { "type": "show-season", "seasonNumber": 1 },
"properties": { "rating": 80, "text": "A strong first season." }
}
]
}
]
  • Each event is checked like history you record in Ryot. An event that does not fit is listed in the import report, and the rest of the title still imports.
  • An event whose episode or season is not in the title’s episode list is listed in the import report. It is not moved to another episode.
  • Importing the same file again adds the same history again.

For anything beyond media history, such as other apps’ records or relationships, use the general Data import format.