{"info":{"_postman_id":"1c09a191-8f03-4ebc-a595-9fb31b9f6073","name":"course-search-api","description":"<html><head></head><body><p>A RESTFull HTTP API similar to Hopkin's Class Search API which is simpler in many ways yet more versatile in other ways!</p>\n</body></html>","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[],"owner":"5985525","collectionId":"1c09a191-8f03-4ebc-a595-9fb31b9f6073","publishedId":"TWDRu1NL","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"EF5B25"},"publishDate":"2021-02-14T23:48:18.000Z"},"item":[{"name":"Get Courses","id":"c6cdd810-929d-4d3c-875a-d96219e8788d","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"http://localhost:4567/api/courses","urlObject":{"path":["api","courses"],"host":["http://localhost:4567"],"query":[],"variable":[]}},"response":[{"id":"8781c4f7-4d20-4ab9-8ca1-28dc54f5aefd","name":"Get Courses","originalRequest":{"method":"GET","header":[],"url":"http://localhost:4567/api/courses"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Mon, 15 Feb 2021 00:42:44 GMT"},{"key":"Content-Type","value":"application/json"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Server","value":"Jetty(9.4.31.v20200723)"}],"cookie":[],"responseTime":null,"body":"[\n    {\n        \"Offering Name\": \"EN.500.112\",\n        \"Title\": \"GATEWAY COMPUTING: JAVA\"\n    },\n    {\n        \"Offering Name\": \"EN.601.220\",\n        \"Title\": \"INTERMEDIATE PROGRAMMING\"\n    },\n    {\n        \"Offering Name\": \"EN.601.226\",\n        \"Title\": \"DATA STRUCTURES\"\n    },\n    {\n        \"Offering Name\": \"EN.601.229\",\n        \"Title\": \"COMPUTER SYSTEM FUNDAMENTALS\"\n    },\n    {\n        \"Offering Name\": \"EN.601.230\",\n        \"Title\": \"AUTOMATA and COMPUTATION THEORY\"\n    },\n    {\n        \"Offering Name\": \"EN.601.315\",\n        \"Title\": \"Databases\"\n    },\n    {\n        \"Offering Name\": \"EN.601.476\",\n        \"Title\": \"Machine Learning: Data to Models\"\n    },\n    {\n        \"Offering Name\": \"EN.601.621\",\n        \"Title\": \"Object-Oriented Software Engineering\"\n    },\n    {\n        \"Offering Name\": \"EN.601.676\",\n        \"Title\": \"Machine Learning: Data to Models\"\n    }\n]"}],"_postman_id":"c6cdd810-929d-4d3c-875a-d96219e8788d"},{"name":"Search for a courses given title","event":[{"listen":"prerequest","script":{"id":"844f73c9-9e95-4699-bdd2-55767d8ca7f7","exec":["pm.variables.set('title', \"data\");"],"type":"text/javascript"}}],"id":"e3a94464-5f0e-4567-8b1e-a572b59a5810","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"http://localhost:4567/api/courses?title={{title}}","urlObject":{"path":["api","courses"],"host":["http://localhost:4567"],"query":[{"key":"title","value":"{{title}}"}],"variable":[]}},"response":[{"id":"c03c9e31-f088-4562-8327-8dc9045ebd3a","name":"Search for a courses given title","originalRequest":{"method":"GET","header":[],"url":{"raw":"http://localhost:4567/api/courses?title={{title}}","host":["http://localhost:4567"],"path":["api","courses"],"query":[{"key":"title","value":"{{title}}"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Connection","value":"close"},{"key":"Date","value":"Mon, 15 Feb 2021 01:09:11 GMT"},{"key":"Content-Type","value":"application/json"},{"key":"Server","value":"Jetty(9.4.31.v20200723)"},{"key":"Via","value":"1.1 vegur"}],"cookie":[],"responseTime":null,"body":"[\n    {\n        \"Offering Name\": \"EN.601.226\",\n        \"Title\": \"DATA STRUCTURES\"\n    },\n    {\n        \"Offering Name\": \"EN.601.315\",\n        \"Title\": \"Databases\"\n    },\n    {\n        \"Offering Name\": \"EN.601.476\",\n        \"Title\": \"Machine Learning: Data to Models\"\n    },\n    {\n        \"Offering Name\": \"EN.601.676\",\n        \"Title\": \"Machine Learning: Data to Models\"\n    }\n]"}],"_postman_id":"e3a94464-5f0e-4567-8b1e-a572b59a5810"},{"name":"Get course information with path variable","event":[{"listen":"prerequest","script":{"id":"66c01fcf-3694-4b9c-a716-c08aad78c4af","exec":["pm.variables.set('offeringName', \"EN.601.226\");"],"type":"text/javascript"}}],"id":"9675d41b-78b8-47f9-8c88-767a18061698","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"http://localhost:4567/api/courses/:offeringName","urlObject":{"path":["api","courses",":offeringName"],"host":["http://localhost:4567"],"query":[],"variable":[{"type":"string","value":"{{offeringName}}","key":"offeringName"}]}},"response":[{"id":"05a56159-26bf-4cff-a7eb-9fd3cf2e0307","name":"Get course information with path variable","originalRequest":{"method":"GET","header":[],"url":{"raw":"http://localhost:4567/api/courses/:offeringName","host":["http://localhost:4567"],"path":["api","courses",":offeringName"],"variable":[{"key":"offeringName","value":"{{offeringName}}","type":"string"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Mon, 15 Feb 2021 00:38:31 GMT"},{"key":"Content-Type","value":"application/json"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Server","value":"Jetty(9.4.31.v20200723)"}],"cookie":[],"responseTime":null,"body":"{\n    \"Offering Name\": \"EN.601.226\",\n    \"Title\": \"Data Structures\"\n}"}],"_postman_id":"9675d41b-78b8-47f9-8c88-767a18061698"},{"name":"Get course information with offeringName not in the database","event":[{"listen":"prerequest","script":{"id":"8286c7fb-9435-45db-a979-d37edeb29fe9","exec":["pm.variables.set('invalidOfferingName', \"EN.000.999\");"],"type":"text/javascript"}}],"id":"2cf75f20-1bf6-4342-9a4d-612d033b3811","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"http://localhost:4567/api/courses/:offeringName","urlObject":{"path":["api","courses",":offeringName"],"host":["http://localhost:4567"],"query":[],"variable":[{"type":"string","value":"{{invalidOfferingName}}","key":"offeringName"}]}},"response":[{"id":"72a48bf0-ef0c-48f8-83f4-56acacc8cca9","name":"Get course information with offeringName not in the database","originalRequest":{"method":"GET","header":[],"url":{"raw":"http://localhost:4567/api/courses/:offeringName","host":["http://localhost:4567"],"path":["api","courses",":offeringName"],"variable":[{"key":"offeringName","value":"{{invalidOfferingName}}","type":"string"}]}},"status":"Not Found","code":404,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Mon, 15 Feb 2021 00:39:07 GMT"},{"key":"Content-Type","value":"application/json"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Server","value":"Jetty(9.4.31.v20200723)"}],"cookie":[],"responseTime":null,"body":"{\n    \"error\": \"Resource not found\",\n    \"status\": \"404\"\n}"}],"_postman_id":"2cf75f20-1bf6-4342-9a4d-612d033b3811"},{"name":"Create a course","id":"0578fb84-fa50-4afb-8560-b0739f1e0b68","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"Offering Name\": \"EN.601.421\",\n    \"Title\": \"Object-Oriented Software Engineering\"\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:4567/api/courses","urlObject":{"path":["api","courses"],"host":["http://localhost:4567"],"query":[],"variable":[]}},"response":[{"id":"7ebd9630-79f5-4657-abbe-1a5485eb3424","name":"Create a course","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"Offering Name\": \"EN.601.421\",\n    \"Title\": \"Object-Oriented Software Engineering\"\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:4567/api/courses"},"status":"Created","code":201,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Mon, 15 Feb 2021 00:42:56 GMT"},{"key":"Content-Type","value":"application/json"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Server","value":"Jetty(9.4.31.v20200723)"}],"cookie":[],"responseTime":null,"body":"{\n    \"Offering Name\": \"EN.601.421\",\n    \"Title\": \"Object-Oriented Software Engineering\"\n}"}],"_postman_id":"0578fb84-fa50-4afb-8560-b0739f1e0b68"},{"name":"Create a course with incomplete information","id":"a1df8a7e-ffe1-49fc-92f2-6f766226fa10","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"title\": \"Made-up Course\"\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:4567/api/courses","urlObject":{"path":["api","courses"],"host":["http://localhost:4567"],"query":[],"variable":[]}},"response":[{"id":"d8242a2e-af2c-4240-afdb-c4a674d07960","name":"Create a course with incomplete information","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"title\": \"Made-up Course\"\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:4567/api/courses"},"status":"Server Error","code":500,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Mon, 15 Feb 2021 00:43:12 GMT"},{"key":"Content-Type","value":"application/json"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Server","value":"Jetty(9.4.31.v20200723)"}],"cookie":[],"responseTime":null,"body":"{\n    \"error\": \"Database error: ERROR: null value in column \\\"offeringname\\\" of relation \\\"courses\\\" violates not-null constraint\\n  Detail: Failing row contains (null, null).\",\n    \"status\": \"500\"\n}"}],"_postman_id":"a1df8a7e-ffe1-49fc-92f2-6f766226fa10"},{"name":"Create a course that already exists","id":"e99ab9ed-be41-45a2-b4a1-a567967fb9a4","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"Offering Name\": \"EN.601.226\",\n    \"Title\": \"Data Structures\"\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:4567/api/courses","urlObject":{"path":["api","courses"],"host":["http://localhost:4567"],"query":[],"variable":[]}},"response":[{"id":"cb96e65e-d5a1-43fc-a393-21d5762008cf","name":"Create a course that already exists","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"Offering Name\": \"EN.601.226\",\n    \"Title\": \"Data Structures\"\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:4567/api/courses"},"status":"Server Error","code":500,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Mon, 15 Feb 2021 00:43:19 GMT"},{"key":"Content-Type","value":"application/json"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Server","value":"Jetty(9.4.31.v20200723)"}],"cookie":[],"responseTime":null,"body":"{\n    \"error\": \"Database error: ERROR: duplicate key value violates unique constraint \\\"courses_pkey\\\"\\n  Detail: Key (offeringname)=(EN.601.226) already exists.\",\n    \"status\": \"500\"\n}"}],"_postman_id":"e99ab9ed-be41-45a2-b4a1-a567967fb9a4"},{"name":"Update a course","event":[{"listen":"prerequest","script":{"id":"d8aabed6-5cc8-47b8-b68f-333888f69407","exec":["pm.variables.set('offeringName', \"EN.601.621\");"],"type":"text/javascript"}}],"id":"b793caeb-9507-490e-8928-008721522a6e","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PUT","header":[],"body":{"mode":"raw","raw":"{\n    \"Offering Name\": \"EN.601.621\",\n    \"Title\": \"OOSE\"\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:4567/api/courses/:offeringName","urlObject":{"path":["api","courses",":offeringName"],"host":["http://localhost:4567"],"query":[],"variable":[{"type":"any","value":"{{offeringName}}","key":"offeringName"}]}},"response":[{"id":"efba279a-e57b-4de7-8750-9de91d63529c","name":"Update a course","originalRequest":{"method":"PUT","header":[],"body":{"mode":"raw","raw":"{\n    \"Offering Name\": \"EN.601.621\",\n    \"Title\": \"OOSE\"\n}","options":{"raw":{"language":"json"}}},"url":{"raw":"http://localhost:4567/api/courses/:offeringName","host":["http://localhost:4567"],"path":["api","courses",":offeringName"],"variable":[{"key":"offeringName","value":"{{offeringName}}"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Mon, 15 Feb 2021 00:43:52 GMT"},{"key":"Content-Type","value":"application/json"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Server","value":"Jetty(9.4.31.v20200723)"}],"cookie":[],"responseTime":null,"body":"{\n    \"Offering Name\": \"EN.601.621\",\n    \"Title\": \"OOSE\"\n}"}],"_postman_id":"b793caeb-9507-490e-8928-008721522a6e"},{"name":"Update a course that does not exist","event":[{"listen":"prerequest","script":{"id":"66662976-2572-430a-8ad5-3e3094537620","exec":["pm.variables.set('invalidOfferingName', \"EN.000.999\");"],"type":"text/javascript"}}],"id":"a6540b47-3ab0-49c8-b645-40e522d8c302","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PUT","header":[],"body":{"mode":"raw","raw":"{\n    \"Offering Name\": \"EN.000.999\",\n    \"Title\": \"None-existing course\"\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:4567/api/courses/:offeringName","urlObject":{"path":["api","courses",":offeringName"],"host":["http://localhost:4567"],"query":[],"variable":[{"type":"any","value":"{{invalidOfferingName}}","key":"offeringName"}]}},"response":[{"id":"68169e0c-7ac5-43bf-946e-b7f29d65241c","name":"Update a course that does not exist","originalRequest":{"method":"PUT","header":[],"body":{"mode":"raw","raw":"{\n    \"Offering Name\": \"EN.000.999\",\n    \"Title\": \"None-existing course\"\n}","options":{"raw":{"language":"json"}}},"url":{"raw":"http://localhost:4567/api/courses/:offeringName","host":["http://localhost:4567"],"path":["api","courses",":offeringName"],"variable":[{"key":"offeringName","value":"{{invalidOfferingName}}"}]}},"status":"Not Found","code":404,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Mon, 15 Feb 2021 00:44:32 GMT"},{"key":"Content-Type","value":"application/json"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Server","value":"Jetty(9.4.31.v20200723)"}],"cookie":[],"responseTime":null,"body":"{\n    \"error\": \"Resource not found\",\n    \"status\": \"404\"\n}"}],"_postman_id":"a6540b47-3ab0-49c8-b645-40e522d8c302"},{"name":"Update a course incorrect offeringName","id":"8575113f-1cf4-4300-9374-28be9877457f","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PUT","header":[],"body":{"mode":"raw","raw":"{\n    \"Offering Name\": \"EN.601.226\",\n    \"Title\": \"OOSE\"\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:4567/api/courses/:offeringName","urlObject":{"path":["api","courses",":offeringName"],"host":["http://localhost:4567"],"query":[],"variable":[{"type":"any","value":"EN.601.421","key":"offeringName"}]}},"response":[{"id":"cd1be016-29d6-4d5a-878c-a420b2012323","name":"Update a course incorrect offeringName","originalRequest":{"method":"PUT","header":[],"body":{"mode":"raw","raw":"{\n    \"Offering Name\": \"EN.601.226\",\n    \"Title\": \"OOSE\"\n}","options":{"raw":{"language":"json"}}},"url":{"raw":"http://localhost:4567/api/courses/:offeringName","host":["http://localhost:4567"],"path":["api","courses",":offeringName"],"variable":[{"key":"offeringName","value":"EN.601.421"}]}},"status":"Bad Request","code":400,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Mon, 15 Feb 2021 00:44:54 GMT"},{"key":"Content-Type","value":"application/json"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Server","value":"Jetty(9.4.31.v20200723)"}],"cookie":[],"responseTime":null,"body":"{\n    \"error\": \"offering name does not match the resource identifier\",\n    \"status\": \"400\"\n}"}],"_postman_id":"8575113f-1cf4-4300-9374-28be9877457f"},{"name":"Delete a course","event":[{"listen":"prerequest","script":{"id":"870c6078-bcd7-4b28-88b6-411c38c7fe97","exec":["pm.variables.set('offeringName', \"EN.601.230\");"],"type":"text/javascript"}}],"id":"640aac35-54c8-451f-b459-5300ec4399f8","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"DELETE","header":[],"body":{"mode":"raw","raw":"","options":{"raw":{"language":"json"}}},"url":"http://localhost:4567/api/courses/:offeringName","urlObject":{"path":["api","courses",":offeringName"],"host":["http://localhost:4567"],"query":[],"variable":[{"type":"any","value":"{{offeringName}}","key":"offeringName"}]}},"response":[{"id":"02e49cd8-5947-4fc4-8bce-1aad2cdfda85","name":"Delete a course","originalRequest":{"method":"DELETE","header":[],"body":{"mode":"raw","raw":"","options":{"raw":{"language":"json"}}},"url":{"raw":"http://localhost:4567/api/courses/:offeringName","host":["http://localhost:4567"],"path":["api","courses",":offeringName"],"variable":[{"key":"offeringName","value":"EN.601.226"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Tue, 16 Feb 2021 19:43:15 GMT"},{"key":"Content-Type","value":"application/json"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Server","value":"Jetty(9.4.31.v20200723)"}],"cookie":[],"responseTime":null,"body":"{\n    \"Offering Name\": \"EN.601.226\",\n    \"Title\": \"DATA STRUCTURES\"\n}"}],"_postman_id":"640aac35-54c8-451f-b459-5300ec4399f8"},{"name":"Delete a course that does not exist","event":[{"listen":"prerequest","script":{"id":"d974893c-149d-4f71-b4ff-9c6710d0a69b","exec":["pm.variables.set('invalidOfferingName', \"EN.000.999\");"],"type":"text/javascript"}}],"id":"a0e55256-f20a-471d-bc73-06f304bcc722","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"DELETE","header":[],"body":{"mode":"raw","raw":"","options":{"raw":{"language":"json"}}},"url":"http://localhost:4567/api/courses/:offeringName","urlObject":{"path":["api","courses",":offeringName"],"host":["http://localhost:4567"],"query":[],"variable":[{"type":"any","value":"{{offeringName}}","key":"offeringName"}]}},"response":[{"id":"00122b88-79b4-42c5-b8e9-5ba871e1a722","name":"Delete a course that does not exist","originalRequest":{"method":"DELETE","header":[],"body":{"mode":"raw","raw":"","options":{"raw":{"language":"json"}}},"url":{"raw":"http://localhost:4567/api/courses/:offeringName","host":["http://localhost:4567"],"path":["api","courses",":offeringName"],"variable":[{"key":"offeringName","value":"EN.000.999"}]}},"status":"Not Found","code":404,"_postman_previewlanguage":"json","header":[{"key":"Connection","value":"close"},{"key":"Date","value":"Tue, 16 Feb 2021 19:49:11 GMT"},{"key":"Content-Type","value":"application/json"},{"key":"Server","value":"Jetty(9.4.31.v20200723)"},{"key":"Via","value":"1.1 vegur"}],"cookie":[],"responseTime":null,"body":"{\n    \"status\": \"404\",\n    \"error\": \"Resource not found\"\n}"}],"_postman_id":"a0e55256-f20a-471d-bc73-06f304bcc722"}],"event":[{"listen":"prerequest","script":{"id":"fd25d14b-64f9-42b3-9534-584086dabdfc","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"0af922ec-99c6-4c94-92f9-7b75e4d3aab8","type":"text/javascript","exec":[""]}}],"variable":[{"key":"BASE_URL","value":"http://localhost:4567"}]}