Dynamic API Phase 3: Add Database Abstraction and Associations to your API
Author: Tek Jones
Collection Interface which will consume a Sequelize Model and perform generic Database CRUD operations
Deployed Links: https://tekjones-api-server.herokuapp.com/
- Status Code 200
- JSON response:
- Returns and array of
customers
containing- breed: STRING
- age: NUMBER
- Returns and array of
- Status Code 200
- JSON response:
- Creates a new
customers
item - Returns a newly created
customers
item containing:- breed: STRING
- age: NUMBER
- Creates a new
- Status Code 200
- JSON response:
- Returns a single instance
customers
based on thecustomersId
containing:- breed: STRING
- age: NUMBER
- Returns a single instance
- Status Code 200
- JSON response:
- Updates a single instance of
customers
based on thecustomersId
, returns newly updated item containing:- breed: STRING
- age: NUMBER
- Updates a single instance of
- Status Code 204
- Removes a single instance of
customers
based on thecustomersId
, no body:
- Status Code 200
- JSON response:
- Returns and array of
receipts
containing- name: STRING
- year: NUMBER
- Returns and array of
- Status Code 200
- JSON response:
- Creates a new
receipts
item - Returns a newly created
receipts
item containing:- name: STRING
- year: NUMBER
- Creates a new
- Status Code 200
- JSON response:
- Returns a single instance
receipts
based on thereceiptsId
containing:- name: STRING
- year: NUMBER
- Returns a single instance
- Status Code 200
- JSON response:
- Updates a single instance of
receipts
based on thereceiptsId
, returns newly updated item containing:- name: STRING
- year: NUMBER
- Updates a single instance of
- Status Code 204
- Removes a single instance of
receipts
based on thereceiptsId
, no body: