[plone.restapi] Setting the UID

Is it possible with plone.restapi to the set UID for created resources?
As part of a migration it should be necessary to preserve UID on the target system since they are used for references in the original system...or any better idea?

plone.restapi automatically sets UID values for all resources created.
By setting UID if you mean modifying them using PATCH requests or so, it won't be possible as UID is immutable and assigned on creation.

This is how it is right now, I am unaware of any workarounds to able to assign UIDs manually.

Nonsense. You can of course set the UID as part of a migration process yourself. This is needed if you need to preserve links based on UID resolving. We have done this since a decade....and you need a related approach for migrations over plone.restapi.


I was only stating what I had seen while working with the plone.restapi. Maybe @tisto @jaroel could help you out here!

Shouldn't be too hard to implement if we add an optional uid field on POST requests.

Not hard to implement but I doubt that a normal POST operation with Modify Portal Content permission should be allowed to change the UID. I think Manage Portal permission should be needed here.


Please create an issue on github and let's move the discussion there...