Input Output interview question

How would you implement a REST API? describe how would you organise the code, how would you handle request parameters, how would you test it...etc