18

Amazing API's and SEX!

Alright people, now that I've got your attention, I'm getting to the point where I need to plan and roll out a solid API for a project. So after reading a lot of the horror stories written here, What are the finer points of what makes an amazing API experience to use and integrate with over a poor one?
And don't say documentation (If you do explain why) 😁

Comments
  • 3
    Well played, bro, well played. I don't know the answer to your question tho...
  • 3
  • 2
    Imo a well designed contract and UI (UI in this case being the URI)
  • 6
    0) always return one single thing
    1) make it clear what are you returning
    2) instead of having a million different calls, have one with multiple parameters
  • 1
    @RazorSh4rk this is what I was thinking. I like this, thank you.. 👍🏼
  • 5
    Don't do it yourself, use a framework. There are tons of things to consider, a framework will take care of that and let's you focus on the important things.
    Try to give the consumer options on the output format, in general a modern/old-school pair is good, like json/xml.
    Provide a sandbox environment for testing and provide complete example responses in all provided formats. There are json->class generators for most programming languages that safes TONS of time for the consumer, they are only usable if all possible fields are provided tho.
    Be consistent and ask yourself what you would expect to get from the end point you're working on
    That's the basics that I can think of right now.
    Hope it helps a bit
  • 0
    @Kimmax definitely helps...👍🏼
    I'll add Sandbox to the list. That's actually going to be pretty important haha.
  • 5
    lost interest at "SEX"
  • 2
    1) Be consistent (don't mix REST with RPC for example)
    2) See point 1.
  • 1
    I think making it human understandable, so even your trainees can understand it in a reasonable time...
    And lok for standards to apply to...pike the rfc for json or something like that.
    No one likes nonstandard compliant interfaces
  • 1
    Go CRUD with REST API, secure with JWT and write a good openapi documentation.
Add Comment