api sample