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

Several API inconsistencies IMO #2679

Open
dvv opened this issue Mar 23, 2024 · 1 comment
Open

Several API inconsistencies IMO #2679

dvv opened this issue Mar 23, 2024 · 1 comment
Labels
api REST API things

Comments

@dvv
Copy link
Contributor

dvv commented Mar 23, 2024

I did this

GET /v1/group/g1/_attr/member2, received 400 "emptyrequest"
PUT /v1/group/g1/_attr/member2, received 500 {"invalidattributename":"member2"}

I expected the following

GET /v1/group/no-such-spn-name-uuid/_attr/member2, to receive 404 "nomatchingentries"
GET /v1/group/existing-spn-name-uuid/_attr/member2, to receive 400 {"invalidattributename":"member2"}
PUT /v1/group/existing-spn-name-uuid/_attr/member2, to receive 400 {"invalidattributename":"member2"}

Kanidm version details

latest master

@yaleman yaleman added the api REST API things label Mar 23, 2024
@yaleman
Copy link
Member

yaleman commented Mar 23, 2024

Requesting member2 should get you a 400 invalid attribute response regardless if the name/UUID would be found, because schema is validated before entry existence.

(ie, GET /v1/group/no-such-spn-name-uuid/_attr/member2 should give you a 400)

The PUT response needs fixing though, as noted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api REST API things
Projects
Status: 📋 Backlog
Development

No branches or pull requests

2 participants