update api and ui