Skip to content

API Docs

phonzay1 edited this page Jan 22, 2025 · 20 revisions

GET /api/bins

200, list of bins: JSON object array ex. [{"random_id":"abcd123"}, {"random_id":"bcde123"}]

GET /api/new_bin_id (to get a new random_id)

200, string (returns a 7-character random string)

POST /api/bins Body: {newBinID: string}

201, JSON object with new bin data ex. {"random_id":"abcd123"}

GET /api/bins/:random_id

200, {random_id: string, requests: Array<{id: number, method: string, path: string (ex. '/spork45?name=bob&age=30'), headers: Object, body: Object || null, date: string, time: string}>

DELETE /api/bins/:random_id

204


/api/bins/:id/requests

Do we need a separate API endpoint for this? Request items info is being sent w/ the bin (see GET /api/bins/:id above). Request items are created when a POST request is sent to the bin receiving URL.

Clone this wiki locally