Created
May 9, 2019 18:45
-
-
Save robwhess/632be309976713c248861cab2061c57a to your computer and use it in GitHub Desktop.
Postman collection for testing businesses API
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "info": { | |
| "_postman_id": "bb528654-b92d-4752-8acd-0b3c2b951d0f", | |
| "name": "Businesses API", | |
| "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json" | |
| }, | |
| "item": [ | |
| { | |
| "name": "Businesses", | |
| "item": [ | |
| { | |
| "name": "Fetch a page of businesses", | |
| "request": { | |
| "method": "GET", | |
| "header": [], | |
| "body": { | |
| "mode": "raw", | |
| "raw": "" | |
| }, | |
| "url": { | |
| "raw": "http://localhost:8000/businesses?page=1", | |
| "protocol": "http", | |
| "host": [ | |
| "localhost" | |
| ], | |
| "port": "8000", | |
| "path": [ | |
| "businesses" | |
| ], | |
| "query": [ | |
| { | |
| "key": "page", | |
| "value": "1" | |
| } | |
| ] | |
| } | |
| }, | |
| "response": [] | |
| }, | |
| { | |
| "name": "Create a new business", | |
| "request": { | |
| "method": "POST", | |
| "header": [ | |
| { | |
| "key": "Content-Type", | |
| "value": "application/json" | |
| } | |
| ], | |
| "body": { | |
| "mode": "raw", | |
| "raw": "{\n \"ownerid\": 16,\n \"name\": \"American Dream Pizza\",\n \"address\": \"2525 NW Monroe Ave.\",\n \"city\": \"Corvallis\",\n \"state\": \"OR\",\n \"zip\": \"97330\",\n \"phone\": \"541-757-1713\",\n \"category\": \"Restaurant\",\n \"subcategory\": \"Pizza\",\n \"website\": \"http://adpizza.com\"\n}" | |
| }, | |
| "url": { | |
| "raw": "http://localhost:8000/businesses", | |
| "protocol": "http", | |
| "host": [ | |
| "localhost" | |
| ], | |
| "port": "8000", | |
| "path": [ | |
| "businesses" | |
| ] | |
| } | |
| }, | |
| "response": [] | |
| }, | |
| { | |
| "name": "Update an existing business", | |
| "request": { | |
| "method": "PUT", | |
| "header": [ | |
| { | |
| "key": "Content-Type", | |
| "value": "application/json" | |
| } | |
| ], | |
| "body": { | |
| "mode": "raw", | |
| "raw": "{\n \"ownerid\": 16,\n \"name\": \"American Dream Pizza\",\n \"address\": \"214 SW 2nd St.\",\n \"city\": \"Corvallis\",\n \"state\": \"OR\",\n \"zip\": \"97333\",\n \"phone\": \"541-753-7373\",\n \"category\": \"Restaurant\",\n \"subcategory\": \"Pizza\",\n \"website\": \"http://adpizza.com\"\n}" | |
| }, | |
| "url": { | |
| "raw": "http://localhost:8000/businesses/20", | |
| "protocol": "http", | |
| "host": [ | |
| "localhost" | |
| ], | |
| "port": "8000", | |
| "path": [ | |
| "businesses", | |
| "20" | |
| ] | |
| } | |
| }, | |
| "response": [] | |
| }, | |
| { | |
| "name": "Delete a business", | |
| "request": { | |
| "method": "DELETE", | |
| "header": [], | |
| "body": { | |
| "mode": "raw", | |
| "raw": "" | |
| }, | |
| "url": { | |
| "raw": "http://localhost:8000/businesses/20", | |
| "protocol": "http", | |
| "host": [ | |
| "localhost" | |
| ], | |
| "port": "8000", | |
| "path": [ | |
| "businesses", | |
| "20" | |
| ] | |
| } | |
| }, | |
| "response": [] | |
| }, | |
| { | |
| "name": "Get info for a single business", | |
| "request": { | |
| "method": "GET", | |
| "header": [], | |
| "body": { | |
| "mode": "raw", | |
| "raw": "" | |
| }, | |
| "url": { | |
| "raw": "http://localhost:8000/businesses/5", | |
| "protocol": "http", | |
| "host": [ | |
| "localhost" | |
| ], | |
| "port": "8000", | |
| "path": [ | |
| "businesses", | |
| "5" | |
| ] | |
| } | |
| }, | |
| "response": [] | |
| } | |
| ] | |
| }, | |
| { | |
| "name": "Reviews", | |
| "item": [ | |
| { | |
| "name": "Create a new review", | |
| "request": { | |
| "method": "POST", | |
| "header": [ | |
| { | |
| "key": "Content-Type", | |
| "value": "application/json" | |
| } | |
| ], | |
| "body": { | |
| "mode": "raw", | |
| "raw": "{\n\t\"userid\": 7,\n\t\"businessid\": 4,\n\t\"dollars\": 3,\n\t\"stars\": 5,\n\t\"review\": \"Great produce!\"\n }" | |
| }, | |
| "url": { | |
| "raw": "http://localhost:8000/reviews", | |
| "protocol": "http", | |
| "host": [ | |
| "localhost" | |
| ], | |
| "port": "8000", | |
| "path": [ | |
| "reviews" | |
| ] | |
| } | |
| }, | |
| "response": [] | |
| }, | |
| { | |
| "name": "Try to create duplicate review", | |
| "request": { | |
| "method": "POST", | |
| "header": [ | |
| { | |
| "key": "Content-Type", | |
| "value": "application/json" | |
| } | |
| ], | |
| "body": { | |
| "mode": "raw", | |
| "raw": "{\n\t\"userid\": 7,\n\t\"businessid\": 4,\n\t\"dollars\": 3,\n\t\"stars\": 5,\n\t\"review\": \"This is a duplicate review.\"\n}" | |
| }, | |
| "url": { | |
| "raw": "http://localhost:8000/reviews", | |
| "protocol": "http", | |
| "host": [ | |
| "localhost" | |
| ], | |
| "port": "8000", | |
| "path": [ | |
| "reviews" | |
| ] | |
| } | |
| }, | |
| "response": [] | |
| }, | |
| { | |
| "name": "Update an existing review", | |
| "request": { | |
| "method": "PUT", | |
| "header": [ | |
| { | |
| "key": "Content-Type", | |
| "value": "application/json" | |
| } | |
| ], | |
| "body": { | |
| "mode": "raw", | |
| "raw": "{\n\t\"userid\": 7,\n\t\"businessid\": 4,\n\t\"dollars\": 2,\n\t\"stars\": 5,\n\t\"review\": \"Great produce! And cheaper!\"\n}" | |
| }, | |
| "url": { | |
| "raw": "http://localhost:8000/reviews/11", | |
| "protocol": "http", | |
| "host": [ | |
| "localhost" | |
| ], | |
| "port": "8000", | |
| "path": [ | |
| "reviews", | |
| "11" | |
| ] | |
| } | |
| }, | |
| "response": [] | |
| }, | |
| { | |
| "name": "Try to change review businessID and userID", | |
| "request": { | |
| "method": "PUT", | |
| "header": [ | |
| { | |
| "key": "Content-Type", | |
| "value": "application/json" | |
| } | |
| ], | |
| "body": { | |
| "mode": "raw", | |
| "raw": "{\n\t\"userid\": 4,\n\t\"businessid\": 2,\n\t\"dollars\": 2,\n\t\"stars\": 5,\n\t\"review\": \"Great produce! And cheaper!\"\n}" | |
| }, | |
| "url": { | |
| "raw": "http://localhost:8000/reviews/11", | |
| "protocol": "http", | |
| "host": [ | |
| "localhost" | |
| ], | |
| "port": "8000", | |
| "path": [ | |
| "reviews", | |
| "11" | |
| ] | |
| } | |
| }, | |
| "response": [] | |
| }, | |
| { | |
| "name": "Get a specific review", | |
| "request": { | |
| "method": "GET", | |
| "header": [], | |
| "body": { | |
| "mode": "raw", | |
| "raw": "" | |
| }, | |
| "url": { | |
| "raw": "http://localhost:8000/reviews/1", | |
| "protocol": "http", | |
| "host": [ | |
| "localhost" | |
| ], | |
| "port": "8000", | |
| "path": [ | |
| "reviews", | |
| "1" | |
| ] | |
| } | |
| }, | |
| "response": [] | |
| }, | |
| { | |
| "name": "Delete a review", | |
| "request": { | |
| "method": "DELETE", | |
| "header": [], | |
| "body": { | |
| "mode": "raw", | |
| "raw": "" | |
| }, | |
| "url": { | |
| "raw": "http://localhost:8000/reviews/11", | |
| "protocol": "http", | |
| "host": [ | |
| "localhost" | |
| ], | |
| "port": "8000", | |
| "path": [ | |
| "reviews", | |
| "11" | |
| ] | |
| } | |
| }, | |
| "response": [] | |
| } | |
| ] | |
| }, | |
| { | |
| "name": "Photos", | |
| "item": [ | |
| { | |
| "name": "Create a new photo", | |
| "request": { | |
| "method": "POST", | |
| "header": [ | |
| { | |
| "key": "Content-Type", | |
| "value": "application/json" | |
| } | |
| ], | |
| "body": { | |
| "mode": "raw", | |
| "raw": "{\n\t\"userid\": 7,\n\t\"businessid\": 4,\n\t\"caption\": \"Kale!\"\n}" | |
| }, | |
| "url": { | |
| "raw": "http://localhost:8000/photos", | |
| "protocol": "http", | |
| "host": [ | |
| "localhost" | |
| ], | |
| "port": "8000", | |
| "path": [ | |
| "photos" | |
| ] | |
| } | |
| }, | |
| "response": [] | |
| }, | |
| { | |
| "name": "Update an existing photo", | |
| "request": { | |
| "method": "PUT", | |
| "header": [ | |
| { | |
| "key": "Content-Type", | |
| "value": "application/json" | |
| } | |
| ], | |
| "body": { | |
| "mode": "raw", | |
| "raw": "{\n\t\"userid\": 7,\n\t\"businessid\": 4,\n\t\"caption\": \"Yummy! Kale!\"\n}" | |
| }, | |
| "url": { | |
| "raw": "http://localhost:8000/photos/11", | |
| "protocol": "http", | |
| "host": [ | |
| "localhost" | |
| ], | |
| "port": "8000", | |
| "path": [ | |
| "photos", | |
| "11" | |
| ] | |
| } | |
| }, | |
| "response": [] | |
| }, | |
| { | |
| "name": "Try to change photo businessID and userID", | |
| "request": { | |
| "method": "PUT", | |
| "header": [ | |
| { | |
| "key": "Content-Type", | |
| "value": "application/json" | |
| } | |
| ], | |
| "body": { | |
| "mode": "raw", | |
| "raw": "{\n\t\"userid\": 6,\n\t\"businessid\": 2,\n\t\"caption\": \"Yummy! Kale!\"\n}" | |
| }, | |
| "url": { | |
| "raw": "http://localhost:8000/photos/11", | |
| "protocol": "http", | |
| "host": [ | |
| "localhost" | |
| ], | |
| "port": "8000", | |
| "path": [ | |
| "photos", | |
| "11" | |
| ] | |
| } | |
| }, | |
| "response": [] | |
| }, | |
| { | |
| "name": "Get a specific photo", | |
| "request": { | |
| "method": "GET", | |
| "header": [], | |
| "body": { | |
| "mode": "raw", | |
| "raw": "" | |
| }, | |
| "url": { | |
| "raw": "http://localhost:8000/photos/11", | |
| "protocol": "http", | |
| "host": [ | |
| "localhost" | |
| ], | |
| "port": "8000", | |
| "path": [ | |
| "photos", | |
| "11" | |
| ] | |
| } | |
| }, | |
| "response": [] | |
| }, | |
| { | |
| "name": "Delete a photo", | |
| "request": { | |
| "method": "DELETE", | |
| "header": [], | |
| "body": { | |
| "mode": "raw", | |
| "raw": "" | |
| }, | |
| "url": { | |
| "raw": "http://localhost:8000/photos/11", | |
| "protocol": "http", | |
| "host": [ | |
| "localhost" | |
| ], | |
| "port": "8000", | |
| "path": [ | |
| "photos", | |
| "11" | |
| ] | |
| } | |
| }, | |
| "response": [] | |
| } | |
| ] | |
| }, | |
| { | |
| "name": "Users", | |
| "item": [ | |
| { | |
| "name": "Fetch a list of a user's businesses", | |
| "request": { | |
| "method": "GET", | |
| "header": [], | |
| "body": { | |
| "mode": "raw", | |
| "raw": "" | |
| }, | |
| "url": { | |
| "raw": "http://localhost:8000/users/1/businesses", | |
| "protocol": "http", | |
| "host": [ | |
| "localhost" | |
| ], | |
| "port": "8000", | |
| "path": [ | |
| "users", | |
| "1", | |
| "businesses" | |
| ] | |
| } | |
| }, | |
| "response": [] | |
| }, | |
| { | |
| "name": "Fetch a list of a user's reviews", | |
| "request": { | |
| "method": "GET", | |
| "header": [], | |
| "body": { | |
| "mode": "raw", | |
| "raw": "" | |
| }, | |
| "url": { | |
| "raw": "http://localhost:8000/users/11/reviews", | |
| "protocol": "http", | |
| "host": [ | |
| "localhost" | |
| ], | |
| "port": "8000", | |
| "path": [ | |
| "users", | |
| "11", | |
| "reviews" | |
| ] | |
| } | |
| }, | |
| "response": [] | |
| }, | |
| { | |
| "name": "Fetch a list of a user's photos", | |
| "request": { | |
| "method": "GET", | |
| "header": [], | |
| "body": { | |
| "mode": "raw", | |
| "raw": "" | |
| }, | |
| "url": { | |
| "raw": "http://localhost:8000/users/11/photos", | |
| "protocol": "http", | |
| "host": [ | |
| "localhost" | |
| ], | |
| "port": "8000", | |
| "path": [ | |
| "users", | |
| "11", | |
| "photos" | |
| ] | |
| } | |
| }, | |
| "response": [] | |
| } | |
| ] | |
| } | |
| ] | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment