GIC Interview Question

How would you design an API to serve a particular function?