Home > Software design >  How to make a Strapi entry with relation included through REST Api Post
How to make a Strapi entry with relation included through REST Api Post

Time:02-12

I have two collection types that are connected with a relation : enter image description here

enter image description here

Where Student has many Posts and When I make a post trought the admin panel I don't have any problems. I even figured out how to assign media with a POST request which is done by giving the media id. But I still can't figure out how to link the relation on post creation with the request I tried giving the id of the user but it comes out empty also tried UID empty again

enter image description here

And the JSON request :

enter image description here

CodePudding user response:

In request you have Student with a capital S, but in strapi admin it is student with lowercase s. You should use the same naming convention through all the properties to avoid such a problems.

  • Related