{
  "opencollection": "1.0.0",
  "info": {
    "name": "Plex Media Server Library Playlists API",
    "version": "1.2.2\n"
  },
  "request": {
    "auth": {
      "type": "apikey",
      "key": "X-Plex-Token",
      "value": "{{X-Plex-Token}}",
      "placement": "header"
    }
  },
  "items": [
    {
      "info": {
        "name": "Library Playlists",
        "type": "folder"
      },
      "items": [
        {
          "info": {
            "name": "Create a Playlist",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://{IP-description}.{identifier}.plex.direct:{port}/playlists",
            "params": [
              {
                "name": "uri",
                "value": "",
                "type": "query",
                "description": "The content URI for what we're playing (e.g. `library://...`)."
              },
              {
                "name": "playQueueID",
                "value": "",
                "type": "query",
                "description": "To create a playlist from an existing play queue."
              }
            ]
          },
          "docs": "Create a new playlist. By default the playlist is blank."
        },
        {
          "info": {
            "name": "Editing a Playlist",
            "type": "http"
          },
          "http": {
            "method": "PUT",
            "url": "https://{IP-description}.{identifier}.plex.direct:{port}/playlists/:playlistId",
            "params": [
              {
                "name": "playlistId",
                "value": "",
                "type": "path",
                "description": "The ID of the playlist"
              }
            ]
          },
          "docs": "Edits a playlist in the same manner as [editing metadata](#tag/Provider/operation/metadataPutItem)"
        },
        {
          "info": {
            "name": "Delete a Playlist",
            "type": "http"
          },
          "http": {
            "method": "DELETE",
            "url": "https://{IP-description}.{identifier}.plex.direct:{port}/playlists/:playlistId",
            "params": [
              {
                "name": "playlistId",
                "value": "",
                "type": "path",
                "description": "The ID of the playlist"
              }
            ]
          },
          "docs": "Deletes a playlist by provided id"
        },
        {
          "info": {
            "name": "Adding to  a Playlist",
            "type": "http"
          },
          "http": {
            "method": "PUT",
            "url": "https://{IP-description}.{identifier}.plex.direct:{port}/playlists/:playlistId/items",
            "params": [
              {
                "name": "playlistId",
                "value": "",
                "type": "path",
                "description": "The ID of the playlist"
              },
              {
                "name": "uri",
                "value": "",
                "type": "query",
                "description": "The content URI for the playlist."
              },
              {
                "name": "playQueueID",
                "value": "",
                "type": "query",
                "description": "The play queue to add to a playlist."
              }
            ]
          },
          "docs": "Adds a generator to a playlist, same parameters as the POST above. With a dumb playlist, this adds the specified items to the playlist. With a smart playlist, passing a new `uri` parameter replaces the rules for the playlist. Returns the playlist."
        },
        {
          "info": {
            "name": "Clearing a playlist",
            "type": "http"
          },
          "http": {
            "method": "DELETE",
            "url": "https://{IP-description}.{identifier}.plex.direct:{port}/playlists/:playlistId/items",
            "params": [
              {
                "name": "playlistId",
                "value": "",
                "type": "path",
                "description": "The ID of the playlist"
              }
            ]
          },
          "docs": "Clears a playlist, only works with dumb playlists. Returns the playlist."
        },
        {
          "info": {
            "name": "Get a playlist generator",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://{IP-description}.{identifier}.plex.direct:{port}/playlists/:playlistId/items/:generatorId",
            "params": [
              {
                "name": "playlistId",
                "value": "",
                "type": "path",
                "description": "The ID of the playlist"
              },
              {
                "name": "generatorId",
                "value": "",
                "type": "path",
                "description": "The generator item ID to delete."
              }
            ]
          },
          "docs": "Get a playlist's generator.  Only used for optimized versions"
        },
        {
          "info": {
            "name": "Modify a Generator",
            "type": "http"
          },
          "http": {
            "method": "PUT",
            "url": "https://{IP-description}.{identifier}.plex.direct:{port}/playlists/:playlistId/items/:generatorId",
            "params": [
              {
                "name": "playlistId",
                "value": "",
                "type": "path",
                "description": "The ID of the playlist"
              },
              {
                "name": "generatorId",
                "value": "",
                "type": "path",
                "description": "The generator item ID to modify."
              },
              {
                "name": "Item",
                "value": "[object Object]",
                "type": "query",
                "description": "Note: OpenAPI cannot properly render this query parameter example ([See GHI](https://github.com/OAI/OpenAPI-Specification/issues/1706)).  It should be rendered as:\n\nItem[type]=42&Item[title]=Jack-Jack Attack&Item[target]=&Item[targetTagID]=1&Item[locationID]=-1&Item[Location][uri]=library://82503060-0d68-4603-b594-8b071d54819e/item//library/metadata/146&Item[Policy][scope]=all&Item[Policy][value]=&Item[Policy][unwatched]=0\n"
              }
            ]
          },
          "docs": "Modify a playlist generator.  Only used for optimizer"
        },
        {
          "info": {
            "name": "Delete a Generator",
            "type": "http"
          },
          "http": {
            "method": "DELETE",
            "url": "https://{IP-description}.{identifier}.plex.direct:{port}/playlists/:playlistId/items/:generatorId",
            "params": [
              {
                "name": "playlistId",
                "value": "",
                "type": "path",
                "description": "The ID of the playlist"
              },
              {
                "name": "generatorId",
                "value": "",
                "type": "path",
                "description": "The generator item ID to delete."
              }
            ]
          },
          "docs": "Deletes an item from a playlist. Only works with dumb playlists."
        },
        {
          "info": {
            "name": "Get a playlist generator's items",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://{IP-description}.{identifier}.plex.direct:{port}/playlists/:playlistId/items/:generatorId/items",
            "params": [
              {
                "name": "playlistId",
                "value": "",
                "type": "path",
                "description": "The ID of the playlist"
              },
              {
                "name": "generatorId",
                "value": "",
                "type": "path",
                "description": "The generator item ID to delete."
              }
            ]
          },
          "docs": "Get a playlist generator's items"
        },
        {
          "info": {
            "name": "Reprocess a generator",
            "type": "http"
          },
          "http": {
            "method": "PUT",
            "url": "https://{IP-description}.{identifier}.plex.direct:{port}/playlists/:playlistId/items/:generatorId/:metadataId/:action",
            "params": [
              {
                "name": "playlistId",
                "value": "",
                "type": "path",
                "description": "The ID of the playlist"
              },
              {
                "name": "generatorId",
                "value": "",
                "type": "path",
                "description": "The generator item ID to act on"
              },
              {
                "name": "metadataId",
                "value": "",
                "type": "path",
                "description": "The metadata item ID to act on"
              },
              {
                "name": "action",
                "value": "",
                "type": "path",
                "description": "The action to perform for this item on this optimizer queue"
              }
            ]
          },
          "docs": "Make a generator reprocess (refresh)"
        },
        {
          "info": {
            "name": "Moving items in a playlist",
            "type": "http"
          },
          "http": {
            "method": "PUT",
            "url": "https://{IP-description}.{identifier}.plex.direct:{port}/playlists/:playlistId/items/:playlistItemId/move",
            "params": [
              {
                "name": "playlistId",
                "value": "",
                "type": "path",
                "description": "The ID of the playlist"
              },
              {
                "name": "playlistItemId",
                "value": "",
                "type": "path",
                "description": "The playlist item ID to move."
              },
              {
                "name": "after",
                "value": "",
                "type": "query",
                "description": "The playlist item ID to insert the new item after.  If not provided, item is moved to beginning of playlist"
              }
            ]
          },
          "docs": "Moves an item in a playlist. Only works with dumb playlists."
        },
        {
          "info": {
            "name": "Get a playlist's generators",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://{IP-description}.{identifier}.plex.direct:{port}/playlists/:playlistId/generators",
            "params": [
              {
                "name": "playlistId",
                "value": "",
                "type": "path",
                "description": "The ID of the playlist"
              }
            ]
          },
          "docs": "Get all the generators in a playlist"
        },
        {
          "info": {
            "name": "Upload",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://{IP-description}.{identifier}.plex.direct:{port}/playlists/upload",
            "params": [
              {
                "name": "path",
                "value": "/home/barkley/playlist.m3u",
                "type": "query",
                "description": "Absolute path to a directory on the server where m3u files are stored, or the absolute path to a playlist file on the server. If the `path` argument is a directory, that path will be scanned for playlist files to be processed. Each file in that directory creates a separate playlist, with a name based on the filename of the file that created it. The GUID of each playlist is based on the filename. If the `path` argument is a file, that file will be used to create a new playlist, with the name based on the filename of the file that created it. The GUID of each playlist is based on the filename."
              },
              {
                "name": "force",
                "value": "",
                "type": "query",
                "description": "Force overwriting of duplicate playlists. By default, a playlist file uploaded with the same path will overwrite the existing playlist. The `force` argument is used to disable overwriting. If the `force` argument is set to 0, a new playlist will be created suffixed with the date and time that the duplicate was uploaded."
              }
            ],
            "auth": {
              "type": "apikey",
              "key": "X-Plex-Token",
              "value": "{{X-Plex-Token}}",
              "placement": "header"
            }
          },
          "docs": "Imports m3u playlists by passing a path on the server to scan for m3u-formatted playlist files, or a path to a single playlist file."
        }
      ]
    }
  ],
  "bundled": true
}