plone.restapi icon indicating copy to clipboard operation
plone.restapi copied to clipboard

@aliases endpoint

Open avoinea opened this issue 3 years ago • 2 comments

In Plone Classic for each object we have an action called URL Management pointing to /@@manage-aliases. These aliases are automatically added when an object is renamed in order to automatically redirect old URL to the new one. In Plone Classic the Editor is able to see them, add new ones, or remove existing ones.

In order to be able to replicate this behavior in Volto, we need a RestAPI endpoint called @aliases. It should be listed in components and expandable and it should follow the RestAPI CRUD approach.

Verb URL Action
GET /test-page/@aliases List all aliases
POST /test-page/@aliases Add one or more aliases
DELETE /test-page/@aliases Remove one or more aliases
~~PATCH~~ /test-page/@aliases/{:id} Edit alias (not sure if we need this)
~~DELETE~~ /test-page/@aliases/{:id} Remove alias (not sure if possible as the id is a path)

See also https://github.com/plone/volto/issues/1178

avoinea avatar May 03 '22 16:05 avoinea

On POST I would allow to add a list of aliases. I think this is supported by the UI of classic in some way.

jensens avatar May 04 '22 08:05 jensens

@jensens Yes, also on delete it should allow a list of aliases. Already discussed this with @Petchesi-Iulian

avoinea avatar May 04 '22 09:05 avoinea

Added in 8.27.0

davisagli avatar Aug 23 '23 18:08 davisagli