V8-archive: Access to relations within the same API call

Created on 22 Oct 2019  路  1Comment  路  Source: directus/v8-archive

So i have a collection (A) with an O2M relationship to another collection (B).
Is it possible that when I get an item for collection A: /[project]/items/[collection-name]/[pk], I directly get access to the items from collection B that have a relationship with the item from collection A. All in one API request?

If not, how else would I go about getting the related items?

question

Most helpful comment

Yes, you would use the fields parameter to automatically fetch related data:

https://docs.directus.io/api/reference.html#fields

>All comments

Yes, you would use the fields parameter to automatically fetch related data:

https://docs.directus.io/api/reference.html#fields

Was this page helpful?
0 / 5 - 0 ratings

Related issues

binary-koan picture binary-koan  路  3Comments

Varulv1997 picture Varulv1997  路  3Comments

rijkvanzanten picture rijkvanzanten  路  3Comments

jwkellyiii picture jwkellyiii  路  3Comments

benhaynes picture benhaynes  路  4Comments