GET
/
library
/
metadata
/
{ratingKey}
/
children
using LukeHagar.PlexAPI.SDK;
using LukeHagar.PlexAPI.SDK.Models.Components;

var sdk = new PlexAPI(accessToken: "<YOUR_API_KEY_HERE>");

var res = await sdk.Library.GetMetadataChildrenAsync(
    ratingKey: 1539.14D,
    includeElements: "<value>"
);

// handle response
{
  "MediaContainer": {
    "size": 3,
    "allowSync": true,
    "art": "/library/metadata/30072/art/1705739923",
    "identifier": "com.plexapp.plugins.library",
    "key": "30072",
    "librarySectionID": 2,
    "librarySectionTitle": "TV Shows",
    "librarySectionUUID": "4bb2521c-8ba9-459b-aaee-8ab8bc35eabd",
    "mediaTagPrefix": "/system/bundle/media/flags/",
    "mediaTagVersion": 1701731894,
    "nocache": true,
    "parentIndex": 1,
    "parentTitle": "Reacher",
    "parentYear": 2022,
    "summary": "When retired Military Police Officer Jack Reacher is arrested for a murder he did not commit, he finds himself in the middle of a deadly conspiracy full of dirty cops, shady businessmen, and scheming politicians. With nothing but his wits, he must figure out what is happening in Margrave, Georgia.",
    "theme": "/library/metadata/30072/theme/1705739923",
    "thumb": "/library/metadata/30072/thumb/1705739923",
    "title1": "TV Shows",
    "title2": "Reacher",
    "viewGroup": "season",
    "viewMode": 65593,
    "Directory": [
      {
        "leafCount": 16,
        "thumb": "/library/metadata/30072/thumb/1705739923",
        "viewedLeafCount": 16,
        "key": "/library/metadata/30072/allLeaves",
        "title": "All episodes"
      }
    ],
    "Metadata": [
      {
        "ratingKey": "66488",
        "key": "/library/metadata/66488/children",
        "parentRatingKey": "30072",
        "guid": "plex://season/652aea6549508477c34c6000",
        "parentGuid": "plex://show/5d9c09190aaccd001f8f42f0",
        "parentStudio": "Amazon Studios",
        "type": "season",
        "title": "Season 2",
        "parentKey": "/library/metadata/30072",
        "parentTitle": "Reacher",
        "summary": "Based on\"Bad Luck and Trouble,\" when members of Reacher's old military unit start turning up dead, Reacher has just one thing on his mind-revenge.",
        "index": 2,
        "parentIndex": 1,
        "viewCount": 11,
        "lastViewedAt": 1705646565,
        "parentYear": 2022,
        "thumb": "/library/metadata/66488/thumb/1703065033",
        "art": "/library/metadata/30072/art/1705739923",
        "parentThumb": "/library/metadata/30072/thumb/1705739923",
        "parentTheme": "/library/metadata/30072/theme/1705739923",
        "leafCount": 8,
        "viewedLeafCount": 8,
        "addedAt": 1702602021,
        "updatedAt": 1703065033,
        "userRating": 9,
        "skipCount": 1,
        "lastRatedAt": 1703881224
      }
    ]
  }
}

Authorizations

X-Plex-Token
string
header
required

Plex Authentication Token

Path Parameters

ratingKey
number
required

the id of the library item to return the children of.

Query Parameters

includeElements
string

Adds additional elements to the response. Supported types are (Stream)

Response

200
application/json
The children of the library item.
MediaContainer
object