api update

explain how the sql is populated