Making a RESTful web API for notmuch