Infosys Interview Question

Write an example code for API