Hacker News new | ask | show | jobs
by jmathai 5125 days ago
We implemented something similar for The OpenPhoto Project where every URL a user visits is a visual representation of an API endpoint.

My site, for example, is at http://jmathai.openphoto.me/photos/list. You can add ".json" to the end to see the JSON representation of that page. http://jmathai.openphoto.me/photos/list.json. The same rule applies across the site.

We wrote about it a while back.

http://blog.theopenphotoproject.org/post/8462620991/clean-ur...

1 comments

this seems like pretty standard REST
It's REST-ish. But the highlight I was hinting at is making the API itself be more discoverable. We did it by mapping the API directly to the web UI such that html just becomes the default format type of the API.