States API
MVC style Node.js REST API using Express, Mongoose, and MongoDB
Data also provided by JSON file
| ROUTE |
GET |
| /states/ |
All state data returned |
| /states/?contig=true |
All state data for contiguous states (Not AK or HI) |
| /states/?contig=false |
All state data for non-contiguous states (AK, HI) |
| /states/:state |
All data for the state URL parameter |
| /states/:state/funfact |
A random fun fact for the state URL parameter |
| /states/:state/capital |
{ 'state': stateName, 'capital': capitalName } |
| /states/:state/nickname |
{ 'state': stateName, 'nickname': nickname } |
| /states/:state/population |
{ 'state': stateName, 'population': population } |
| /states/:state/admission |
{ 'state': stateName, 'admitted': admissionDate } |
| ROUTE |
POST/PATCH/DELETE |
| /states/:state/funfact |
The result received from MongoDB |
Quotes API
PHP OOP REST API using PostgreSQL on Render.com
| ROUTE |
GET |
| /api/quotes/ |
All quotes are returned |
| /api/quotes/?id=4 |
The specific quote |
| /api/quotes/?author_id=10 |
All quotes from author_id=10 |
| /api/quotes/?category_id=8 |
All quotes in category_id=8 |
| /api/quotes/?author_id=3&category_id=4 |
All quotes from authorId=3 that are in category_id=4 |
| /api/authors/ |
All authors with their id |
| /api/authors/?id=5 |
The specific author with their id |
| /api/categories/ |
All categories with their ids (id, category) |
| /api/categories/?id=7 |
The specific category with its id |
| ROUTE |
POST/PUT |
DELETE |
| api/quotes/ |
created/updated quote (id, quote, author_id, category_id) |
id of deleted quote |
| api/authors/ |
created/updated author (id, author) |
id of deleted author |
| api/categories/ |
created/updated category (id, category) |
id of deleted category |
Products API
Python Flask SQLite REST API
| ROUTE |
GET |
POST |
| /product |
gets all products |
creates new product (name, description, price, quantity JSON object required) |
| ROUTE |
GET |
PUT |
DELETE |
| /product/:id |
gets product by ID |
updates existing product (name, description, price, quantity JSON object required) |
deletes product by id |