Reputation: 902
When I specify fields in my API request for most things I get the single value. However when I want just the URL of a file, I get everything, or more than I want. If I specify file.data.url in my filter I get this:
Upvotes: 2
Views: 3198
Reputation: 319
Add fields as paramater to request
?fields=file.data.full_url
I would recommend full_url rather than url as url is relative.
Upvotes: 0
Reputation: 322
It is a known issue of the Directus. Currently, fields in the param
are working with the column of the database table.
The value of data
variable is not the part of directus_files
table.
Currently, you need to use the data
object with all the values.
Upvotes: 1