list_status_sessions_history_all
Retrieve Plex playback history with filters for account, time range, library, media item, or device. Sort results and include only needed fields to analyze viewing activity.
Instructions
List Playback History.
GET /status/sessions/history/all
Args:
account_id: The account id to restrict view history
viewed_at: The time period to restrict history (typically of the form viewedAt>=12456789)
library_section_id: The library section id to restrict view history
metadata_item_id: The metadata item to restrict view history (can provide the id for a show to see all of that show's view history). Note this is translated to metadata_items.id, parents.id, or grandparents.id internally depending on the metadata type.
sort: The field on which to sort. Multiple orderings can be specified separated by , and the direction specified following a : (desc or asc; asc is assumed if not provided). Note metadataItemID may not be used here.
exclude_elements: Comma-separated list of elements to exclude from the response
exclude_fields: Comma-separated list of fields to exclude from the response
include_fields: Whitelist of fields to return
include_elements: Whitelist of elements to include
viewed_at_query: Greater-than filter for viewedAt timestamp
viewed_at_query_2: Less-than filter for viewedAt timestamp
device_id: Filter by device ID
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sort | No | ||
| device_id | No | ||
| viewed_at | No | ||
| account_id | No | ||
| exclude_fields | No | ||
| include_fields | No | ||
| viewed_at_query | No | ||
| exclude_elements | No | ||
| include_elements | No | ||
| metadata_item_id | No | ||
| viewed_at_query_2 | No | ||
| library_section_id | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |