{"info":{"_postman_id":"4d67c821-bd53-4952-8af9-7d792d8e0239","name":"Mars Rover API","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[],"description":"<html><head></head><body></body></html>","owner":"5122272","collectionId":"4d67c821-bd53-4952-8af9-7d792d8e0239","publishedId":"Tzsfo5od","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"EF5B25"},"publishDate":"2021-08-02T17:09:02.000Z"},"item":[{"name":"plateau","item":[{"name":"plateau","event":[{"listen":"test","script":{"id":"7b575574-5df6-4e96-bacd-7184e9607c64","exec":["const resp = pm.response.json();","pm.collectionVariables.set(\"plateau_id\", resp.data.id);","","pm.test(\"Test data type of the response\", () => {","  pm.expect(resp.data.id).to.be.a(\"number\");","  pm.expect(resp.data.width).to.be.a(\"number\");","  pm.expect(resp.data.height).to.be.a(\"number\");","});","","pm.test(\"Successful POST request\", () => {","  pm.expect(pm.response.code).to.be.oneOf([200,201]);","});","","pm.test(\"Content-Type header is present\", () => {","  pm.response.to.have.header(\"Content-Type\");","});","","pm.test(\"Content-Type header is application/json\", () => {","  pm.expect(pm.response.headers.get('Content-Type')).to.eql('application/json; charset=UTF-8');","});","","pm.test(\"Cookie PHPSESSID is present\", () => {","  pm.expect(pm.cookies.has('PHPSESSID')).to.be.true;","});","","pm.test(\"Response time is less than 200ms\", () => {","  pm.expect(pm.response.responseTime).to.be.below(200);","});",""],"type":"text/javascript"}}],"id":"08e5c798-92d2-4df2-a1be-6091e255f091","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"noauth","isInherited":false},"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"width\": 5,\n    \"height\": 5\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:8080/api/v1/plateau","urlObject":{"host":["http://localhost:8080/api/v1/plateau"],"query":[],"variable":[]}},"response":[],"_postman_id":"08e5c798-92d2-4df2-a1be-6091e255f091"},{"name":"plateaus","event":[{"listen":"test","script":{"id":"8430811d-107e-4af1-8b4c-785be8e376e8","exec":["const resp = pm.response.json();","","pm.test(\"Test data type of the response\", () => {","  pm.expect(resp.data).to.be.a(\"object\");","});","","pm.test(\"Successful POST request\", () => {","  pm.expect(pm.response.code).to.be.oneOf([200]);","});","","pm.test(\"Content-Type header is present\", () => {","  pm.response.to.have.header(\"Content-Type\");","});","","pm.test(\"Content-Type header is application/json\", () => {","  pm.expect(pm.response.headers.get('Content-Type')).to.eql('application/json; charset=UTF-8');","});","","pm.test(\"Cookie PHPSESSID is present\", () => {","  pm.expect(pm.cookies.has('PHPSESSID')).to.be.true;","});","","pm.test(\"Response time is less than 200ms\", () => {","  pm.expect(pm.response.responseTime).to.be.below(200);","});",""],"type":"text/javascript"}}],"id":"d65e10e2-ce7f-4f85-9d28-3469f0838cbb","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"noauth","isInherited":false},"method":"GET","header":[],"url":"http://localhost:8080/api/v1/plateaus","urlObject":{"host":["http://localhost:8080/api/v1/plateaus"],"query":[],"variable":[]}},"response":[],"_postman_id":"d65e10e2-ce7f-4f85-9d28-3469f0838cbb"},{"name":"plateau/{:id}","event":[{"listen":"test","script":{"id":"e02389fb-bb70-43a9-9b1c-9bbf09fda1df","exec":["const resp = pm.response.json();","","pm.test(\"Test data type of the response\", () => {","  pm.expect(resp.data.id).to.be.a(\"number\");","  pm.expect(resp.data.width).to.be.a(\"number\");","  pm.expect(resp.data.height).to.be.a(\"number\");","});","","pm.test(\"Successful POST request\", () => {","  pm.expect(pm.response.code).to.be.oneOf([200,201]);","});","","pm.test(\"Content-Type header is present\", () => {","  pm.response.to.have.header(\"Content-Type\");","});","","pm.test(\"Content-Type header is application/json\", () => {","  pm.expect(pm.response.headers.get('Content-Type')).to.eql('application/json; charset=UTF-8');","});","","pm.test(\"Cookie PHPSESSID is present\", () => {","  pm.expect(pm.cookies.has('PHPSESSID')).to.be.true;","});","","pm.test(\"Response time is less than 200ms\", () => {","  pm.expect(pm.response.responseTime).to.be.below(200);","});",""],"type":"text/javascript"}}],"id":"d23c505a-3646-4202-861a-e3866b324e15","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"noauth","isInherited":false},"method":"GET","header":[],"url":"http://localhost:8080/api/v1/plateau/1","urlObject":{"path":["1"],"host":["http://localhost:8080/api/v1/plateau"],"query":[],"variable":[]}},"response":[],"_postman_id":"d23c505a-3646-4202-861a-e3866b324e15"},{"name":"plateau/{:id}","event":[{"listen":"test","script":{"id":"ab45a8a2-f491-4e31-8324-4213df0a0346","exec":["const resp = pm.response.json();","","pm.test(\"Test data type of the response\", () => {","  pm.expect(resp.data.id).to.be.a(\"number\");","  pm.expect(resp.data.width).to.be.a(\"number\");","  pm.expect(resp.data.height).to.be.a(\"number\");","});","","pm.test(\"Successful POST request\", () => {","  pm.expect(pm.response.code).to.be.oneOf([202]);","});","","pm.test(\"Content-Type header is present\", () => {","  pm.response.to.have.header(\"Content-Type\");","});","","pm.test(\"Content-Type header is application/json\", () => {","  pm.expect(pm.response.headers.get('Content-Type')).to.eql('application/json; charset=UTF-8');","});","","pm.test(\"Cookie PHPSESSID is present\", () => {","  pm.expect(pm.cookies.has('PHPSESSID')).to.be.true;","});","","pm.test(\"Response time is less than 200ms\", () => {","  pm.expect(pm.response.responseTime).to.be.below(200);","});",""],"type":"text/javascript"}}],"id":"a53f4b42-cddc-4109-8496-e618ca093f73","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"noauth","isInherited":false},"method":"PUT","header":[],"body":{"mode":"raw","raw":"{\n    \"width\": 10,\n    \"height\": 10\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:8080/api/v1/plateau/1","urlObject":{"path":["1"],"host":["http://localhost:8080/api/v1/plateau"],"query":[],"variable":[]}},"response":[],"_postman_id":"a53f4b42-cddc-4109-8496-e618ca093f73"},{"name":"plateau/{:id}","event":[{"listen":"test","script":{"id":"25e09161-e240-4dfc-9994-72b751854806","exec":["const resp = pm.response.json();","","pm.test(\"Test data type of the response\", () => {","  pm.expect(resp.data.id).to.be.a(\"number\");","  pm.expect(resp.data.width).to.be.a(\"number\");","  pm.expect(resp.data.height).to.be.a(\"number\");","});","","pm.test(\"Successful POST request\", () => {","  pm.expect(pm.response.code).to.be.oneOf([200]);","});","","pm.test(\"Content-Type header is present\", () => {","  pm.response.to.have.header(\"Content-Type\");","});","","pm.test(\"Content-Type header is application/json\", () => {","  pm.expect(pm.response.headers.get('Content-Type')).to.eql('application/json; charset=UTF-8');","});","","pm.test(\"Cookie PHPSESSID is present\", () => {","  pm.expect(pm.cookies.has('PHPSESSID')).to.be.true;","});","","pm.test(\"Response time is less than 200ms\", () => {","  pm.expect(pm.response.responseTime).to.be.below(200);","});",""],"type":"text/javascript"}}],"id":"474a4cff-7975-48db-98f3-2557050ab078","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"noauth","isInherited":false},"method":"DELETE","header":[],"url":"http://localhost:8080/api/v1/plateau/1","urlObject":{"path":["1"],"host":["http://localhost:8080/api/v1/plateau"],"query":[],"variable":[]}},"response":[],"_postman_id":"474a4cff-7975-48db-98f3-2557050ab078"}],"id":"148a6f69-192c-4b2c-b0bd-37f244c34cd2","_postman_id":"148a6f69-192c-4b2c-b0bd-37f244c34cd2","description":""},{"name":"rover","item":[{"name":"rover","event":[{"listen":"test","script":{"id":"fdcc5989-81e4-4b05-af9c-bc08082301e3","exec":["const resp = pm.response.json();","pm.collectionVariables.set(\"rover_id\", resp.data.id);","","pm.test(\"Test data type of the response\", () => {","  pm.expect(resp.data.id).to.be.a(\"number\");","  pm.expect(resp.data.plateau_id).to.be.a(\"number\");","  pm.expect(resp.data.x).to.be.a(\"number\");","  pm.expect(resp.data.y).to.be.a(\"number\");","  pm.expect(resp.data.direction).to.be.a(\"string\");","});","","pm.test(\"Successful POST request\", () => {","  pm.expect(pm.response.code).to.be.oneOf([200,201]);","});","","pm.test(\"Content-Type header is present\", () => {","  pm.response.to.have.header(\"Content-Type\");","});","","pm.test(\"Content-Type header is application/json\", () => {","  pm.expect(pm.response.headers.get('Content-Type')).to.eql('application/json; charset=UTF-8');","});","","pm.test(\"Cookie PHPSESSID is present\", () => {","  pm.expect(pm.cookies.has('PHPSESSID')).to.be.true;","});","","pm.test(\"Response time is less than 200ms\", () => {","  pm.expect(pm.response.responseTime).to.be.below(200);","});",""],"type":"text/javascript"}}],"id":"8e1ea961-fd3b-470d-880e-f13a15b94fd1","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"noauth","isInherited":false},"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"plateau_id\": 1,\n    \"x\": 1,\n    \"y\": 2,\n    \"direction\": \"N\"\n}\n","options":{"raw":{"language":"json"}}},"url":"http://localhost:8080/api/v1/rover","urlObject":{"host":["http://localhost:8080/api/v1/rover"],"query":[],"variable":[]}},"response":[],"_postman_id":"8e1ea961-fd3b-470d-880e-f13a15b94fd1"},{"name":"rovers","event":[{"listen":"test","script":{"id":"ef9cd92d-96f4-41b3-96c4-174c444a3fec","exec":["const resp = pm.response.json();","","pm.test(\"Test data type of the response\", () => {","  pm.expect(resp.data).to.be.a(\"object\");","});","","pm.test(\"Successful POST request\", () => {","  pm.expect(pm.response.code).to.be.oneOf([200]);","});","","pm.test(\"Content-Type header is present\", () => {","  pm.response.to.have.header(\"Content-Type\");","});","","pm.test(\"Content-Type header is application/json\", () => {","  pm.expect(pm.response.headers.get('Content-Type')).to.eql('application/json; charset=UTF-8');","});","","pm.test(\"Cookie PHPSESSID is present\", () => {","  pm.expect(pm.cookies.has('PHPSESSID')).to.be.true;","});","","pm.test(\"Response time is less than 200ms\", () => {","  pm.expect(pm.response.responseTime).to.be.below(200);","});",""],"type":"text/javascript"}}],"id":"9fdd1fc2-6c4b-4178-a280-0f48c40537b4","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"noauth","isInherited":false},"method":"GET","header":[],"url":"http://localhost:8080/api/v1/rovers","urlObject":{"host":["http://localhost:8080/api/v1/rovers"],"query":[],"variable":[]}},"response":[],"_postman_id":"9fdd1fc2-6c4b-4178-a280-0f48c40537b4"},{"name":"rover/{:id}","event":[{"listen":"test","script":{"id":"363b139b-8d4a-4ab5-8043-306b211f8c04","exec":["const resp = pm.response.json();","","pm.test(\"Test data type of the response\", () => {","  pm.expect(resp.data.id).to.be.a(\"number\");","  pm.expect(resp.data.plateau_id).to.be.a(\"number\");","  pm.expect(resp.data.x).to.be.a(\"number\");","  pm.expect(resp.data.y).to.be.a(\"number\");","  pm.expect(resp.data.direction).to.be.a(\"string\");","});","","pm.test(\"Successful POST request\", () => {","  pm.expect(pm.response.code).to.be.oneOf([200,201]);","});","","pm.test(\"Content-Type header is present\", () => {","  pm.response.to.have.header(\"Content-Type\");","});","","pm.test(\"Content-Type header is application/json\", () => {","  pm.expect(pm.response.headers.get('Content-Type')).to.eql('application/json; charset=UTF-8');","});","","pm.test(\"Cookie PHPSESSID is present\", () => {","  pm.expect(pm.cookies.has('PHPSESSID')).to.be.true;","});","","pm.test(\"Response time is less than 200ms\", () => {","  pm.expect(pm.response.responseTime).to.be.below(200);","});",""],"type":"text/javascript"}}],"id":"1690d73b-715a-4f00-b24d-872dfc37192e","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"noauth","isInherited":false},"method":"GET","header":[],"url":"http://localhost:8080/api/v1/rover/","urlObject":{"path":[""],"host":["http://localhost:8080/api/v1/rover"],"query":[],"variable":[]}},"response":[],"_postman_id":"1690d73b-715a-4f00-b24d-872dfc37192e"},{"name":"rover/{:id}","event":[{"listen":"test","script":{"id":"f99a43d8-4ed6-4ff8-b48d-435ec37cf41d","exec":["const resp = pm.response.json();","","pm.test(\"Test data type of the response\", () => {","  pm.expect(resp.data.id).to.be.a(\"number\");","  pm.expect(resp.data.plateau_id).to.be.a(\"number\");","  pm.expect(resp.data.x).to.be.a(\"number\");","  pm.expect(resp.data.y).to.be.a(\"number\");","  pm.expect(resp.data.direction).to.be.a(\"string\");","});","","pm.test(\"Successful POST request\", () => {","  pm.expect(pm.response.code).to.be.oneOf([202]);","});","","pm.test(\"Content-Type header is present\", () => {","  pm.response.to.have.header(\"Content-Type\");","});","","pm.test(\"Content-Type header is application/json\", () => {","  pm.expect(pm.response.headers.get('Content-Type')).to.eql('application/json; charset=UTF-8');","});","","pm.test(\"Cookie PHPSESSID is present\", () => {","  pm.expect(pm.cookies.has('PHPSESSID')).to.be.true;","});","","pm.test(\"Response time is less than 200ms\", () => {","  pm.expect(pm.response.responseTime).to.be.below(200);","});",""],"type":"text/javascript"}}],"id":"a148c581-0da6-4496-bd69-c1b83253df04","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"noauth","isInherited":false},"method":"PUT","header":[],"body":{"mode":"raw","raw":"{\n    \"plateau_id\": 1,\n    \"x\": 2,\n    \"y\": 2,\n    \"direction\": \"E\"\n}\n","options":{"raw":{"language":"json"}}},"url":"http://localhost:8080/api/v1/rover/","urlObject":{"path":[""],"host":["http://localhost:8080/api/v1/rover"],"query":[],"variable":[]}},"response":[],"_postman_id":"a148c581-0da6-4496-bd69-c1b83253df04"},{"name":"rover/{:id}","event":[{"listen":"test","script":{"id":"f095a2dc-dae4-4c52-a05d-0aa1b80c1dba","exec":["const resp = pm.response.json();","","pm.test(\"Test data type of the response\", () => {","  pm.expect(resp.data.id).to.be.a(\"number\");","  pm.expect(resp.data.plateau_id).to.be.a(\"number\");","  pm.expect(resp.data.x).to.be.a(\"number\");","  pm.expect(resp.data.y).to.be.a(\"number\");","  pm.expect(resp.data.direction).to.be.a(\"string\");","});","","pm.test(\"Successful POST request\", () => {","  pm.expect(pm.response.code).to.be.oneOf([200]);","});","","pm.test(\"Content-Type header is present\", () => {","  pm.response.to.have.header(\"Content-Type\");","});","","pm.test(\"Content-Type header is application/json\", () => {","  pm.expect(pm.response.headers.get('Content-Type')).to.eql('application/json; charset=UTF-8');","});","","pm.test(\"Cookie PHPSESSID is present\", () => {","  pm.expect(pm.cookies.has('PHPSESSID')).to.be.true;","});","","pm.test(\"Response time is less than 200ms\", () => {","  pm.expect(pm.response.responseTime).to.be.below(200);","});",""],"type":"text/javascript"}}],"id":"1668368c-e1be-4117-b5b5-0549adc585a9","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"noauth","isInherited":false},"method":"DELETE","header":[],"url":"http://localhost:8080/api/v1/rover/","urlObject":{"path":[""],"host":["http://localhost:8080/api/v1/rover"],"query":[],"variable":[]}},"response":[],"_postman_id":"1668368c-e1be-4117-b5b5-0549adc585a9"}],"id":"2bd44c94-9c36-4860-9409-8a31d64a1f27","_postman_id":"2bd44c94-9c36-4860-9409-8a31d64a1f27","description":""},{"name":"command","event":[{"listen":"test","script":{"id":"5ed04de1-622f-44b3-9807-62d1a0770d90","exec":["const resp = pm.response.json();","","pm.test(\"Successful POST request\", () => {","  pm.expect(pm.response.code).to.be.oneOf([200]);","});","","pm.test(\"Content-Type header is present\", () => {","  pm.response.to.have.header(\"Content-Type\");","});","","pm.test(\"Content-Type header is application/json\", () => {","  pm.expect(pm.response.headers.get('Content-Type')).to.eql('application/json; charset=UTF-8');","});","","pm.test(\"Cookie PHPSESSID is present\", () => {","  pm.expect(pm.cookies.has('PHPSESSID')).to.be.true;","});","","pm.test(\"Response time is less than 200ms\", () => {","  pm.expect(pm.response.responseTime).to.be.below(200);","});",""],"type":"text/javascript"}}],"id":"f86585e9-b6de-4cf2-a493-324c3af639ed","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"noauth","isInherited":false},"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"rover_id\": ,\n    \"commands\": \"LMLMLMLMM\"\n}\n","options":{"raw":{"language":"json"}}},"url":"http://localhost:8080/api/v1/rover/command","urlObject":{"path":["command"],"host":["http://localhost:8080/api/v1/rover"],"query":[],"variable":[]}},"response":[],"_postman_id":"f86585e9-b6de-4cf2-a493-324c3af639ed"},{"name":"rover/state/{:id}","event":[{"listen":"test","script":{"id":"ba9a630c-cf04-401f-8270-4048e87d6a37","exec":["const resp = pm.response.json();","","pm.test(\"Test data type of the response\", () => {","  pm.expect(resp.data.id).to.be.a(\"number\");","  pm.expect(resp.data.plateau_id).to.be.a(\"number\");","  pm.expect(resp.data.x).to.be.a(\"number\");","  pm.expect(resp.data.y).to.be.a(\"number\");","  pm.expect(resp.data.direction).to.be.a(\"string\");","});","","pm.test(\"Successful POST request\", () => {","  pm.expect(pm.response.code).to.be.oneOf([200,201]);","});","","pm.test(\"Content-Type header is present\", () => {","  pm.response.to.have.header(\"Content-Type\");","});","","pm.test(\"Content-Type header is application/json\", () => {","  pm.expect(pm.response.headers.get('Content-Type')).to.eql('application/json; charset=UTF-8');","});","","pm.test(\"Cookie PHPSESSID is present\", () => {","  pm.expect(pm.cookies.has('PHPSESSID')).to.be.true;","});","","pm.test(\"Response time is less than 200ms\", () => {","  pm.expect(pm.response.responseTime).to.be.below(200);","});",""],"type":"text/javascript"}}],"id":"1ba1288a-8394-47f7-a6ed-c0205553a7c7","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"noauth","isInherited":false},"method":"GET","header":[],"url":"http://localhost:8080/api/v1/rover/state/","urlObject":{"path":["state",""],"host":["http://localhost:8080/api/v1/rover"],"query":[],"variable":[]}},"response":[],"_postman_id":"1ba1288a-8394-47f7-a6ed-c0205553a7c7"}],"event":[{"listen":"prerequest","script":{"id":"74b9a8da-113d-4dfa-b8b1-b863afaae647","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"ec960eaf-7b4c-4266-b050-8c87bac594c3","type":"text/javascript","exec":[""]}}],"variable":[{"key":"url","value":"http://localhost:8080/api/v1/"},{"key":"plateau_id","value":"1"},{"key":"rover_id","value":""}]}