Ask HN: Customer facing API, how would you do it?
We already have an internal API used by our app and all the monitoring nodes. Having created this internal API has been great, it adds a nice layer of abstraction and taught us a lot about the creation of API's which are used at scale (many thousands of requests per minute, maybe even per second by now, go through our internal API). Its written in PHP (shock, horror!!) but has done quiet well by us and I think it will live on for a while to come.
We plan to make a REST based API that responds in json....but nothing is in stone until we get more feedback.
Here are some questions to try frame the responses, but feel free to deviate...we're just looking for honest feedback.
1. Whats the one big thing you would suggest we consider when making this API?
2. What is the one big thing you would suggest we don't do?
3. Do you have any examples of API's you like or don't like to work with today? Why do you like or not like them?
4. Are there any frameworks etc you suggest we look at (We're only using PHP & Java today so i would like to avoid introducing a new language)?
Functions we plan to expose initially will do the following:
- Create a monitor
- Delete a monitor
- Edit a monitor
- Get recent results within a time period, and optionally of a certain type (possible types are pass,fail)
- Pause a monitor
- Un-pause a monitor
- Get a list of all monitors (and return some associated details of each)