API takes db-spec as first arg