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

Create Version should return location and users #45

Open
bosschaert opened this issue May 16, 2024 · 3 comments
Open

Create Version should return location and users #45

bosschaert opened this issue May 16, 2024 · 3 comments
Assignees

Comments

@bosschaert
Copy link
Contributor

Expected Behaviour

The Create Version API should return the URL of the version created in the Location header.

It should also return the associated user(s) with the version in the metadata.

@auniverseaway
Copy link
Member

FWIW, I don't think this should be stored in the header. I think this should be in the body. It's pretty un-conventional to get information client-side from a header object.

{
  "url": "https://...",
  "users": [{"email": "anonymous"}],
  "label": "My new version",
}

My expectation would be that the format matches what the list API gives.

@auniverseaway
Copy link
Member

I also noticed that we are not sending the fully qualified domain... this means the client has to do more work:

Screenshot 2024-05-20 at 2 52 14 PM

URL is not actually a URL in the above screenshot. I would follow Helix conventions in that we always try to provide fully qualified URLs.

@bstopp
Copy link
Contributor

bstopp commented Dec 9, 2024

URL is not actually a URL in the above screenshot. I would follow Helix conventions in that we always try to provide fully qualified URLs.

Doesn't the client have to do more work anyway? These paths are relative to the incoming origin path - and since the DA UI doesn't have to run on da.live - we don't know what the fully qualified URL is supposed to be, unless we look at the request origin header.

on Helix they can make it FQ since the origin is always a aem.page/live URL. To achieve the same the Route will need to reprocess/handle generating the response objects (which i'm not opposed to as i feel like the persistence operations do way too much handling/managing the format of data sent back to caller)

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

3 participants