This repo contains a digitized version of the course content for CYBR8470 Secure Web App Development at the University of Nebraska at Omaha.
This exercise is to practice the skills you learned about in the Building a Server Lab. See the submission section for more information about what you should submit for this lab assignment.
You should build a new API endpoint that allows an end user to create a new Dog
model by making a POST
to /api/dogs
, view current dogs that have been saved to the server before by making a GET
to /api/dogs, and get, modify, or delete an existing Dog
record by making a GET
, PUT
, or DELETE
request (respectively) to /api/dogs/<id>
where <id>
is the id of the Dog
record to be retrieved, modified, or deleted. Since a Dog
includes a foreign key to the breed, you also need to make the same type of endpoints for dog breed at /api/breeds/
and /api/breeds/<id>
.
A dog should contain the following fields:
A breed should contain the following fields:
To do this, do the following:
Dog
and Breed
models to models.pyDog
and Breed
class-based API view
controllers for handling Dog
REST endpoints to controllers.py
DogDetail
and one DogList
to conform to best practice nomenclatureDogDetail
class should have three methods named get
, put
, delete
DogList
class should have two methods named get
and post
class-based API view
controllers for handling Breed
REST endpoints to controllers.py
BreedDetail
and one BreedList
to conform to best practice nomenclatureBreedDetail
class should have three methods named get
, put
, delete
BreedList
class should have two methods named get
and post
POSTMAN
, taking screenshots of each type of request. There should be 5 requests total for each type of model, for a total of 10 tests and screenshots.
/api/dogs/
/api/dogs/<id>
/api/breeds/
/api/breeds/<id>
Submit a link to canvas with a link to your github repository along with the screenshots showing that you tested each method type.