Is there a way to have an API with same endpoint and method, but different Path?

Good day,


I have some APIs that do operations over the resource 'User', and the following ones are needed:

GET users - To retrieve them
POST users - To create them
PATCH users - To update them
PATCH users/disable - To disable them
PATCH users/enable - To enable them

The problem is that I can only have one combination of endpoint vs method, so when I try to declare the second PATCH user API to specify the path to "disable" or "enable" I receive and error.


My question is: what's the Appian way for doing those APIs declarations using the Restful pattern?


Create only one web API object switching between each different path?
Let the endpoint be empty, and put all the URI in the path field?
Other options...

Thanks for the help in advance

  Discussion posts and replies are publicly visible