Update Song
To edit the data in the specified collection with the specified parameters. When a JSON object is saved, the object properties are automatically added to the collection you specified.
Method : PUT
URL : /api/song?id=(id)
Body : JSON
{
"name": "Edited Song",
"artist_id": 1,
"album_id": 2,
"cover_url": "https://i.scdn.co/image/ab67616d00001e02af69d9e82cc973f608481610",
"preview_url": "https://p.scdn.co/mp3-preview/c6e19c3e7e0af8cf26f54b41468b1b0121166f11",
"youtube_url": "sEM01iNOSQA"
}
Response : 200 - OK
{
"message": "Success update song"
}
Response : 422 - Unprocessable Content
{
"error": "Name required"
}
Response : 404 - Not Found
Not Found
Response : 500 - Server Error
Internal Server Error