Update Music Artist Details Using Match
You can update metadata for a music artist using Plex's match feature and the API. This API command will use the information returned from the search for match API to update the artist's metadata.
URL
PUT http://{ip_address}:32400/library/metadata/{id}/match?guid={guid}&name={name}&X-Plex-Token={plex_token}
Parameters
Name | Description |
---|---|
ip_address | The IP address of the Plex Media server. |
plex_token | The Plex token. |
id | The key associated with the artist to be updated. This key can be found by calling the Get All Music Artists API command and looking for the music artist to be updated. |
guid | This is the unique identifier returned by the search for match API. Each SearchResult will have a guid attribute. It will be in the format mbid://{string_value} . That GUID string is what will be used for this parameter value. |
name | The name of the artist. |
Return Status
HTTP Code | Description |
---|---|
200 | Success - The request was successful. |
401 | Unauthorized - The Plex token provided was not valid. |
404 | Not Found - The Music Artist ID value is incorrect. |
Response
An XML string is returned, but doesn't provide information about the update. If the status code is 200 and the XML is returned then that would indicated a success.
The response consists of a single MediaContainer
element with a few attributes.
Attribute | Description |
---|---|
size | The number of music artists. |
identifier | The type of item. |
mediaTagPrefix | Prefix for the media tag. |
mediaTagVersion | Media tag version. Note: This could be a date and time value. |
Examples
curl -X PUT http://{ip_address}:32400/library/metadata/{id}/match?guid={guid}&name={name}&X-Plex-Token={plex_token}
import requests plex_url = http://{ip_address}:32400/library/metadata/{id}/match?guid={guid}&name={name}&X-Plex-Token={plex_token} response = requests.put(plex_url) print(response.text)
$response = Invoke-RestMethod 'http://{ip_address}:32400/library/metadata/{id}/match?guid={guid}&name={name}&X-Plex-Token={plex_token}' -Method 'PUT' Write-Output $response