Creating/updating a resource AND its relationships

Right… this falls under the need for multiple actions in a single request, which isn’t supported quite yet. (Though the progress in #915 is a big step, as it unblocks #795.)

Is it ok for you to do it in two requests? If so, then it’s simple (using the same process as in the case below).

This is actually doable in one or two requests, and it doesn’t require "included" (the behavior of which is only defined for GET requests).

Here’s how you do it. Either:

  1. POST to /user_metas to create the resource, and then POST its type/id to /users/{id}/relationships/user_meta. The second POST will add the new item onto the end, so you don’t have to get the existing ids in the relationship and send them back.

  2. If you have a "related" URI for your user resource’s user_meta relationship (probably a URI like /users/{id}/user_metas), you can POST the new user_meta to that directly and it should be created and added to the relationship. (For background on the related link, see: Usage of `related` field in Relationships link)