API to asterixDB: half done