{"info":{"_postman_id":"0e15fe6c-f9ce-49f7-93cb-3ce03fe22944","name":"Simple Book API SDET","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[],"description":"<html><head></head><body></body></html>","owner":"27601878","collectionId":"0e15fe6c-f9ce-49f7-93cb-3ce03fe22944","publishedId":"2sAYQZHs5a","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"FF6C37"},"publishDate":"2025-01-16T10:58:07.000Z"},"item":[{"name":"Status","item":[{"name":"API Status","event":[{"listen":"test","script":{"id":"84b7c1e0-5895-45c4-8760-6edbbc7ac2b6","exec":["pm.test(\"Status code is: 200\", function () {\r","    pm.response.to.have.status(200);\r","});\r","\r","pm.test(\"Body matches string: status\", function () {\r","    pm.expect(pm.response.text()).to.include(\"status\");\r","});"],"type":"text/javascript","packages":{}}}],"id":"a0d1a47d-9248-4616-a662-a3eb730ea2f3","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"https://simple-books-api.glitch.me/status","urlObject":{"path":["status"],"host":["https://simple-books-api.glitch.me"],"query":[],"variable":[]}},"response":[],"_postman_id":"a0d1a47d-9248-4616-a662-a3eb730ea2f3"}],"id":"b2b406aa-63a7-485b-ba8c-01cdb3d3d994","_postman_id":"b2b406aa-63a7-485b-ba8c-01cdb3d3d994","description":""},{"name":"List","item":[{"name":"List of books","event":[{"listen":"test","script":{"id":"5a257218-ad7c-4d6e-904a-a330e13fcc19","exec":["pm.test(\"Status code is: 200\", function () {\r","    pm.response.to.have.status(200);\r","});"],"type":"text/javascript","packages":{}}}],"id":"63b00920-7c89-4f36-9d6b-a96d23ae853f","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"https://simple-books-api.glitch.me/books?non-type=non-fiction&limit=2&foo=bar","urlObject":{"path":["books"],"host":["https://simple-books-api.glitch.me"],"query":[{"description":{"content":"<p>will only show results of fiction type books</p>\n","type":"text/plain"},"key":"non-type","value":"non-fiction"},{"description":{"content":"<p>will give only 2 result. will not work for capital Limit or value 25 (assignment 1)</p>\n","type":"text/plain"},"key":"limit","value":"2"},{"description":{"content":"<p>makes no sense. full result will be displayed</p>\n","type":"text/plain"},"key":"foo","value":"bar"}],"variable":[]}},"response":[],"_postman_id":"63b00920-7c89-4f36-9d6b-a96d23ae853f"},{"name":"List of books adv","event":[{"listen":"test","script":{"id":"d0873426-f049-4cdc-ad54-030b4d79077f","exec":["pm.test(\"Status code is: 200\", function () {\r","    pm.response.to.have.status(200);\r","});"],"type":"text/javascript","packages":{}}}],"id":"34a29536-8e97-4079-a824-36cda614c1ec","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"https://simple-books-api.glitch.me/books?type=fiction","urlObject":{"path":["books"],"host":["https://simple-books-api.glitch.me"],"query":[{"key":"type","value":"fiction"}],"variable":[]}},"response":[],"_postman_id":"34a29536-8e97-4079-a824-36cda614c1ec"},{"name":"Get a single book","event":[{"listen":"test","script":{"id":"d6dcaf03-3ec6-4e41-9274-467b2fd57116","exec":["pm.test(\"Status code is: 200\", function () {\r","    pm.response.to.have.status(200);\r","});"],"type":"text/javascript","packages":{}}}],"id":"cc45d94b-e055-4abe-961c-f4264e6bd9eb","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"https://simple-books-api.glitch.me/books/:bookId","urlObject":{"path":["books",":bookId"],"host":["https://simple-books-api.glitch.me"],"query":[],"variable":[{"type":"any","value":"5","key":"bookId"}]}},"response":[],"_postman_id":"cc45d94b-e055-4abe-961c-f4264e6bd9eb"}],"id":"70434d04-ed2f-4519-8ddd-19d003f5547c","_postman_id":"70434d04-ed2f-4519-8ddd-19d003f5547c","description":""},{"name":"Register","item":[{"name":"Register API Client","event":[{"listen":"test","script":{"id":"90a5953c-1a80-4ec0-8493-ab56a26cd718","exec":["var response = pm.response.json();\r","pm.collectionVariables.set(\"token\", response.accessToken);\r","\r","pm.test(\"Status code is: 201\", function () {\r","    pm.response.to.have.status(201);\r","});\r","\r","pm.test(\"Body matches string: accessToken\", function () {\r","    pm.expect(pm.response.text()).to.include(\"accessToken\");\r","});\r","\r","\r","\r","\r",""],"type":"text/javascript","packages":{}}}],"id":"13844ccc-dce9-4e2e-87b7-1d26450977bd","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n   \"clientName\": \"tausif\",\r\n   \"clientEmail\": \"Deangelo3@gmail.com\"\r\n}","options":{"raw":{"language":"json"}}},"url":"https://simple-books-api.glitch.me/api-clients","urlObject":{"path":["api-clients"],"host":["https://simple-books-api.glitch.me"],"query":[],"variable":[]}},"response":[],"_postman_id":"13844ccc-dce9-4e2e-87b7-1d26450977bd"},{"name":"Register API Client (URL Tampering)","event":[{"listen":"test","script":{"id":"90a5953c-1a80-4ec0-8493-ab56a26cd718","exec":["\r","\r","pm.test(\"Status code is: 404\", function () {\r","    pm.response.to.have.status(404);\r","});\r","\r","pm.test(\"Body matches string: Error\", function () {\r","    pm.expect(pm.response.text()).to.include(\"Error\");\r","});\r","\r","\r","\r","\r",""],"type":"text/javascript","packages":{}}}],"id":"5c5ed555-376a-4c19-b7e0-d1211bf8ad8f","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n   \"clientName\": \"tausif\",\r\n   \"clientEmail\": \"qasif@test.com\"\r\n}","options":{"raw":{"language":"json"}}},"url":"https://simple-books-api.glitch.me/api-clien","urlObject":{"path":["api-clien"],"host":["https://simple-books-api.glitch.me"],"query":[],"variable":[]}},"response":[],"_postman_id":"5c5ed555-376a-4c19-b7e0-d1211bf8ad8f"},{"name":"Register API Client (Wrong Http Method)","event":[{"listen":"test","script":{"id":"90a5953c-1a80-4ec0-8493-ab56a26cd718","exec":["\r","\r","pm.test(\"Status code is: 404\", function () {\r","    pm.response.to.have.status(404);\r","});\r","\r","pm.test(\"Body matches string: Error\", function () {\r","    pm.expect(pm.response.text()).to.include(\"Error\");\r","});\r","\r","\r","\r","\r",""],"type":"text/javascript","packages":{}}}],"id":"e0f24a9b-2b2c-4e54-8dce-70c0f3a78ae7","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"body":{"mode":"raw","raw":"{\r\n   \"clientName\": \"tausif\",\r\n   \"clientEmail\": \"qasif@test.com\"\r\n}","options":{"raw":{"language":"json"}}},"url":"https://simple-books-api.glitch.me/api-clients","urlObject":{"path":["api-clients"],"host":["https://simple-books-api.glitch.me"],"query":[],"variable":[]}},"response":[],"_postman_id":"e0f24a9b-2b2c-4e54-8dce-70c0f3a78ae7"},{"name":"Register API Client (Missing Required Body)","event":[{"listen":"test","script":{"id":"90a5953c-1a80-4ec0-8493-ab56a26cd718","exec":["\r","\r","pm.test(\"Status code is: 400\", function () {\r","    pm.response.to.have.status(400);\r","});\r","\r","pm.test(\"Body matches string: Invalid or missing client email.\", function () {\r","    pm.expect(pm.response.text()).to.include(\"Invalid or missing client email.\");\r","});\r","\r","\r","\r","\r",""],"type":"text/javascript","packages":{}}}],"id":"7232b924-416f-4381-b4ab-f1ac63803bbe","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n   \"clientName\": \"tausif\"\r\n}","options":{"raw":{"language":"json"}}},"url":"https://simple-books-api.glitch.me/api-clients","urlObject":{"path":["api-clients"],"host":["https://simple-books-api.glitch.me"],"query":[],"variable":[]}},"response":[],"_postman_id":"7232b924-416f-4381-b4ab-f1ac63803bbe"},{"name":"Register API Client (Missing Body)","event":[{"listen":"test","script":{"id":"90a5953c-1a80-4ec0-8493-ab56a26cd718","exec":["\r","\r","pm.test(\"Status code is: 400\", function () {\r","    pm.response.to.have.status(400);\r","});\r","\r","pm.test(\"Body matches string: Invalid or missing client name.\", function () {\r","    pm.expect(pm.response.text()).to.include(\"Invalid or missing client name.\");\r","});\r","\r","\r","\r","\r",""],"type":"text/javascript","packages":{}}}],"id":"19a8b461-c584-4d30-859a-93a2297a3647","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"","options":{"raw":{"language":"json"}}},"url":"https://simple-books-api.glitch.me/api-clients","urlObject":{"path":["api-clients"],"host":["https://simple-books-api.glitch.me"],"query":[],"variable":[]}},"response":[],"_postman_id":"19a8b461-c584-4d30-859a-93a2297a3647"}],"id":"e523c0df-f388-441b-9bca-55f9b657708f","_postman_id":"e523c0df-f388-441b-9bca-55f9b657708f","description":""},{"name":"Order","item":[{"name":"Order a book","event":[{"listen":"test","script":{"id":"3ee53ef4-f773-43cc-ab7c-759097ae132f","exec":["var response = pm.response.json();\r","pm.collectionVariables.set(\"OrderId\", response.orderId);\r","\r","\r","pm.test(\"Status code is: 201\", function () {\r","    pm.response.to.have.status(201);\r","});"],"type":"text/javascript","packages":{}}}],"id":"c5f9d7be-e213-429b-a31e-62649365766d","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":""}]},"isInherited":false},"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n  \"bookId\": 5,\r\n  \"customerName\": \"Israel Mosciski\"\r\n}","options":{"raw":{"language":"json"}}},"url":"https://simple-books-api.glitch.me/orders","urlObject":{"path":["orders"],"host":["https://simple-books-api.glitch.me"],"query":[],"variable":[]}},"response":[],"_postman_id":"c5f9d7be-e213-429b-a31e-62649365766d"},{"name":"Order a book (No Auth)","event":[{"listen":"test","script":{"id":"3ee53ef4-f773-43cc-ab7c-759097ae132f","exec":["\r","pm.test(\"Status code is: 401\", function () {\r","    pm.response.to.have.status(401);\r","});\r","\r","pm.test(\"Body matches string: Missing Authorization header.\", function () {\r","    pm.expect(pm.response.text()).to.include(\"Missing Authorization header.\");\r","});\r",""],"type":"text/javascript","packages":{}}}],"id":"4b944285-ec1b-4f4e-960b-d3c8ac28b8e6","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"noauth","isInherited":false},"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n  \"bookId\": 5,\r\n  \"customerName\": \"Brendan Johnson\"\r\n}","options":{"raw":{"language":"json"}}},"url":"https://simple-books-api.glitch.me/orders","urlObject":{"path":["orders"],"host":["https://simple-books-api.glitch.me"],"query":[],"variable":[]}},"response":[],"_postman_id":"4b944285-ec1b-4f4e-960b-d3c8ac28b8e6"},{"name":"Order a book (Invalid Auth)","event":[{"listen":"test","script":{"id":"3ee53ef4-f773-43cc-ab7c-759097ae132f","exec":["pm.test(\"Status code is: 401\", function () {\r","    pm.response.to.have.status(401);\r","});\r","\r","pm.test(\"Body matches string: Invalid bearer token.\", function () {\r","    pm.expect(pm.response.text()).to.include(\"Invalid bearer token.\");\r","});\r",""],"type":"text/javascript","packages":{}}}],"id":"98975f1e-9bb7-4820-a3cf-70e5ac574745","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n  \"bookId\": 5,\r\n  \"customerName\": \"Lynn Hoppe\"\r\n}","options":{"raw":{"language":"json"}}},"url":"https://simple-books-api.glitch.me/orders","urlObject":{"path":["orders"],"host":["https://simple-books-api.glitch.me"],"query":[],"variable":[]}},"response":[],"_postman_id":"98975f1e-9bb7-4820-a3cf-70e5ac574745"},{"name":"Get all book orders","event":[{"listen":"test","script":{"id":"3c2a0a19-2852-4869-92a9-415b59763bb3","exec":["pm.test(\"Status code is: 200\", function () {\r","    pm.response.to.have.status(200);\r","});"],"type":"text/javascript","packages":{}}}],"id":"18887a8a-9c6f-49a5-9dde-4509ff9cee60","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":""}]},"isInherited":false},"method":"GET","header":[],"url":"https://simple-books-api.glitch.me/orders","urlObject":{"path":["orders"],"host":["https://simple-books-api.glitch.me"],"query":[],"variable":[]}},"response":[],"_postman_id":"18887a8a-9c6f-49a5-9dde-4509ff9cee60"},{"name":"Get an order","event":[{"listen":"test","script":{"id":"5cedc444-9a72-4989-b899-9fe40c45a0e5","exec":["pm.test(\"Status code is: 200\", function () {\r","    pm.response.to.have.status(200);\r","});"],"type":"text/javascript","packages":{}}}],"id":"dafe8db2-95b5-4ed7-a67b-42c1ff1eedc6","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":""}]},"isInherited":false},"method":"GET","header":[],"url":"https://simple-books-api.glitch.me/orders/:orderId","urlObject":{"path":["orders",":orderId"],"host":["https://simple-books-api.glitch.me"],"query":[],"variable":[{"type":"any","value":"","key":"orderId"}]}},"response":[],"_postman_id":"dafe8db2-95b5-4ed7-a67b-42c1ff1eedc6"},{"name":"Get an order (Invalid Auth)","event":[{"listen":"test","script":{"id":"5cedc444-9a72-4989-b899-9fe40c45a0e5","exec":["pm.test(\"Status code is: 401\", function () {\r","    pm.response.to.have.status(401);\r","});\r","\r","pm.test(\"Body matches string: Invalid bearer token.\", function () {\r","    pm.expect(pm.response.text()).to.include(\"Invalid bearer token.\");\r","});\r",""],"type":"text/javascript","packages":{}}}],"id":"0cecf89c-c22c-4775-aacf-0ce20273f761","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"GET","header":[],"url":"https://simple-books-api.glitch.me/orders/:orderId","urlObject":{"path":["orders",":orderId"],"host":["https://simple-books-api.glitch.me"],"query":[],"variable":[{"type":"any","value":"","key":"orderId"}]}},"response":[],"_postman_id":"0cecf89c-c22c-4775-aacf-0ce20273f761"}],"id":"e218a6b2-87ea-4cdd-8c96-a72d5d669a55","_postman_id":"e218a6b2-87ea-4cdd-8c96-a72d5d669a55","description":""},{"name":"Update","item":[{"name":"Update an order","event":[{"listen":"test","script":{"id":"b6deb2a9-ebf2-49b3-aaa8-09ea4677023b","exec":["pm.test(\"Status code is: 204\", function () {\r","    pm.response.to.have.status(204);\r","});"],"type":"text/javascript","packages":{}}}],"id":"bfcefc6b-21c4-48f2-b073-440dedbbc714","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":""}]},"isInherited":false},"method":"PATCH","header":[],"body":{"mode":"raw","raw":"{\r\n  \"customerName\": \"Nicole Ryan\"\r\n}","options":{"raw":{"language":"json"}}},"url":"https://simple-books-api.glitch.me/orders/:orderId","urlObject":{"path":["orders",":orderId"],"host":["https://simple-books-api.glitch.me"],"query":[],"variable":[{"type":"any","value":"","key":"orderId"}]}},"response":[],"_postman_id":"bfcefc6b-21c4-48f2-b073-440dedbbc714"},{"name":"Update an order (Invalid Auth)","event":[{"listen":"test","script":{"id":"b6deb2a9-ebf2-49b3-aaa8-09ea4677023b","exec":["pm.test(\"Status code is: 401\", function () {\r","    pm.response.to.have.status(401);\r","});\r","\r","pm.test(\"Body matches string: Invalid bearer token.\", function () {\r","    pm.expect(pm.response.text()).to.include(\"Invalid bearer token.\");\r","});\r",""],"type":"text/javascript","packages":{}}}],"id":"874daac6-b6a7-44ce-be86-d2b1ffdad5c5","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"PATCH","header":[],"body":{"mode":"raw","raw":"{\r\n  \"customerName\": \"Nicole Lehner\"\r\n}","options":{"raw":{"language":"json"}}},"url":"https://simple-books-api.glitch.me/orders/:orderId","urlObject":{"path":["orders",":orderId"],"host":["https://simple-books-api.glitch.me"],"query":[],"variable":[{"type":"any","value":"","key":"orderId"}]}},"response":[],"_postman_id":"874daac6-b6a7-44ce-be86-d2b1ffdad5c5"}],"id":"4a226cf9-e704-4f41-9ad8-a953517a367b","_postman_id":"4a226cf9-e704-4f41-9ad8-a953517a367b","description":""},{"name":"Delete","item":[{"name":"Delete order","event":[{"listen":"test","script":{"id":"0d8b18d2-3316-422d-b313-9ba510dfdba9","exec":["pm.test(\"Status code is: 204\", function () {\r","    pm.response.to.have.status(204);\r","});"],"type":"text/javascript","packages":{}}}],"id":"9fc066b0-395c-48fc-9798-739e1635a02d","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":""}]},"isInherited":false},"method":"DELETE","header":[],"url":"https://simple-books-api.glitch.me/orders/:orderId","urlObject":{"path":["orders",":orderId"],"host":["https://simple-books-api.glitch.me"],"query":[],"variable":[{"type":"any","value":"","key":"orderId"}]}},"response":[],"_postman_id":"9fc066b0-395c-48fc-9798-739e1635a02d"},{"name":"Delete order (Invalid Auth)","event":[{"listen":"test","script":{"id":"0d8b18d2-3316-422d-b313-9ba510dfdba9","exec":["pm.test(\"Status code is: 401\", function () {\r","    pm.response.to.have.status(401);\r","});\r","\r","pm.test(\"Body matches string: Invalid bearer token.\", function () {\r","    pm.expect(pm.response.text()).to.include(\"Invalid bearer token.\");\r","});\r",""],"type":"text/javascript","packages":{}}}],"id":"017c7c15-c720-444f-9cd0-9b2c106cc529","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"DELETE","header":[],"url":"https://simple-books-api.glitch.me/orders/:orderId","urlObject":{"path":["orders",":orderId"],"host":["https://simple-books-api.glitch.me"],"query":[],"variable":[{"type":"any","value":"","key":"orderId"}]}},"response":[],"_postman_id":"017c7c15-c720-444f-9cd0-9b2c106cc529"}],"id":"2ce9b0d0-0e2c-4ef1-ab90-03abd0ce4de0","_postman_id":"2ce9b0d0-0e2c-4ef1-ab90-03abd0ce4de0","description":""}],"event":[{"listen":"prerequest","script":{"id":"1d9ea698-51d6-40a1-87c9-3c9cde33ff4f","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"0ce3f3c5-28c2-46b3-ac7a-e0b9dd09f06e","type":"text/javascript","exec":[""]}}],"variable":[{"key":"baseUrl","value":"https://simple-books-api.glitch.me","type":"string"},{"key":"token","value":""},{"key":"OrderId","value":""},{"key":"BookId","value":"5"}]}