Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- {
- "info": {
- "_postman_id": "a492b019-86f2-4aed-b734-3fc7ede75650",
- "name": "books_store",
- "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
- "_exporter_id": "4983510"
- },
- "item": [
- {
- "name": "Books",
- "event": [
- {
- "listen": "test",
- "script": {
- "exec": [
- "pm.test(\"Status code is 200\", function () {\r",
- " pm.response.to.have.status(200);\r",
- "});\r",
- "\r",
- "\r",
- "var books = pm.response.json().books; \r",
- "\r",
- "pm.collectionVariables.set(\"isbn_1\", books[0].isbn);\r",
- "pm.collectionVariables.set(\"isbn_2\", books[1].isbn);\r",
- "pm.collectionVariables.set(\"isbn_3\", books[2].isbn);\r",
- ""
- ],
- "type": "text/javascript",
- "packages": {}
- }
- }
- ],
- "request": {
- "method": "GET",
- "header": [],
- "url": {
- "raw": "{{host}}/BookStore/v1/Books",
- "host": [
- "{{host}}"
- ],
- "path": [
- "BookStore",
- "v1",
- "Books"
- ]
- },
- "description": "Get all books in catalog"
- },
- "response": [
- {
- "name": "200",
- "originalRequest": {
- "method": "GET",
- "header": [],
- "url": {
- "raw": "https://demoqa.com/BookStore/v1/Books",
- "protocol": "https",
- "host": [
- "demoqa",
- "com"
- ],
- "path": [
- "BookStore",
- "v1",
- "Books"
- ]
- }
- },
- "status": "OK",
- "code": 200,
- "_postman_previewlanguage": "json",
- "header": [
- {
- "key": "Server",
- "value": "nginx/1.17.10 (Ubuntu)"
- },
- {
- "key": "Date",
- "value": "Sat, 28 Sep 2024 13:33:25 GMT"
- },
- {
- "key": "Content-Type",
- "value": "application/json; charset=utf-8"
- },
- {
- "key": "Content-Length",
- "value": "4514"
- },
- {
- "key": "Connection",
- "value": "keep-alive"
- },
- {
- "key": "X-Powered-By",
- "value": "Express"
- },
- {
- "key": "ETag",
- "value": "W/\"11a2-8zfX++QwcgaCjSU6F8JP9fUd1tY\""
- }
- ],
- "cookie": [],
- "body": "{\n \"books\": [\n {\n \"isbn\": \"9781449325862\",\n \"title\": \"Git Pocket Guide\",\n \"subTitle\": \"A Working Introduction\",\n \"author\": \"Richard E. Silverman\",\n \"publish_date\": \"2020-06-04T08:48:39.000Z\",\n \"publisher\": \"O'Reilly Media\",\n \"pages\": 234,\n \"description\": \"This pocket guide is the perfect on-the-job companion to Git, the distributed version control system. It provides a compact, readable introduction to Git for new users, as well as a reference to common commands and procedures for those of you with Git exp\",\n \"website\": \"http://chimera.labs.oreilly.com/books/1230000000561/index.html\"\n },\n {\n \"isbn\": \"9781449331818\",\n \"title\": \"Learning JavaScript Design Patterns\",\n \"subTitle\": \"A JavaScript and jQuery Developer's Guide\",\n \"author\": \"Addy Osmani\",\n \"publish_date\": \"2020-06-04T09:11:40.000Z\",\n \"publisher\": \"O'Reilly Media\",\n \"pages\": 254,\n \"description\": \"With Learning JavaScript Design Patterns, you'll learn how to write beautiful, structured, and maintainable JavaScript by applying classical and modern design patterns to the language. If you want to keep your code efficient, more manageable, and up-to-da\",\n \"website\": \"http://www.addyosmani.com/resources/essentialjsdesignpatterns/book/\"\n },\n {\n \"isbn\": \"9781449337711\",\n \"title\": \"Designing Evolvable Web APIs with ASP.NET\",\n \"subTitle\": \"Harnessing the Power of the Web\",\n \"author\": \"Glenn Block et al.\",\n \"publish_date\": \"2020-06-04T09:12:43.000Z\",\n \"publisher\": \"O'Reilly Media\",\n \"pages\": 238,\n \"description\": \"Design and build Web APIs for a broad range of clients—including browsers and mobile devices—that can adapt to change over time. This practical, hands-on guide takes you through the theory and tools you need to build evolvable HTTP services with Microsoft\",\n \"website\": \"http://chimera.labs.oreilly.com/books/1234000001708/index.html\"\n },\n {\n \"isbn\": \"9781449365035\",\n \"title\": \"Speaking JavaScript\",\n \"subTitle\": \"An In-Depth Guide for Programmers\",\n \"author\": \"Axel Rauschmayer\",\n \"publish_date\": \"2014-02-01T00:00:00.000Z\",\n \"publisher\": \"O'Reilly Media\",\n \"pages\": 460,\n \"description\": \"Like it or not, JavaScript is everywhere these days-from browser to server to mobile-and now you, too, need to learn the language or dive deeper than you have. This concise book guides you into and through JavaScript, written by a veteran programmer who o\",\n \"website\": \"http://speakingjs.com/\"\n },\n {\n \"isbn\": \"9781491904244\",\n \"title\": \"You Don't Know JS\",\n \"subTitle\": \"ES6 & Beyond\",\n \"author\": \"Kyle Simpson\",\n \"publish_date\": \"2015-12-27T00:00:00.000Z\",\n \"publisher\": \"O'Reilly Media\",\n \"pages\": 278,\n \"description\": \"No matter how much experience you have with JavaScript, odds are you don’t fully understand the language. As part of the \\\\\\\"You Don’t Know JS\\\\\\\" series, this compact guide focuses on new features available in ECMAScript 6 (ES6), the latest version of the st\",\n \"website\": \"https://github.com/getify/You-Dont-Know-JS/tree/master/es6%20&%20beyond\"\n },\n {\n \"isbn\": \"9781491950296\",\n \"title\": \"Programming JavaScript Applications\",\n \"subTitle\": \"Robust Web Architecture with Node, HTML5, and Modern JS Libraries\",\n \"author\": \"Eric Elliott\",\n \"publish_date\": \"2014-07-01T00:00:00.000Z\",\n \"publisher\": \"O'Reilly Media\",\n \"pages\": 254,\n \"description\": \"Take advantage of JavaScript's power to build robust web-scale or enterprise applications that are easy to extend and maintain. By applying the design patterns outlined in this practical book, experienced JavaScript developers will learn how to write flex\",\n \"website\": \"http://chimera.labs.oreilly.com/books/1234000000262/index.html\"\n },\n {\n \"isbn\": \"9781593275846\",\n \"title\": \"Eloquent JavaScript, Second Edition\",\n \"subTitle\": \"A Modern Introduction to Programming\",\n \"author\": \"Marijn Haverbeke\",\n \"publish_date\": \"2014-12-14T00:00:00.000Z\",\n \"publisher\": \"No Starch Press\",\n \"pages\": 472,\n \"description\": \"JavaScript lies at the heart of almost every modern web application, from social apps to the newest browser-based games. Though simple for beginners to pick up and play with, JavaScript is a flexible, complex language that you can use to build full-scale \",\n \"website\": \"http://eloquentjavascript.net/\"\n },\n {\n \"isbn\": \"9781593277574\",\n \"title\": \"Understanding ECMAScript 6\",\n \"subTitle\": \"The Definitive Guide for JavaScript Developers\",\n \"author\": \"Nicholas C. Zakas\",\n \"publish_date\": \"2016-09-03T00:00:00.000Z\",\n \"publisher\": \"No Starch Press\",\n \"pages\": 352,\n \"description\": \"ECMAScript 6 represents the biggest update to the core of JavaScript in the history of the language. In Understanding ECMAScript 6, expert developer Nicholas C. Zakas provides a complete guide to the object types, syntax, and other exciting changes that E\",\n \"website\": \"https://leanpub.com/understandinges6/read\"\n }\n ]\n}"
- }
- ]
- },
- {
- "name": "User",
- "event": [
- {
- "listen": "test",
- "script": {
- "exec": [
- "pm.test(\"Status code is 201\", function () {\r",
- " pm.response.to.have.status(201);\r",
- "});"
- ],
- "type": "text/javascript",
- "packages": {}
- }
- }
- ],
- "request": {
- "method": "POST",
- "header": [],
- "body": {
- "mode": "raw",
- "raw": "{\r\n \"userName\": \"{{user_name}}\",\r\n \"password\": \"{{user_pass}}\"\r\n}",
- "options": {
- "raw": {
- "language": "json"
- }
- }
- },
- "url": {
- "raw": "{{host}}/Account/v1/User",
- "host": [
- "{{host}}"
- ],
- "path": [
- "Account",
- "v1",
- "User"
- ]
- },
- "description": "Create New User"
- },
- "response": [
- {
- "name": "201",
- "originalRequest": {
- "method": "POST",
- "header": [],
- "body": {
- "mode": "raw",
- "raw": "{\r\n \"userName\": \"UserName_2\",\r\n \"password\": \"Password123!@#\"\r\n}",
- "options": {
- "raw": {
- "language": "json"
- }
- }
- },
- "url": {
- "raw": "https://demoqa.com/Account/v1/User",
- "protocol": "https",
- "host": [
- "demoqa",
- "com"
- ],
- "path": [
- "Account",
- "v1",
- "User"
- ]
- }
- },
- "status": "Created",
- "code": 201,
- "_postman_previewlanguage": "json",
- "header": [
- {
- "key": "Server",
- "value": "nginx/1.17.10 (Ubuntu)"
- },
- {
- "key": "Date",
- "value": "Sat, 28 Sep 2024 13:49:45 GMT"
- },
- {
- "key": "Content-Type",
- "value": "application/json; charset=utf-8"
- },
- {
- "key": "Content-Length",
- "value": "84"
- },
- {
- "key": "Connection",
- "value": "keep-alive"
- },
- {
- "key": "X-Powered-By",
- "value": "Express"
- },
- {
- "key": "ETag",
- "value": "W/\"54-NObSWpCwN8Y1O4hEiuN24ySk/PU\""
- }
- ],
- "cookie": [],
- "body": "{\n \"userID\": \"649f3ca8-2305-446b-902e-11c35434b107\",\n \"username\": \"UserName_2\",\n \"books\": []\n}"
- }
- ]
- },
- {
- "name": "GenerateToken",
- "event": [
- {
- "listen": "test",
- "script": {
- "exec": [
- "pm.test(\"Status code is 200\", function () {\r",
- " pm.response.to.have.status(200);\r",
- "});"
- ],
- "type": "text/javascript",
- "packages": {}
- }
- }
- ],
- "request": {
- "method": "POST",
- "header": [],
- "body": {
- "mode": "raw",
- "raw": "{\r\n \"userName\": \"{{user_name}}\",\r\n \"password\": \"{{user_pass}}\"\r\n}",
- "options": {
- "raw": {
- "language": "json"
- }
- }
- },
- "url": {
- "raw": "{{host}}/Account/v1/GenerateToken",
- "host": [
- "{{host}}"
- ],
- "path": [
- "Account",
- "v1",
- "GenerateToken"
- ]
- },
- "description": "Create Sesion Token for User"
- },
- "response": [
- {
- "name": "200",
- "originalRequest": {
- "method": "POST",
- "header": [],
- "body": {
- "mode": "raw",
- "raw": "{\r\n \"userName\": \"UserName_2\",\r\n \"password\": \"Password123!@#\"\r\n}",
- "options": {
- "raw": {
- "language": "json"
- }
- }
- },
- "url": {
- "raw": "https://demoqa.com/Account/v1/GenerateToken",
- "protocol": "https",
- "host": [
- "demoqa",
- "com"
- ],
- "path": [
- "Account",
- "v1",
- "GenerateToken"
- ]
- }
- },
- "status": "OK",
- "code": 200,
- "_postman_previewlanguage": "json",
- "header": [
- {
- "key": "Server",
- "value": "nginx/1.17.10 (Ubuntu)"
- },
- {
- "key": "Date",
- "value": "Sat, 28 Sep 2024 13:52:25 GMT"
- },
- {
- "key": "Content-Type",
- "value": "application/json; charset=utf-8"
- },
- {
- "key": "Content-Length",
- "value": "284"
- },
- {
- "key": "Connection",
- "value": "keep-alive"
- },
- {
- "key": "X-Powered-By",
- "value": "Express"
- },
- {
- "key": "ETag",
- "value": "W/\"11c-xs/di/vqHM98oKdu4Pu0r64x7P0\""
- }
- ],
- "cookie": [],
- "body": "{\n \"token\": \"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyTmFtZSI6IlVzZXJOYW1lXzIiLCJwYXNzd29yZCI6IlBhc3N3b3JkMTIzIUAjIiwiaWF0IjoxNzI3NTMxNTQ1fQ.PYlEclYX_zRbsLmloXWPbW9SUitMQ-ycgvIdG_n40sc\",\n \"expires\": \"2024-10-05T13:52:25.232Z\",\n \"status\": \"Success\",\n \"result\": \"User authorized successfully.\"\n}"
- }
- ]
- },
- {
- "name": "Login",
- "event": [
- {
- "listen": "test",
- "script": {
- "exec": [
- "pm.test(\"Status code is 200\", function () {\r",
- " pm.response.to.have.status(200);\r",
- "});\r",
- "\r",
- "\r",
- "pm.collectionVariables.set(\r",
- " \"user_id\",\r",
- " pm.response.json().userId\r",
- ");\r",
- "\r",
- "\r",
- "pm.collectionVariables.set(\r",
- " \"user_token\",\r",
- " pm.response.json().token\r",
- ");"
- ],
- "type": "text/javascript",
- "packages": {}
- }
- }
- ],
- "request": {
- "method": "POST",
- "header": [],
- "body": {
- "mode": "raw",
- "raw": "{\r\n \"userName\": \"{{user_name}}\",\r\n \"password\": \"{{user_pass}}\"\r\n}",
- "options": {
- "raw": {
- "language": "json"
- }
- }
- },
- "url": {
- "raw": "{{host}}/Account/v1/Login",
- "host": [
- "{{host}}"
- ],
- "path": [
- "Account",
- "v1",
- "Login"
- ]
- },
- "description": "Retrieve UserId and UserToken to proceed with User data processing"
- },
- "response": [
- {
- "name": "200",
- "originalRequest": {
- "method": "POST",
- "header": [],
- "body": {
- "mode": "raw",
- "raw": "{\r\n \"userName\": \"UserName_2\",\r\n \"password\": \"Password123!@#\"\r\n}",
- "options": {
- "raw": {
- "language": "json"
- }
- }
- },
- "url": {
- "raw": "https://demoqa.com/Account/v1/Login",
- "protocol": "https",
- "host": [
- "demoqa",
- "com"
- ],
- "path": [
- "Account",
- "v1",
- "Login"
- ]
- }
- },
- "status": "OK",
- "code": 200,
- "_postman_previewlanguage": "json",
- "header": [
- {
- "key": "Server",
- "value": "nginx/1.17.10 (Ubuntu)"
- },
- {
- "key": "Date",
- "value": "Sat, 28 Sep 2024 13:56:15 GMT"
- },
- {
- "key": "Content-Type",
- "value": "application/json; charset=utf-8"
- },
- {
- "key": "Content-Length",
- "value": "383"
- },
- {
- "key": "Connection",
- "value": "keep-alive"
- },
- {
- "key": "X-Powered-By",
- "value": "Express"
- },
- {
- "key": "ETag",
- "value": "W/\"17f-hvcKrlj5CkQKV8xhRPEa+8DSLXE\""
- }
- ],
- "cookie": [],
- "body": "{\n \"userId\": \"649f3ca8-2305-446b-902e-11c35434b107\",\n \"username\": \"UserName_2\",\n \"password\": \"Password123!@#\",\n \"token\": \"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyTmFtZSI6IlVzZXJOYW1lXzIiLCJwYXNzd29yZCI6IlBhc3N3b3JkMTIzIUAjIiwiaWF0IjoxNzI3NTMxNTQ1fQ.PYlEclYX_zRbsLmloXWPbW9SUitMQ-ycgvIdG_n40sc\",\n \"expires\": \"2024-10-05T13:52:25.000Z\",\n \"created_date\": \"2024-09-28T13:49:45.000Z\",\n \"isActive\": false\n}"
- }
- ]
- },
- {
- "name": "User",
- "event": [
- {
- "listen": "test",
- "script": {
- "exec": [
- "pm.test(\"Status code is 200\", function () {\r",
- " pm.response.to.have.status(200);\r",
- "});"
- ],
- "type": "text/javascript",
- "packages": {}
- }
- }
- ],
- "request": {
- "method": "GET",
- "header": [
- {
- "key": "Authorization",
- "value": "Bearer {{user_token}}",
- "type": "text"
- }
- ],
- "url": {
- "raw": "{{host}}/Account/v1/User/{{user_id}}",
- "host": [
- "{{host}}"
- ],
- "path": [
- "Account",
- "v1",
- "User",
- "{{user_id}}"
- ]
- },
- "description": "Get User Data"
- },
- "response": [
- {
- "name": "200",
- "originalRequest": {
- "method": "GET",
- "header": [
- {
- "key": "Authorization",
- "value": "Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyTmFtZSI6IlVzZXJOYW1lXzIiLCJwYXNzd29yZCI6IlBhc3N3b3JkMTIzIUAjIiwiaWF0IjoxNzI3NTMxNTQ1fQ.PYlEclYX_zRbsLmloXWPbW9SUitMQ-ycgvIdG_n40sc",
- "type": "text"
- }
- ],
- "url": {
- "raw": "https://demoqa.com/Account/v1/User/649f3ca8-2305-446b-902e-11c35434b107",
- "protocol": "https",
- "host": [
- "demoqa",
- "com"
- ],
- "path": [
- "Account",
- "v1",
- "User",
- "649f3ca8-2305-446b-902e-11c35434b107"
- ]
- }
- },
- "status": "OK",
- "code": 200,
- "_postman_previewlanguage": "json",
- "header": [
- {
- "key": "Server",
- "value": "nginx/1.17.10 (Ubuntu)"
- },
- {
- "key": "Date",
- "value": "Sat, 28 Sep 2024 14:11:23 GMT"
- },
- {
- "key": "Content-Type",
- "value": "application/json; charset=utf-8"
- },
- {
- "key": "Content-Length",
- "value": "84"
- },
- {
- "key": "Connection",
- "value": "keep-alive"
- },
- {
- "key": "X-Powered-By",
- "value": "Express"
- },
- {
- "key": "ETag",
- "value": "W/\"54-ZgYYCRT5o4vSZJZioUd0VdxlrLY\""
- }
- ],
- "cookie": [],
- "body": "{\n \"userId\": \"649f3ca8-2305-446b-902e-11c35434b107\",\n \"username\": \"UserName_2\",\n \"books\": []\n}"
- }
- ]
- },
- {
- "name": "Books",
- "event": [
- {
- "listen": "test",
- "script": {
- "exec": [
- "pm.test(\"Status code is 201\", function () {\r",
- " pm.response.to.have.status(201);\r",
- "});"
- ],
- "type": "text/javascript",
- "packages": {}
- }
- }
- ],
- "request": {
- "method": "POST",
- "header": [
- {
- "key": "Authorization",
- "value": "Bearer {{user_token}}",
- "type": "text"
- }
- ],
- "body": {
- "mode": "raw",
- "raw": "{\r\n \"userId\": \"{{user_id}}\",\r\n \"collectionOfIsbns\": [\r\n {\r\n \"isbn\": \"{{isbn_1}}\"\r\n },\r\n {\r\n \"isbn\": \"{{isbn_2}}\"\r\n }\r\n ]\r\n}\r\n",
- "options": {
- "raw": {
- "language": "json"
- }
- }
- },
- "url": {
- "raw": "{{host}}/BookStore/v1/Books",
- "host": [
- "{{host}}"
- ],
- "path": [
- "BookStore",
- "v1",
- "Books"
- ]
- },
- "description": "Add books to User Profile"
- },
- "response": [
- {
- "name": "201",
- "originalRequest": {
- "method": "POST",
- "header": [
- {
- "key": "Authorization",
- "value": "Bearer {{user_token}}",
- "type": "text"
- }
- ],
- "body": {
- "mode": "raw",
- "raw": "{\r\n \"userId\": \"{{user_id}}\",\r\n \"collectionOfIsbns\": [\r\n {\r\n \"isbn\": \"{{isbn_1}}\"\r\n },\r\n {\r\n \"isbn\": \"{{isbn_2}}\"\r\n }\r\n ]\r\n}\r\n",
- "options": {
- "raw": {
- "language": "json"
- }
- }
- },
- "url": {
- "raw": "{{host}}/BookStore/v1/Books",
- "host": [
- "{{host}}"
- ],
- "path": [
- "BookStore",
- "v1",
- "Books"
- ]
- }
- },
- "status": "Created",
- "code": 201,
- "_postman_previewlanguage": "json",
- "header": [
- {
- "key": "Server",
- "value": "nginx/1.17.10 (Ubuntu)"
- },
- {
- "key": "Date",
- "value": "Sun, 29 Sep 2024 10:24:08 GMT"
- },
- {
- "key": "Content-Type",
- "value": "application/json; charset=utf-8"
- },
- {
- "key": "Content-Length",
- "value": "61"
- },
- {
- "key": "Connection",
- "value": "keep-alive"
- },
- {
- "key": "X-Powered-By",
- "value": "Express"
- },
- {
- "key": "ETag",
- "value": "W/\"3d-gB7h53TsZSbWLsAq5S31Gxdt66A\""
- }
- ],
- "cookie": [],
- "body": "{\n \"books\": [\n {\n \"isbn\": \"9781449325862\"\n },\n {\n \"isbn\": \"9781449331818\"\n }\n ]\n}"
- }
- ]
- },
- {
- "name": "Book",
- "event": [
- {
- "listen": "test",
- "script": {
- "exec": [
- "pm.test(\"Status code is 204\", function () {\r",
- " pm.response.to.have.status(204);\r",
- "});"
- ],
- "type": "text/javascript",
- "packages": {}
- }
- }
- ],
- "request": {
- "method": "DELETE",
- "header": [
- {
- "key": "Authorization",
- "value": "Bearer {{user_token}}",
- "type": "text"
- }
- ],
- "body": {
- "mode": "raw",
- "raw": "{\r\n \"isbn\": \"{{isbn_1}}\",\r\n \"userId\": \"{{user_id}}\"\r\n}\r\n",
- "options": {
- "raw": {
- "language": "json"
- }
- }
- },
- "url": {
- "raw": "{{host}}/BookStore/v1/Book",
- "host": [
- "{{host}}"
- ],
- "path": [
- "BookStore",
- "v1",
- "Book"
- ]
- },
- "description": "Delete Book from user profile"
- },
- "response": [
- {
- "name": "204",
- "originalRequest": {
- "method": "DELETE",
- "header": [
- {
- "key": "Authorization",
- "value": "Bearer {{user_token}}",
- "type": "text"
- }
- ],
- "body": {
- "mode": "raw",
- "raw": "{\r\n \"isbn\": \"{{isbn_1}}\",\r\n \"userId\": \"{{user_id}}\"\r\n}\r\n",
- "options": {
- "raw": {
- "language": "json"
- }
- }
- },
- "url": {
- "raw": "{{host}}/BookStore/v1/Book",
- "host": [
- "{{host}}"
- ],
- "path": [
- "BookStore",
- "v1",
- "Book"
- ]
- }
- },
- "status": "No Content",
- "code": 204,
- "_postman_previewlanguage": "plain",
- "header": [
- {
- "key": "Server",
- "value": "nginx/1.17.10 (Ubuntu)"
- },
- {
- "key": "Date",
- "value": "Sun, 29 Sep 2024 10:29:59 GMT"
- },
- {
- "key": "Connection",
- "value": "keep-alive"
- },
- {
- "key": "X-Powered-By",
- "value": "Express"
- },
- {
- "key": "ETag",
- "value": "W/\"76-4u4Jx6+Klw8oaF/Jpic7XD0wNTE\""
- }
- ],
- "cookie": [],
- "body": null
- }
- ]
- },
- {
- "name": "Books",
- "event": [
- {
- "listen": "test",
- "script": {
- "exec": [
- "pm.test(\"Status code is 200\", function () {\r",
- " pm.response.to.have.status(200);\r",
- "});"
- ],
- "type": "text/javascript",
- "packages": {}
- }
- }
- ],
- "request": {
- "method": "PUT",
- "header": [
- {
- "key": "Authorization",
- "value": "Bearer {{user_token}}",
- "type": "text"
- }
- ],
- "body": {
- "mode": "raw",
- "raw": "{\r\n \"userId\": \"{{user_id}}\",\r\n \"isbn\": \"{{isbn_3}}\"\r\n}",
- "options": {
- "raw": {
- "language": "json"
- }
- }
- },
- "url": {
- "raw": "{{host}}/BookStore/v1/Books/{{isbn_2}}",
- "host": [
- "{{host}}"
- ],
- "path": [
- "BookStore",
- "v1",
- "Books",
- "{{isbn_2}}"
- ]
- },
- "description": "Replace 1 book by other in user profile"
- },
- "response": [
- {
- "name": "200",
- "originalRequest": {
- "method": "PUT",
- "header": [
- {
- "key": "Authorization",
- "value": "Bearer {{user_token}}",
- "type": "text"
- }
- ],
- "body": {
- "mode": "raw",
- "raw": "{\r\n \"userId\": \"{{user_id}}\",\r\n \"isbn\": \"{{isbn_3}}\"\r\n}",
- "options": {
- "raw": {
- "language": "json"
- }
- }
- },
- "url": {
- "raw": "{{host}}/BookStore/v1/Books/{{isbn_2}}",
- "host": [
- "{{host}}"
- ],
- "path": [
- "BookStore",
- "v1",
- "Books",
- "{{isbn_2}}"
- ]
- }
- },
- "status": "OK",
- "code": 200,
- "_postman_previewlanguage": "json",
- "header": [
- {
- "key": "Server",
- "value": "nginx/1.17.10 (Ubuntu)"
- },
- {
- "key": "Date",
- "value": "Sun, 29 Sep 2024 10:30:19 GMT"
- },
- {
- "key": "Content-Type",
- "value": "application/json; charset=utf-8"
- },
- {
- "key": "Content-Length",
- "value": "669"
- },
- {
- "key": "Connection",
- "value": "keep-alive"
- },
- {
- "key": "X-Powered-By",
- "value": "Express"
- },
- {
- "key": "ETag",
- "value": "W/\"29d-wvTNoFqDeJbF7a1b0AvMMNdrKiw\""
- }
- ],
- "cookie": [],
- "body": "{\n \"userId\": \"649f3ca8-2305-446b-902e-11c35434b107\",\n \"username\": \"UserName_2\",\n \"books\": [\n {\n \"isbn\": \"9781449337711\",\n \"title\": \"Designing Evolvable Web APIs with ASP.NET\",\n \"subTitle\": \"Harnessing the Power of the Web\",\n \"author\": \"Glenn Block et al.\",\n \"publish_date\": \"2020-06-04T09:12:43.000Z\",\n \"publisher\": \"O'Reilly Media\",\n \"pages\": 238,\n \"description\": \"Design and build Web APIs for a broad range of clients—including browsers and mobile devices—that can adapt to change over time. This practical, hands-on guide takes you through the theory and tools you need to build evolvable HTTP services with Microsoft\",\n \"website\": \"http://chimera.labs.oreilly.com/books/1234000001708/index.html\"\n }\n ]\n}"
- }
- ]
- },
- {
- "name": "Books",
- "event": [
- {
- "listen": "test",
- "script": {
- "exec": [
- "pm.test(\"Status code is 204\", function () {\r",
- " pm.response.to.have.status(204);\r",
- "});"
- ],
- "type": "text/javascript",
- "packages": {}
- }
- }
- ],
- "request": {
- "method": "DELETE",
- "header": [
- {
- "key": "Authorization",
- "value": "Bearer {{user_token}}",
- "type": "text"
- }
- ],
- "url": {
- "raw": "{{host}}/BookStore/v1/Books?UserId={{user_id}}",
- "host": [
- "{{host}}"
- ],
- "path": [
- "BookStore",
- "v1",
- "Books"
- ],
- "query": [
- {
- "key": "UserId",
- "value": "{{user_id}}"
- }
- ]
- },
- "description": "Delete all books from user profile"
- },
- "response": [
- {
- "name": "204",
- "originalRequest": {
- "method": "DELETE",
- "header": [
- {
- "key": "Authorization",
- "value": "Bearer {{user_token}}",
- "type": "text"
- }
- ],
- "url": {
- "raw": "{{host}}/BookStore/v1/Books?UserId={{user_id}}",
- "host": [
- "{{host}}"
- ],
- "path": [
- "BookStore",
- "v1",
- "Books"
- ],
- "query": [
- {
- "key": "UserId",
- "value": "{{user_id}}"
- }
- ]
- }
- },
- "status": "No Content",
- "code": 204,
- "_postman_previewlanguage": "plain",
- "header": [
- {
- "key": "Server",
- "value": "nginx/1.17.10 (Ubuntu)"
- },
- {
- "key": "Date",
- "value": "Sun, 29 Sep 2024 10:30:29 GMT"
- },
- {
- "key": "Connection",
- "value": "keep-alive"
- },
- {
- "key": "X-Powered-By",
- "value": "Express"
- },
- {
- "key": "ETag",
- "value": "W/\"60-bq4jooshaLJoEfwaiUTq+pV2+H0\""
- }
- ],
- "cookie": [],
- "body": null
- }
- ]
- },
- {
- "name": "User",
- "event": [
- {
- "listen": "test",
- "script": {
- "exec": [
- "pm.test(\"Status code is 204\", function () {\r",
- " pm.response.to.have.status(204);\r",
- "});"
- ],
- "type": "text/javascript",
- "packages": {}
- }
- }
- ],
- "request": {
- "method": "DELETE",
- "header": [
- {
- "key": "Authorization",
- "value": "Bearer {{user_token}}",
- "type": "text"
- }
- ],
- "url": {
- "raw": "{{host}}/Account/v1/User/{{user_id}}",
- "host": [
- "{{host}}"
- ],
- "path": [
- "Account",
- "v1",
- "User",
- "{{user_id}}"
- ]
- },
- "description": "Delete User"
- },
- "response": [
- {
- "name": "204",
- "originalRequest": {
- "method": "DELETE",
- "header": [
- {
- "key": "Authorization",
- "value": "Bearer {{user_token}}",
- "type": "text"
- }
- ],
- "url": {
- "raw": "{{host}}/Account/v1/User/{{user_id}}",
- "host": [
- "{{host}}"
- ],
- "path": [
- "Account",
- "v1",
- "User",
- "{{user_id}}"
- ]
- }
- },
- "status": "No Content",
- "code": 204,
- "_postman_previewlanguage": "plain",
- "header": [
- {
- "key": "Server",
- "value": "nginx/1.17.10 (Ubuntu)"
- },
- {
- "key": "Date",
- "value": "Sun, 29 Sep 2024 10:31:32 GMT"
- },
- {
- "key": "Connection",
- "value": "keep-alive"
- },
- {
- "key": "X-Powered-By",
- "value": "Express"
- },
- {
- "key": "ETag",
- "value": "W/\"58-dqmNxUQyfyh3Tfw8svq9Z5W8+VI\""
- }
- ],
- "cookie": [],
- "body": null
- }
- ]
- }
- ],
- "event": [
- {
- "listen": "prerequest",
- "script": {
- "type": "text/javascript",
- "packages": {},
- "exec": [
- ""
- ]
- }
- },
- {
- "listen": "test",
- "script": {
- "type": "text/javascript",
- "packages": {},
- "exec": [
- ""
- ]
- }
- }
- ],
- "variable": [
- {
- "key": "host",
- "value": "https://demoqa.com",
- "type": "string",
- "disabled": true
- },
- {
- "key": "user_name",
- "value": "",
- "type": "string",
- "disabled": true
- },
- {
- "key": "user_pass",
- "value": "",
- "type": "string",
- "disabled": true
- }
- ]
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement