Closed
Description
This seems quite related to @fivetanley's #202. I'm new to JSON API, so please be gentle with me.
We have a simple example where we'd like to create a Chat
object with a single POST, but also embed the first Message
in the same request. Whether we "side-post" them or embed them, the question is what the proper way to request they both be created at once and related to one another. An example bit of JSON we imagined POSTing:
{
"chats": [{
"messages": [{
"content": "O HAI"
}]
}]
}
And then receive a response like:
{
"messages": [{
"id": 2,
"content": "O HAI",
"chat_id": 1
}],
"chat": {
"id": 1,
"message_ids": [2]
}
}
We've implemented this for ourselves, but we're curious if there's a "right" way per the spec (we searched and weren't able to find it).
Metadata
Metadata
Assignees
Labels
No labels