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?
Yes, you would use the fields parameter to automatically fetch related data:
Most helpful comment
Yes, you would use the
fieldsparameter to automatically fetch related data:https://docs.directus.io/api/reference.html#fields