{"info":{"_postman_id":"e5701ae2-ba83-4646-aaac-997216df4e29","name":"simple-image-classifier","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[],"description":"<html><head></head><body></body></html>","owner":"3045659","collectionId":"e5701ae2-ba83-4646-aaac-997216df4e29","publishedId":"RWMHM7ir","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"EF5B25"},"publishDate":"2018-07-23T15:39:54.000Z"},"item":[{"name":"Creates a dataset","event":[{"listen":"prerequest","script":{"id":"38887893-b35b-4bac-a1c2-af21e67cfa97","type":"text/javascript","exec":["var guid = (function() {","  function s4() {","    return Math.floor((1 + Math.random()) * 0x10000)","               .toString(16)","               .substring(1);","  }","  return function() {","    return s4() + s4() + '-' + s4() + s4() + s4();","  };","})();","","postman.setEnvironmentVariable(\"datasetName\", guid());",""]}},{"listen":"test","script":{"id":"7a2828d2-99e3-468f-838c-df9ab62f8b67","type":"text/javascript","exec":["pm.test(\"Status code is 201\", function () {","    pm.response.to.have.status(201);","});","","var jsonData = pm.response.json();","var datasetName = pm.environment.get(\"datasetName\");","pm.test(\"Status is success\", function () {","    pm.expect(jsonData).to.have.property('status');","    pm.expect(jsonData.status).to.eql(\"created\");","});","","pm.test(\"Check if data is returned\", function () {","    pm.expect(jsonData).to.have.property('data');","    pm.expect(jsonData.data).to.have.property('name');","});","pm.test(\"Check if dataset name is returned\", function () {","    pm.expect(jsonData.data.name).to.eql(datasetName);","});",""]}}],"id":"55cb18d3-b94f-4915-ab34-1114d22708e1","request":{"method":"PUT","header":[],"body":{"mode":"raw","raw":"{\n  \"name\": \"{{datasetName}}\"\n}"},"url":"http://localhost:8080/datasets","urlObject":{"protocol":"http","port":"8080","path":["datasets"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"55cb18d3-b94f-4915-ab34-1114d22708e1"},{"name":"Upload multiple images URL to dataset","event":[{"listen":"prerequest","script":{"id":"c3eddd85-9708-446d-9e9a-340c1cb4e8d0","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"70aa3b8b-4ad5-4d07-80aa-7ea7bae9e562","type":"text/javascript","exec":["pm.test(\"Status code is 201\", function () {","    pm.response.to.have.status(201);","});","","var jsonData = pm.response.json();","","pm.test(\"Status is success\", function () {","    pm.expect(jsonData).to.have.property('status');","    pm.expect(jsonData.status).to.eql(\"created\");","});","","pm.test(\"Check if data is returned\", function () {","    pm.expect(jsonData).to.have.property('data');","    pm.expect(jsonData.data).to.have.property('new_files');","});","","","tests[\"Check if new_files length is > 1\"] = jsonData.data.new_files.length >= 1;"]}}],"id":"7d9e0fee-97f6-4130-93cf-af5bfc1016ea","request":{"method":"PUT","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"urls\": [\n\t  \"https://www.wanimo.com/veterinaire/images/articles/chien/chiot-prenom.jpg\",\n\t  \"https://i.pinimg.com/736x/bb/16/5c/bb165c8fcecf107962691450d7505dd3--world-cutest-dog-cutest-dogs.jpg\"\n  ]\n}"},"url":"http://localhost:8080/datasets/{{datasetName}}/dog","urlObject":{"protocol":"http","port":"8080","path":["datasets","{{datasetName}}","dog"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"7d9e0fee-97f6-4130-93cf-af5bfc1016ea"},{"name":"Get all datasets","id":"d9d52849-bd42-4b62-bf69-211d70720e81","request":{"method":"GET","header":[],"body":{"mode":"raw","raw":"{\n  \"name\": \"TEST4\"\n}"},"url":"http://localhost:8080/datasets","urlObject":{"protocol":"http","port":"8080","path":["datasets"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"d9d52849-bd42-4b62-bf69-211d70720e81"},{"name":"Get one dataset","id":"91efa569-8029-46aa-be84-b5314328a271","request":{"method":"GET","header":[],"body":{"mode":"raw","raw":"{\n  \"name\": \"TEST4\"\n}"},"url":"http://localhost:8080/datasets/{{datasetName}}","urlObject":{"protocol":"http","port":"8080","path":["datasets","{{datasetName}}"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"91efa569-8029-46aa-be84-b5314328a271"},{"name":"Launch dataset training task","event":[{"listen":"prerequest","script":{"id":"c3eddd85-9708-446d-9e9a-340c1cb4e8d0","type":"text/javascript","exec":[""]}}],"id":"2e3c0ae6-ef88-46c7-91cc-c61d38285abc","request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n\t\"training_steps\": 50\n}"},"url":"http://localhost:8080/datasets/{{datasetName}}/train","urlObject":{"protocol":"http","port":"8080","path":["datasets","{{datasetName}}","train"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"2e3c0ae6-ef88-46c7-91cc-c61d38285abc"},{"name":"Classify a picture","event":[{"listen":"prerequest","script":{"id":"c3eddd85-9708-446d-9e9a-340c1cb4e8d0","type":"text/javascript","exec":[""]}}],"id":"3f749101-2226-42d2-bdf6-056f59483ea3","request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n  \"url\": \"https://imgc.allpostersimages.com/img/print/affiches/walt-disney-mickey-mouse-classic_a-G-9067566-0.jpg\"\n}"},"url":"http://localhost:8080/datasets/{{datasetName}}/label","urlObject":{"protocol":"http","port":"8080","path":["datasets","{{datasetName}}","label"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"3f749101-2226-42d2-bdf6-056f59483ea3"},{"name":"Delete one dataset","id":"a4745634-c140-4fa1-bf3d-c4d62f3392ab","request":{"method":"DELETE","header":[],"body":{"mode":"raw","raw":""},"url":"http://localhost:8080/datasets/{{datasetName}}","urlObject":{"protocol":"http","port":"8080","path":["datasets","{{datasetName}}"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"a4745634-c140-4fa1-bf3d-c4d62f3392ab"},{"name":"Get version","id":"b1ccb260-d1af-4bf1-b6e3-5272fc3fc84c","request":{"method":"DELETE","header":[],"body":{"mode":"raw","raw":""},"url":"http://localhost:8080/datasets/{{datasetName}}","urlObject":{"protocol":"http","port":"8080","path":["datasets","{{datasetName}}"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"b1ccb260-d1af-4bf1-b6e3-5272fc3fc84c"}]}