{"action":"opened","issue":{"url":"https://api.github.com/repos/Kappa-Dev/KaSim/issues/161","repository_url":"https://api.github.com/repos/Kappa-Dev/KaSim","labels_url":"https://api.github.com/repos/Kappa-Dev/KaSim/issues/161/labels{/name}","comments_url":"https://api.github.com/repos/Kappa-Dev/KaSim/issues/161/comments","events_url":"https://api.github.com/repos/Kappa-Dev/KaSim/issues/161/events","html_url":"https://github.com/Kappa-Dev/KaSim/issues/161","id":138720579,"number":161,"title":"WebSim REST API improvements","user":{"login":"antonkulaga","id":842436,"avatar_url":"https://avatars.githubusercontent.com/u/842436?v=3","gravatar_id":"","url":"https://api.github.com/users/antonkulaga","html_url":"https://github.com/antonkulaga","followers_url":"https://api.github.com/users/antonkulaga/followers","following_url":"https://api.github.com/users/antonkulaga/following{/other_user}","gists_url":"https://api.github.com/users/antonkulaga/gists{/gist_id}","starred_url":"https://api.github.com/users/antonkulaga/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/antonkulaga/subscriptions","organizations_url":"https://api.github.com/users/antonkulaga/orgs","repos_url":"https://api.github.com/users/antonkulaga/repos","events_url":"https://api.github.com/users/antonkulaga/events{/privacy}","received_events_url":"https://api.github.com/users/antonkulaga/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/Kappa-Dev/KaSim/labels/improvement","name":"improvement","color":"1632e3"},{"url":"https://api.github.com/repos/Kappa-Dev/KaSim/labels/KaSim","name":"KaSim","color":"005500"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-03-05T20:56:44Z","updated_at":"2016-03-05T20:56:44Z","closed_at":null,"body":"I will collect some suggestions about improving and API here.\r\n\r\n1) I think that choice of 8080 is not optimal as it is very common port that is used by many webapplications so users may have a port conflict with something else.\r\n\r\n2) /v1/process is a bit misleading.\r\non GET it returns something like [\"Right\",[]]  (looks like a leakage of Either pattern matching into API) while on POST it runs the model.\r\nI suggest to have \r\n```\r\nPOST /v1/run\r\nGET /v1/running\r\n```\r\ninstead.\r\n\r\n3) swagger.json has some small errors, check editor.swagger like : \r\n``` \r\n✖ YAML Syntax Error\r\nMissed comma between flow collection entries at line 60, column 22: }r ^ \r\n```\r\nand \r\n```\r\nReference could not be resolved: #Plot\r\n```\r\nAs people like me often use swagger editor for exploring API it would be nice to fix it.\r\n\r\n4) Is GET /parse actually working? I am exploring it with swagger ui and when I send corrupted abc.ka it returns an array with an empty string instead of an error message (same that it does for a right model). Maybe I use it in a wrong way by giving it the whole model?\r\n\r\n5) You have petstore.swagger.wordnik.com in swagger json, I think something like localhost:8080/v1 or some address of online websim will be better\r\n\r\n6) For POST proccess I should get an array of tokens but I get token of Int. If you want to give an array it should be [token] I also do not thin that using int-s for tokens is a good idea, what about GUID ?\r\n\r\n7) Not sure that POST process is a good name of starting a simulation. Something like /run or /start or /launch will be more natural\r\n\r\n...I will add other points soon here\r\n\r\nP.S. Should we make a separate label for WebSim ?"}}