I'm currently in the process of developing my first API. This is a private api that will send information back and forth between my two sites, not one that will be open to the public. I'm working on making it as robust as possible, but since this is my first time developing something like this I want to make sure I know about any external "gotchas" before I encounter them.

What elements outside of my control could cause my API calls to fail? I assume I should be worried about things like network connectivity but I've been unable to find a definitive list.

  • 1
    Unfortunately, we don't build such lists here. Sep 6 '16 at 23:14
  • 2
    The cleaning lady tripped over the network cable, the cleaning lady tripped over the power cable, the cleaning lady tripped over the water bucket and the water spilled into the server, the cleaning lady unplugged the server to plug in her vacuum cleaner, the janitor fell off the ladder onto the server, a construction worker cut the entire building's network cable with an excavator, the building exploded, … There's literally an infinity of possible reasons. Sep 7 '16 at 6:45
  • In my company, architects make us check OWASP for such matters. owasp.org/index.php/Main_Page
    – Laiv
    Sep 7 '16 at 18:41

Most all of these external problems are already known and listed as error or response codes in existing network protocols. I suggest looking for protocols which do similar things to your API such as HTML, NFS, etc. and examine their list of return codes {item not found, invalid or unknown request, etc.} to find conditions you may wish to incorporate in your API protocol.

NFS (Network File Server) has a long list of various condition codes. https://www.rfc-editor.org/rfc/rfc7530#page-179

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.