5

I built an api to sync data between two systems. It is simple, if I have new data to send, I call their api with data. If success, get Json response back or error if not.

Today the guy from other side asked me for "acknowledgement" endpoint. I was literally WTF?

He explained me very clear, when I call their api, it can be either success or fail, so for those success or fail, he will send the response to my "ACKNOWLEDGEMENT ENDPOINT" to tell me if success or not.

*facepalm*

Comments
  • 0
    uhm....isnt that the entire premise of a REST Api ?
  • 0
    I mean he can response to my call for success or failure. Instead he will reply success for my every calls and want me to write another endpoint for him to call for actual response.
  • 0
    Simplicity is overrated!
  • 1
    Just say it's done automatically
  • 1
    @beggarboy the acknowledgement endpoint?
  • 0
    @AL1L No. Everything.
    A Rest Api gets or sets some data on call
    and then tells you "yeah that worked, or fuck off, or who are you even"

    To me the entire problem should be able to be solved within having a standard issue REST Api.

    That "acknowledgement" endpoint for the message, seems to me like the message a Rest Api likes to give you after every call by default.
  • 1
    @beggarboy one of the rules for a REST API is that communication is stateless, so an acknowledgement endpoint breaks that.
  • 1
    @AL1L not really. It depends on what that endpoint does.

    @pokerface is his function synchronous? Perhaps it needs a callback URL to post the body if the finalized response.
Add Comment