Momentum logo
Team 10 Classroom

๐Ÿป Designing Your Models & Your API ๐Ÿป

Posted on Dec 14th, 2021

๐Ÿ—“๏ธ Todayโ€™s Topics

  • Models for your collaborative project
  • Designing the urls you need
  • Review permissions & CORS

๐ŸŽฏ Project

Today you should have your models nailed down and be able to work with them in the admin and the shell โ€“ that is, you can save them to the database and retrieve them, and all the relationships work properly.

You should have a WRITTEN DOWN plan for at least the basic set of urls that your front-end will need. You may make changes to this as you go but you need a place to begin.

When creating your list of endpoints, remember: only build what you need.

  • What lists or collections of data will you need to return?
  • What single resources will you need to return?
  • What HTTP methods will you need to support for your urls?
  • Which routes will need to be authenticated and which do not require authentication?
  • Will you need to restrict any actions at the object level?

By Friday

  • be returning JSON for GET requests for questions and answers / cards and friends
  • be able to accept POST requests to create questions and answers / cards and friends

๐Ÿ”– Resources

Permissions

CORS

๐Ÿฆ‰ Code

Back to home