draft of HTTP api, talking to AG Sync server