I am trying to create an element as a child of a specific table. For example, I have a Restaurant Menu, I am trying to create a Menu Item. The Restaurant table has a 1 to many relationship with this Menu Item table.
I am using the REST API and the same syntax as the 3.0 version of backendless but it is not working in 4.0. I am trying to do this in the Rest Console as well and it is also not working. I assume it is something to do with my parameters but I am just copying and pasting the parameters from the get call and modifying them as I need to create a new element. See below.
Do we need to make two calls with 4.0 to do this? First to create the element in the FeedContentCard table and then to attach the relationship from the retailer table to the feedcontentcard table?
Method: .put
URL: https://api.backendless.com//<REST-api-key>/data/RetailerPage/<object-id>
Here are my parameters. Basically we are creating a new element in the FeedContentCard table that is a child of the RetailerPage table. In the return, we only see “contentCards”: null, when we do this but it should have the below parameters in the return.
{"contentCards": [
{ "offerDescription": "hi",
"___class": "FeedContentCard"
} ]
}