API example in xdk