scalar api example