{ "info": { "_postman_id": "5fad29f8-82b7-4fa8-9edd-65c8567b4f1d", "name": "NITask", "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json" }, "item": [ { "name": "products", "request": { "method": "GET", "header": [ { "key": "Accept", "value": "application/json" }, { "key": "Authorization", "value": "Bearer {{token}}" } ], "url": { "raw": "{{url}}products", "host": [ "{{url}}products" ] } }, "response": [] }, { "name": "user", "request": { "method": "GET", "header": [ { "key": "Accept", "value": "application/json" }, { "key": "Authorization", "value": "Bearer {{token}}" } ], "url": { "raw": "{{url}}user", "host": [ "{{url}}user" ] } }, "response": [] }, { "name": "user/product", "request": { "method": "GET", "header": [ { "key": "Accept", "value": "application/json" }, { "key": "Authorization", "value": "Bearer {{token}}" } ], "url": { "raw": "{{url}}user/products", "host": [ "{{url}}user" ], "path": [ "products" ] } }, "response": [] }, { "name": "user/product/{SKU}", "request": { "method": "DELETE", "header": [ { "key": "Accept", "value": "application/json" }, { "key": "Authorization", "value": "Bearer {{token}}" } ], "url": { "raw": "{{url}}user/products/una-corda", "host": [ "{{url}}user" ], "path": [ "products", "una-corda" ] } }, "response": [] }, { "name": "user/product", "request": { "method": "POST", "header": [ { "key": "Accept", "value": "application/json" }, { "key": "Authorization", "value": "Bearer {{token}}" } ], "body": { "mode": "formdata", "formdata": [ { "key": "sku", "value": "una-corda", "type": "text" } ] }, "url": { "raw": "{{url}}user/products", "host": [ "{{url}}user" ], "path": [ "products" ] } }, "response": [] }, { "name": "auth", "event": [ { "listen": "prerequest", "script": { "exec": [ "" ], "type": "text/javascript" } }, { "listen": "test", "script": { "exec": [ "pm.test(\"Status code is 200\", function () {", " pm.response.to.have.status(200);", " var jsonData = pm.response.json();", " pm.collectionVariables.set(\"token\", jsonData.token);", "});" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [ { "key": "Accept", "value": "application/json" }, { "key": "Content-Type", "value": "application/x-www-form-urlencoded" } ], "body": { "mode": "urlencoded", "urlencoded": [ { "key": "email", "value": "mac94@moen.com", "type": "text" }, { "key": "password", "value": "102030", "type": "text" } ] }, "url": { "raw": "{{url}}auth", "host": [ "{{url}}auth" ] } }, "response": [] } ], "event": [ { "listen": "prerequest", "script": { "type": "text/javascript", "exec": [ "" ] } }, { "listen": "test", "script": { "type": "text/javascript", "exec": [ "" ] } } ], "variable": [ { "key": "url", "value": "http://localhost/api/" }, { "key": "token", "value": null } ] }