{"info":{"_postman_id":"ff2af30c-ad99-42fb-8cc0-5e3844e07fd7","name":"Raft DRF Exercise","description":"<html><head></head><body><p>This is a django-based api allows users to upload a pipe (\"|\") delimited text file containing order data to a PostgreSQL data base and retrieve previously uploaded order data. You will need python3 and postgreSQL install to run this api.</p>\n<h1 id=\"base-url\">Base URL</h1>\n<p>When running locally with the built in django server, the base URL is as follows:</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-bash\">http://127.0.0.1:8000/api/\n</code></pre>\n<h1 id=\"error-codes\">Error Codes</h1>\n<p>Below are a list of errors that may be raised as part of the API</p>\n<h2 id=\"400-bad-request\">400: Bad Request</h2>\n<p>This is returned when the request is malformed in some way. (i.e. Required info is missing)</p>\n<h2 id=\"404-not-found\">404: Not Found</h2>\n<p>This is returned when the requested resource does not exist.</p>\n<h2 id=\"405-method-not-allowed\">405: Method Not Allowed</h2>\n<p>This is returned when the incorrect request method is specified at an endpoint. (i.e. Attempting to delete without specifying a specific drink to delete)</p>\n<h2 id=\"422-unprocessable-entity\">422: Unprocessable Entity</h2>\n<p>This is returned when the request is unable to be fulfilled in some way. (i.e. Attempting to update a drink that has previously been deleted)</p>\n<h2 id=\"500-internal-server-error\">500: Internal Server Error</h2>\n<p>This is returned when something there is a problem with the server.</p>\n</body></html>","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[{"content":"Base URL","slug":"base-url"},{"content":"Error Codes","slug":"error-codes"}],"owner":"10868159","collectionId":"ff2af30c-ad99-42fb-8cc0-5e3844e07fd7","publishedId":"TVep8TFw","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"EF5B25"},"publishDate":"2020-11-15T01:20:53.000Z"},"item":[{"name":"Create Upload","id":"a39ef951-0c68-4222-bef5-5b932f09b12b","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"url":"/upload","description":"<p>Create a new upload</p>\n<p>Parameters:</p>\n<ul>\n<li>file (text/plain): A pipe (\"|\") delimited text file containing order data</li>\n</ul>\n","urlObject":{"path":["upload"],"query":[],"variable":[]}},"response":[{"id":"6fc05bb7-9ca0-4a4c-958b-024e990f8c10","name":"Unprocessable Entity","originalRequest":{"method":"POST","header":[],"body":{"mode":"formdata","formdata":[{"key":"","type":"file","src":"/home/dneal/Documents/upload.txt"}]},"url":"http://127.0.0.1:8000/api/upload"},"status":"Unprocessable Entity","code":422,"_postman_previewlanguage":"plain","header":[{"key":"Connection","value":"keep-alive"},{"key":"Server","value":"gunicorn/20.0.4"},{"key":"Date","value":"Sun, 15 Nov 2020 05:30:12 GMT"},{"key":"Vary","value":"Accept, Cookie"},{"key":"Allow","value":"POST, OPTIONS"},{"key":"X-Frame-Options","value":"DENY"},{"key":"Content-Length","value":"0"},{"key":"X-Content-Type-Options","value":"nosniff"},{"key":"Referrer-Policy","value":"same-origin"},{"key":"Via","value":"1.1 vegur"}],"cookie":[],"responseTime":null,"body":null},{"id":"8d344c99-9795-4a88-a158-859dccadf921","name":"Successful Request","originalRequest":{"method":"POST","header":[],"body":{"mode":"formdata","formdata":[{"key":"","type":"file","src":"/home/dneal/Documents/upload.txt"}]},"url":"http://127.0.0.1:8000/api/upload"},"status":"- CREATED","code":201,"_postman_previewlanguage":null,"header":null,"cookie":[],"responseTime":null,"body":"{\n    \"upload_id\": 1\n}"},{"id":"fa24994a-4822-40da-9e38-78a43ae75bb2","name":"Bad Request","originalRequest":{"method":"POST","header":[],"body":{"mode":"formdata","formdata":[]},"url":"http://127.0.0.1:8000/api/upload"},"status":"Bad Request","code":400,"_postman_previewlanguage":"json","header":[{"key":"Connection","value":"keep-alive"},{"key":"Server","value":"gunicorn/20.0.4"},{"key":"Date","value":"Sun, 15 Nov 2020 05:28:10 GMT"},{"key":"Content-Type","value":"application/json"},{"key":"Vary","value":"Accept, Cookie"},{"key":"Allow","value":"POST, OPTIONS"},{"key":"X-Frame-Options","value":"DENY"},{"key":"Content-Length","value":"15"},{"key":"X-Content-Type-Options","value":"nosniff"},{"key":"Referrer-Policy","value":"same-origin"},{"key":"Via","value":"1.1 vegur"}],"cookie":[],"responseTime":null,"body":""}],"_postman_id":"a39ef951-0c68-4222-bef5-5b932f09b12b"},{"name":"Read Upload","id":"862aed51-97bc-4855-9a4a-2f68bddab932","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"/upload/{{upload_id}}","description":"<p>Retrieve an existing upload</p>\n<p>Parameters:</p>\n<ul>\n<li>upload_id (int): The id of the upload to retrieve</li>\n</ul>\n","urlObject":{"path":["upload","{{upload_id}}"],"query":[],"variable":[]}},"response":[{"id":"061c151a-ea12-4738-a244-b7e8d02369a2","name":"Successful Request","originalRequest":{"method":"GET","header":[],"url":"http://127.0.0.1:8000/api/upload/{{upload_id}}"},"status":"OK","code":200,"_postman_previewlanguage":null,"header":null,"cookie":[],"responseTime":null,"body":"{\n    \"upload_id\": 1,\n    \"number_of_rows\": 2,\n    \"items\": [\n        \"Eggs\",\n        \"Milk\"\n    ]\n}"},{"id":"42ebe39d-81c2-44ce-b961-4adb5bcc715f","name":"Not Found","originalRequest":{"method":"GET","header":[],"url":"http://127.0.0.1:8000/api/upload/3"},"status":"Not Found","code":404,"_postman_previewlanguage":"plain","header":[{"key":"Connection","value":"keep-alive"},{"key":"Server","value":"gunicorn/20.0.4"},{"key":"Date","value":"Sun, 15 Nov 2020 05:37:36 GMT"},{"key":"Vary","value":"Accept, Cookie"},{"key":"Allow","value":"OPTIONS, GET"},{"key":"X-Frame-Options","value":"DENY"},{"key":"Content-Length","value":"0"},{"key":"X-Content-Type-Options","value":"nosniff"},{"key":"Referrer-Policy","value":"same-origin"},{"key":"Via","value":"1.1 vegur"}],"cookie":[],"responseTime":null,"body":null}],"_postman_id":"862aed51-97bc-4855-9a4a-2f68bddab932"}]}