6
[Documentation Improvement] Collection API: Need Examples for Creating Relations (1:n, m:1, n:m) Programmatically
Source: directus/directus#24061 · opened by @dpunktdaniel
Summary The Collection API documentation needs enhancement with practical examples for creating collections with relationships programmatically. Currently, there are no comprehensive examples showing the correct payload structure for different relation types. Basic Example While trying to create collections with relations via the API, I'm facing challenges with the correct configuration. The documentation provides basic collection creation examples, but lacks clear guidance for relations. Here's what I'm currently trying to achieve with a Department-Employee relationship: This example shows my current approach, but the relation is not properly configured and requires manual fixes in the Data Studio in Directus. We need clear examples for all relation types (1:n, m:1, n:m) that work out of the box. Motivation • Developers need to programmatically create collections with proper relations • Current documentation requires trial and err…
No pledges yet. Be the first to back this.
Comments
Similar requests
Unable to Duplicate Collections with Field Configurations
2 votes · 0 comments
Implement 'Save All' Functionality for Nested Collections in Relation Drawer
3 votes · 0 comments
Restrict "Show Hidden Collections" to Admin Users
25 votes · 0 comments
Add Fields Exclusion in Rest API
3 votes · 0 comments
Ability to duplicate a collection or create collection templates
72 votes · 0 comments
No comments yet.