Frist pass at the HTTP API.