update api sample