{"info":{"_postman_id":"445abef4-45be-4478-a6e7-b669c64259d8","name":"mosquitto-manager-api-tests","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[],"description":"<html><head></head><body></body></html>","owner":"109540","collectionId":"445abef4-45be-4478-a6e7-b669c64259d8","publishedId":"TVCe29My","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"EF5B25"},"publishDate":"2020-09-01T13:16:26.000Z"},"item":[{"name":"add-creds","event":[{"listen":"test","script":{"id":"285bf68c-6c4a-435d-af99-c19b9834c87c","exec":["pm.test(\"Status code is 200\", function() {","    pm.response.to.have.status(200);","})","pm.test(\"Response body is ID\", function() {","    var test1 = responseBody.length > 0;","    pm.expect(test1).to.be.true","})","pm.collectionVariables.set(\"credsId\", responseBody);"],"type":"text/javascript"}}],"id":"91022a95-687f-4f3e-95ec-4b728bb65c56","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"basic","basic":{"basicConfig":[{"key":"username","value":"<username>"},{"key":"password","value":"<password>"}]},"isInherited":false},"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"Login\": \"login-test\",\n    \"Password\": \"password-test\"\n}","options":{"raw":{"language":"json"}}},"url":"https://localhost:8080/creds","urlObject":{"protocol":"https","port":"8080","path":["creds"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"91022a95-687f-4f3e-95ec-4b728bb65c56"},{"name":"get-creds","event":[{"listen":"test","script":{"id":"b27d03c2-6cf9-47d8-a71b-ffdaf480035c","exec":["pm.test(\"Status code is 200\", function() {","    pm.response.to.have.status(200);","})","","pm.test(\"Response body is ok\", function() {","    var responseJson = JSON.parse(responseBody);","    var test1 = responseJson.Id == pm.collectionVariables.get(\"credsId\");","    pm.expect(test1).to.be.true","    var test2 = responseJson.Login == \"login-test\";","    pm.expect(test2).to.be.true","    var test3 = responseJson.Password == \"password-test\";","    pm.expect(test3).to.be.true","})"],"type":"text/javascript"}}],"id":"c9d3758e-3e6a-4e16-ac61-8eee842ffbaf","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"basic","basic":{"basicConfig":[{"key":"username","value":"<username>"},{"key":"password","value":"<password>"}]},"isInherited":false},"method":"GET","header":[],"url":"https://localhost:8080/creds/5f6b6552f7dc26aa9276e91a","urlObject":{"protocol":"https","port":"8080","path":["creds","5f6b6552f7dc26aa9276e91a"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"c9d3758e-3e6a-4e16-ac61-8eee842ffbaf"},{"name":"list-creds","event":[{"listen":"test","script":{"id":"4a4bbfba-d376-47dd-b4e7-a3399042dcc8","exec":["pm.test(\"Status code is 200\", function() {","    pm.response.to.have.status(200);","})","","pm.test(\"Response body is ok\", function() {","    var responseJson = JSON.parse(responseBody);","    var test1 = responseJson[responseJson.length -1].Id == pm.collectionVariables.get(\"credsId\");","    pm.expect(test1).to.be.true","    var test2 = responseJson[responseJson.length -1].Login == \"login-test\";","    pm.expect(test2).to.be.true","    var test3 = responseJson[responseJson.length -1].Password == \"password-test\";","    pm.expect(test3).to.be.true","})"],"type":"text/javascript"}}],"id":"6c17257e-1005-4157-ae93-21de944d143c","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"basic","basic":{"basicConfig":[{"key":"username","value":"<username>"},{"key":"password","value":"<password>"}]},"isInherited":false},"method":"GET","header":[],"url":"https://localhost:8080/creds","urlObject":{"protocol":"https","port":"8080","path":["creds"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"6c17257e-1005-4157-ae93-21de944d143c"},{"name":"update-creds","event":[{"listen":"test","script":{"id":"9ffca40a-a7ee-42bd-8d3d-f40bec06636c","exec":["pm.test(\"Status code is 200\", function() {","    pm.response.to.have.status(200);","})"],"type":"text/javascript"}}],"id":"934616b6-52f7-4458-80ec-999a50fa1a4f","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"basic","basic":{"basicConfig":[{"key":"username","value":"<username>"},{"key":"password","value":"<password>"}]},"isInherited":false},"method":"PUT","header":[],"body":{"mode":"raw","raw":"{\n    \"Login\": \"login-test2\",\n    \"Password\": \"password-test2\"\n}","options":{"raw":{"language":"json"}}},"url":"https://localhost:8080/creds/5f6b6552f7dc26aa9276e91a","urlObject":{"protocol":"https","port":"8080","path":["creds","5f6b6552f7dc26aa9276e91a"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"934616b6-52f7-4458-80ec-999a50fa1a4f"},{"name":"get-creds-2","event":[{"listen":"test","script":{"id":"7644c1aa-54b3-4e83-bc2b-9db7cb484c44","exec":["pm.test(\"Status code is 200\", function() {","    pm.response.to.have.status(200);","})","","pm.test(\"Response body is ok\", function() {","    var responseJson = JSON.parse(responseBody);","    var test1 = responseJson.Id == pm.collectionVariables.get(\"credsId\");","    pm.expect(test1).to.be.true","    var test2 = responseJson.Login == \"login-test2\";","    pm.expect(test2).to.be.true","    var test3 = responseJson.Password == \"password-test2\";","    pm.expect(test3).to.be.true","})"],"type":"text/javascript"}}],"id":"aa1cf8ba-fcbb-4f50-b49e-0b4611cde49a","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"basic","basic":{"basicConfig":[{"key":"username","value":"<username>"},{"key":"password","value":"<password>"}]},"isInherited":false},"method":"GET","header":[],"url":"https://localhost:8080/creds/5f6b6552f7dc26aa9276e91a","urlObject":{"protocol":"https","port":"8080","path":["creds","5f6b6552f7dc26aa9276e91a"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"aa1cf8ba-fcbb-4f50-b49e-0b4611cde49a"},{"name":"remove-creds","event":[{"listen":"test","script":{"id":"ac30522b-f9c8-4466-aab4-ea40c9a104ea","exec":["pm.test(\"Status code is 200\", function() {","    pm.response.to.have.status(200);","})"],"type":"text/javascript"}}],"id":"5c5588de-2174-4a38-9b09-f9e14ad52341","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"basic","basic":{"basicConfig":[{"key":"username","value":"<username>"},{"key":"password","value":"<password>"}]},"isInherited":false},"method":"DELETE","header":[],"body":{"mode":"raw","raw":"","options":{"raw":{"language":"json"}}},"url":"https://localhost:8080/creds/5f6b6552f7dc26aa9276e91a","urlObject":{"protocol":"https","port":"8080","path":["creds","5f6b6552f7dc26aa9276e91a"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"5c5588de-2174-4a38-9b09-f9e14ad52341"},{"name":"get-creds","event":[{"listen":"test","script":{"id":"adfef1c3-db6c-4d75-b99e-bc163963ab73","exec":["pm.test(\"Status code is 404\", function() {","    pm.response.to.have.status(404);","})"],"type":"text/javascript"}}],"id":"27c0b741-55bc-41c4-9564-f1a1d198bd6d","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"basic","basic":{"basicConfig":[{"key":"username","value":"<username>"},{"key":"password","value":"<password>"}]},"isInherited":false},"method":"GET","header":[],"url":"https://localhost:8080/creds/5f6b6552f7dc26aa9276e91a","urlObject":{"protocol":"https","port":"8080","path":["creds","5f6b6552f7dc26aa9276e91a"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"27c0b741-55bc-41c4-9564-f1a1d198bd6d"}],"variable":[{"key":"credsId","value":"5f6b6552f7dc26aa9276e91a"}]}