Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

@aliases endpoint #1393

Closed
avoinea opened this issue May 3, 2022 · 3 comments
Closed

@aliases endpoint #1393

avoinea opened this issue May 3, 2022 · 3 comments
Assignees

Comments

@avoinea
Copy link
Member

avoinea commented May 3, 2022

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 plone/volto#1178

@jensens
Copy link
Member

jensens commented May 4, 2022

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

@valipod valipod removed their assignment May 4, 2022
@avoinea
Copy link
Member Author

avoinea commented May 4, 2022

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

This was referenced May 4, 2022
avoinea added a commit that referenced this issue May 5, 2022
avoinea added a commit that referenced this issue May 6, 2022
* Initial commit.

* Added GET root endpoint.

* Added @Aliases root POST

* Refs #1393 - Add @Aliases endpoint docs

* Flake8 & delete endpoint

* Black

Co-authored-by: Alin Voinea <[email protected]>
@davisagli
Copy link
Member

Added in 8.27.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants