Stream: implementers
Topic: change id of resource on server
Sean McIlvenna (Aug 30 2018 at 14:06):
Assuming the server allows the user to create using PUT with a specific id, how would a user go about changing the id of a resource that lives on a server?
Grahame Grieve (Aug 30 2018 at 14:07):
delete + put (optionally in a single transaction)
Sean McIlvenna (Aug 30 2018 at 14:11):
any way to do that while preserving history?
Lloyd McKenzie (Aug 30 2018 at 14:29):
History would be preserved - but under the id the resource was known at the time. You can't move the history to the new id because that wouldn't be accurate. A bigger question would be how to manage links. If you do a delete + create, links pointing to the old resource won't move. For references from remote servers, you're out of luck, but it might be possible to define a "move" operation that could revise local references.
Sean McIlvenna (Aug 30 2018 at 18:17):
ok. that makes sense
Sean McIlvenna (Aug 30 2018 at 18:17):
is there a suggested approach for making a link between the two resources
Sean McIlvenna (Aug 30 2018 at 18:17):
?
Sean McIlvenna (Aug 30 2018 at 18:17):
for example: indicate in resource "a" that it was moved to resource "b"
Lloyd McKenzie (Aug 30 2018 at 18:19):
Provenance :)
Sean McIlvenna (Aug 30 2018 at 18:55):
perfect, thanks!
Last updated: Apr 12 2022 at 19:14 UTC