Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
Well played, bro, well played. I don't know the answer to your question tho...
-
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 -
Kimmax109877yDon'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 -
@Kimmax definitely helps...👍🏼
I'll add Sandbox to the list. That's actually going to be pretty important haha. -
devnope5397yI 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 -
Go CRUD with REST API, secure with JWT and write a good openapi documentation.
Related Rants
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) 😁
undefined
give me opinions
ahhh peee eyeeee
api
tell me stories