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

Resource status transitions #5

Open
a-akimov opened this issue Oct 2, 2022 · 0 comments
Open

Resource status transitions #5

a-akimov opened this issue Oct 2, 2022 · 0 comments

Comments

@a-akimov
Copy link
Member

a-akimov commented Oct 2, 2022

Consider a resource that has, say, the enabled (true/false) property. If the API needs the "enable/disable user" operation, should it be implemented using the generic "update user" operation

PATCH /users/{user_id}

{
   "enabled": true/false
}

or as

POST /users/{user_id}/enable
POST /users/{user_id}/disable

as an action?

The former approach has the benefit that we change both the enabled and other properties in a single API call.

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

1 participant