Silent Auction API
API for Silent Auction build week project
Auction Endpoints
Auctions are linked to a seller. They contain a name, a unique ID, the time the auction will end, and the ID of the linked seller.
GETGet All Auctions
https://api-silent-auction.herokuapp.com/api/auction
Gets all auctions from the database. Returns an array of auction objects with the following schema:
Example Request
Get All Auctions
200 OK
Example Response
Server
Connection
X-Dns-Prefetch-Control
X-Frame-Options
Strict-Transport-Security
X-Download-Options
X-Content-Type-Options
X-Xss-Protection
Access-Control-Allow-Origin
Content-Type
Content-Length
Etag
Date
Via
GETGet Auction By ID
https://api-silent-auction.herokuapp.com/api/auction/:id
Gets the auction matching the ID in the URL. Returns a single auction object.
PATH VARIABLES
id
Example Request
Get Auction By ID
200 OK
Example Response
X-DNS-Prefetch-Control
X-Frame-Options
Strict-Transport-Security
X-Download-Options
X-Content-Type-Options
X-XSS-Protection
Access-Control-Allow-Origin
Content-Type
Content-Length
ETag
Date
Connection
POSTPost an Auction
https://api-silent-auction.herokuapp.com/api/auction/
Adds an auction to the database. Required parameters are:
- "name" as a string. Must be unique.
- "end_time" in format YYYY-MM-DD HH:MM:SS.
- "seller_id" as a string, which should be an existing seller.
Bodyraw (json)
Example Request
Post an Auction
Example Response
No response body
This request doesn't return any response body
No response headers
This request doesn't return any response headers
PUTUpdate an Auction
https://api-silent-auction.herokuapp.com/api/auction/:id
Updates an auction in the database. You can send just the data that needs to be updated or the whole object, the choice is yours. Updateable paramaters are:
- "name" as a string. Must be unique.
- "end_time" in format YYYY-MM-DD HH:MM:SS.
- "seller_id" as a string, which should be an existing seller.
PATH VARIABLES
id
Bodyraw (json)
Example Request
Update an Auction
Example Response
No response body
This request doesn't return any response body
No response headers
This request doesn't return any response headers