Skip to content

Resource status transitions #5

@a-akimov

Description

@a-akimov

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions