Create Song
To create 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 : POST
URL : /api/song
Body : JSON
{
"name": "New 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 add song"
}
Response : 422 - Unprocessable Content
{
{
"error": "Name required"
},
{
"error": "Artist required"
}
}
Response : 500 - Server Error
Internal Server Error