Get All Song

Get All Song

To get the data in the specified collection. If no parameters are passed, it lists all of them. Otherwise, it lists the documents in the collection matching the specified parameters:

Method : GET

URL : /api/song

Response : 200 - OK

[
  {
    "id": 1,
    "name": "Hari Yang Cerah",
    "youtube_url": "fuEdMCclYn0",
    "cover_url": "https://i.scdn.co/image/ab67616d00001e02076747ead143aa3cd8c1d2f0",
    "artist_id": 1,
    "created_at": "2022-07-06T10:36:12+00:00",
    "album_id": 2,
    "preview_url": "https://p.scdn.co/mp3-preview/08bd5940bc2031c8c93306cccb32d5b9756fdc53",
    "artists": {
      "id": 1,
      "created_at": "2022-07-06T10:43:42+00:00",
      "name": "Noah",
      "cover_url": "https://i.scdn.co/image/ab6761610000e5eba8fe25ec607f3cca02f5db6c",
      "genre_id": 1
    },
    "album": {
      "id": 2,
      "created_at": "2022-12-22T14:57:18.54569+00:00",
      "name": "Hari yang Cerah",
      "cover": "https://i.scdn.co/image/ab67616d00001e02076747ead143aa3cd8c1d2f0",
      "updated_at": "2022-12-22T14:57:18.54569",
      "artists_id": 1
    }
  },
  {
    "id": 2,
    "name": "Bintang Di Surga",
    "youtube_url": "B1ynHmn0XZ4",
    "cover_url": "https://i.scdn.co/image/ab67616d00001e02af69d9e82cc973f608481610",
    "artist_id": 1,
    "created_at": "2022-07-06T10:38:10+00:00",
    "album_id": 1,
    "preview_url": "https://p.scdn.co/mp3-preview/09474fc657c15038cb699afa4a52b4fac9383d62",
    "artists": {
      "id": 1,
      "created_at": "2022-07-06T10:43:42+00:00",
      "name": "Noah",
      "cover_url": "https://i.scdn.co/image/ab6761610000e5eba8fe25ec607f3cca02f5db6c",
      "genre_id": 1
    },
    "album": {
      "id": 1,
      "created_at": "2022-12-22T13:41:57.364685+00:00",
      "name": "Bintang di Surga",
      "cover": "https://i.scdn.co/image/ab67616d00001e02af69d9e82cc973f608481610",
      "updated_at": "2022-12-22T13:41:57.364685",
      "artists_id": 1
    }
  }
]

Response : 404 - Not Found

Not Found

Response : 500 - Server Error

Internal Server Error