directus / v8-archive

Directus Database API — Wraps Custom SQL Databases with a REST/GraphQL API

Home Page:https://docs.directus.io/api/reference.html

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Asset key in public API

bulich opened this issue · comments

What is the best way to add item image thumbnail and get an acces to it in items public API without any extra requests? For example, I have a simple posts collection (title, subtitle and thumbnail image). If i use file field type then I get only ID of this image file:

{
 id: 1,
 title: 'Some title',
 subtitle: 'Some subtitle',
 thumbnail: 1
}

But I need a private hash key to get an asset from my frontend side (GET /:project/assets/:key).