Akshay asked
dstala replied
Akshay@discord Could you help us with more information? By what method are you attempting bulk-add procedure?
Akshay replied
I’m using the REST API. Tried both the row level post request /api/v1/tableName
as well as /api/v1/tableName/bulk
. My questions is how does one add a column which is linked to another record via REST API. Thank you!
Akshay replied
When I do add link to another record over UI the frontend calls the API /api/v1/m2mTable1_Table2
. However this isn’t documented anywhere. Was trying to figure the best way to go about it.
o1lab replied
inserting to relational table is not possible with bulk, something we will improve going forward
Akshay replied
o1lab@discord How does one do it one row at a time? When I tried /api/v1/tableName/:parentId/childTableName
I keep getting a 404. Am I getting the name of the childTable wrong? How do I know what name to use?
Akshay replied
So I just tested the addition of a linked record via the API. It turns out that there are two ways to do it.
via
parent/id/m2mParentChild
OR
m2mParentChild
Both accept the same parameter
```
{
“table_1”: “id1”,
“table_2”: “id2”
}
```
However the docs say
```
{
city: “test”
}
```
Should I report this?
Akshay replied