I’m designing a rest api about Quiz System, user need to login to do the quiz , there are functions like GetQuiz,GetQuestion.
And other set of api for management of those user and quizs, there are functions like
AddQuestionToQuiz,DeleteQuiz,CreateUser
Now i am confused about how to design it.
Thanks in advance!
I’m designing a rest api about Quiz System, user need to login to do
Share
You need to think in resources and not in method calls. A quiz might be a resource, a user might be a resource, a question might be a resource. All resources support GET, POST,PUT, DELETE.
Sometimes to help me think it through, I think what a website would look like where the resources are HTML and it has links (hypermedia)
HTH