You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would be great if we could do an upsert for a resource using its unique properties as a key.
We are currently limited to POSTing and then PATCHing when erroring with a unique key constrain violation.
For example, for a resource where <col1> & <col2> are a unique pair, we would want to make an upsert to insert or update a record containing a note, by sending a request containing <col1: X>, <col2: Y> and <note: Z>.
Additionally, it would be great to have these upserts work as part of batch operations as well.
This is available via PUT but it does set any non-specified fields back to defaults - I think there's value in a version that does not reset defaults as well
Do the fields in the id field also have to be in the body of the POST @Page-?
Maybe an example curl or pinejs-client one would be even better and good for future reference.
It would be great if we could do an upsert for a resource using its unique properties as a key.
We are currently limited to POSTing and then PATCHing when erroring with a unique key constrain violation.
For example, for a resource where
<col1>
&<col2>
are a unique pair, we would want to make an upsert to insert or update a record containing anote
, by sending a request containing<col1: X>
,<col2: Y>
and<note: Z>
.Additionally, it would be great to have these upserts work as part of batch operations as well.
See: https://github.com/resin-io/resin-api/issues/765
The text was updated successfully, but these errors were encountered: