Skip to content

feat: add PATCH /v1/users/{id} to update user profile#12299

Open
iamkalio wants to merge 4 commits intoArize-ai:mainfrom
iamkalio:feat/rest-patch-user-by-id
Open

feat: add PATCH /v1/users/{id} to update user profile#12299
iamkalio wants to merge 4 commits intoArize-ai:mainfrom
iamkalio:feat/rest-patch-user-by-id

Conversation

@iamkalio
Copy link
Copy Markdown
Contributor

Summary

  • Adds PATCH /v1/users/{user_id} (GlobalID) to partially update users: username, password, and role (role changes admin-only; non-admins may only update themselves).
  • Admins may update another user’s username, password, and role; authenticated non-admins may PATCH only their own id for username/password (password change requires current_password).
  • Aligns behavior with existing GraphQL user mutations (e.g. patch_user / self-service constraints): LOCAL password rules, OAuth2/basic-auth guards, default admin protections, token logout on sensitive updates where applicable.
  • Regenerates OpenAPI (schemas/openapi.json) and phoenix Python/TS client types from the new operation.
  • Integration tests: admin username patch, member forbidden on other user, empty body → 422; launch/OpenAPI route coverage helpers updated as needed.

Fixes #12269

I have read the CLA Document and I hereby sign the CLA

@iamkalio iamkalio requested review from a team as code owners March 21, 2026 01:28
@github-project-automation github-project-automation Bot moved this to 📘 Todo in phoenix Mar 21, 2026
@dosubot dosubot Bot added the size:XL This PR changes 500-999 lines, ignoring generated files. label Mar 21, 2026
@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new Bot commented Mar 21, 2026

Open in StackBlitz

@arizeai/phoenix-cli

npm i https://pkg.pr.new/@arizeai/phoenix-cli@12299

@arizeai/phoenix-client

npm i https://pkg.pr.new/@arizeai/phoenix-client@12299

@arizeai/phoenix-evals

npm i https://pkg.pr.new/@arizeai/phoenix-evals@12299

@arizeai/phoenix-mcp

npm i https://pkg.pr.new/@arizeai/phoenix-mcp@12299

@arizeai/phoenix-otel

npm i https://pkg.pr.new/@arizeai/phoenix-otel@12299

commit: 7defa0c

@iamkalio iamkalio changed the title Add PATCH /v1/users/{id} to update user profile feat: add PATCH /v1/users/{id} to update user profile Mar 21, 2026
@iamkalio
Copy link
Copy Markdown
Contributor Author

iamkalio commented Mar 25, 2026

Hello @mikeldking
I've had this for a while too, looking forward to your review when you have the time

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XL This PR changes 500-999 lines, ignoring generated files.

Projects

Status: 📘 Todo

Development

Successfully merging this pull request may close these issues.

REST API: PATCH /users/{id} — update user

1 participant