I have a collection called "playlist" that has an m:m-relational field to a files field. There all the mp3 files that were perviously uploaded, are referenced.
Now I would like to get a specific playlist (id=14) that also returns the title of each of those mp3 fields. I understand that information is written to a Directus table. How can I get it via RestAPI? (The Goal is to list the file titles and link them to the audio file, so that on click the audio is played.)
This is the API call at the moment:
https://[domain]/items/playlists/14?filter[status][_eq]=published&fields=title,additional_title,description,slug,audio_files.*
which returns a result like this:
{
"data": {
"title": "Playlist of all compositions",
"additional_title": null,
"description": null,
"slug": "playlist-of-all-compositions",
"audio_files": [
{
"id": 69,
"playlists_id": 14,
"directus_files_id": "c025fc41-1465-4d9d-961a-39cbc64c0646"
},
{
"id": 70,
"playlists_id": 14,
"directus_files_id": "d12b29b6-0141-4e3e-8fa5-9f7aee3d2e30"
},
{ [...]