update api example script