[plone.restapi] Ordering of resources

As part of a Plone migration over plone.restapi I need to preserve and restore the original ordering of items within folders. I am reading this here but I am not getting the point with sub_ids here:


I have a folder /folder/foo containing items bar-3, bar-1 and bar-2.

So I would PATCH /folder/foo but with which sub_ids and which obj_id?


I'm guessing you're looping over the original content item and issue a PUT or POST to create them?
If so, then you can "move" the item to the bottom position using:

PATCH /plone/[id of the container]
"ordering": {"obj_id": "id of item", "delta": "bottom"}

I'd expect the item to be at the bottom position already, as that is the default position an item is created at in the UI.

Does this make sense?