|
|
|
|
|
by smt88
4343 days ago
|
|
Good APIs are like good code. You don't want to get creative. Instead, you want the API to be usable by being immediately familiar. Follow the lead of popular, well-designed APIs (Parse and Twilio come to mind). You should follow a predictable pattern, which minimizes the amount of time required to learn your API. For example, if your endpoints are in the "/[noun]/[verb].json" scheme, then you should stick to that all the way through. I suggest starting out by strictly adhering to REST standards, and then choose areas where you want to be flexible to increase usability (allowing POST calls to be overridden and interpreted as PUT calls, for example). Check out this checklist: https://mathieu.fenniak.net/the-api-checklist/ I can also enthusiastically recommend Apiary (https://apiary.io) for designing and mocking up your API. It's absolutely fantastic. |
|