Question

Is it mandatory to implement a REST API even if it doesn't make sense?

I have created an app consuming REST services from other apps. Now that I have the final result, I wonder if it is needed to implement my own REST API, because as I try to implement it seems that the API has the same funcionality as the APIs I'm using without adding anything new, hence my doubt.

Était-ce utile?

La solution

No, its not mandatory to implement an API, let alone a REST style API.

Unless, you've agreed to provide one. Then yes, but you should push back and see if there isn't a better solution. Perhaps the API needs to follow another style, perhaps you could provide data extracts on a schedule. Depends entirely on what is needed.

Unless, you are implementing this API to hide the consumed APIs. In which case your service is acting as a facade. Which adds little/zero value of its own, but does provide value in decoupling the front from the back. Agian it does not need to be a REST style API. Would another network communication style be more appropriate?

Unless, you are wanting to provide some form of external automation. Such as some shell scripts that on a schedule requests reports. But this could also be provided by programatic means, such as powershell loading .net dlls. Or by standard shell command means, by providing a command line app. It doesn't have to be a HTTP/TCP/IP interface.

Licencié sous: CC-BY-SA avec attribution
scroll top