{"swagger":"2.0","info":{"version":"1.1.0","title":"AB Quotation API","contact":{"email":"stefan.ma@cn.bosch.com"},"license":{"name":"Apache 2.0","url":"http://www.apache.org/licenses/LICENSE-2.0.html"}},"tags":[{"name":"RES"},{"name":"mock"}],"paths":{"/res":{"get":{"tags":["RES"],"summary":"gets existing project quotation estimation","operationId":"GetEstimation","description":"By passing in the project id, get project quotation estimation\n","produces":["application/json"],"parameters":[{"in":"query","name":"id","description":"project res guid, for example 11cd9488-b49e-4de4-96f8-d3faa2d810c6","required":true,"type":"string"}],"responses":{"200":{"description":"project quotation estimation returned","schema":{"type":"object","properties":{"id":{"type":"string","format":"guid","example":"11cd9488-b49e-4de4-96f8-d3faa2d810c6"},"rateId":{"type":"string","format":"guid","example":"6e7f94df-9669-49f3-b6ed-85d3685090f2"},"startYear":{"type":"integer","example":2021},"duration":{"type":"integer","example":3},"roleEstimations":{"type":"array","items":{"$ref":"#/definitions/RoleEstimation"},"example":[{"roleId":"d024ea5e-edae-4f7e-8f62-feff678dd1ef","years":[{"hour":38,"cost":1505.94,"tasks":["Offer drawing input and check","Offer drawing creation and review","Label drawing creation and review"]}],"premise":"some comment"},{"roleId":"3b885878-9837-48a0-8685-5189bdb3528d","years":[{"hour":5,"cost":198.15,"tasks":["Requirement check"]}],"premise":"some comment"},{"roleId":"abbec3b7-033a-4b3f-94bc-9b63fb1e8250","years":[{"hour":21,"cost":832.23,"tasks":["Mounting assessment","Customer communication"]}],"premise":"some comment"}]}}}},"404":{"description":"project res not found"}}},"post":{"tags":["RES"],"summary":"posts edited project quotation estimation","operationId":"PostEstimation","description":"Post edited project quotation estimation\n","consumes":["application/json"],"parameters":[{"in":"body","name":"res","description":"edited estimation","schema":{"type":"object","required":["id","rateId","startYear","duration","roleEstimations"],"properties":{"id":{"type":"string","format":"guid"},"rateId":{"type":"string","format":"guid"},"startYear":{"type":"integer","example":2022},"duration":{"type":"integer","example":2},"roleEstimation":{"type":"array","items":{"$ref":"#/definitions/RoleEstimation"}}}}}],"responses":{"201":{"description":"Created"}}}},"/roles":{"get":{"tags":["RES"],"summary":"gets all roles","operationId":"GetRoles","description":"By passing in the id, get role with name and hourly rate\n","produces":["application/json"],"responses":{"200":{"description":"roles returned","schema":{"type":"array","items":{"$ref":"#/definitions/Role"},"example":[{"id":"d024ea5e-edae-4f7e-8f62-feff678dd1ef","name":"AE/ECU-CN AE/EAB-CN [MEENG],1024356","region":"CN","department":"AE/ECU","hourlyRateName":"EuroECU"},{"id":"3b885878-9837-48a0-8685-5189bdb3528d","name":"AE/ECU-CN AE/EAB-CN [PRJMG],1024355","region":"CN","department":"AE/ECU","hourlyRateName":"EuroECU"},{"id":"abbec3b7-033a-4b3f-94bc-9b63fb1e8250","name":"AE/ECU-CN AE/EAB-CN [REENG],1024357","region":"CN","department":"AE/ECU","hourlyRateName":"EuroECU"},{"id":"26bb4f98-003f-4e26-a1db-2b9331bb5ac8","name":"AE/ECU-CN AE/ECU-PDM-CN [CROSS],1023692","region":"CN","department":"AE/ECU","hourlyRateName":"EuroECU"}]}},"404":{"description":"Roles not found"}}}},"/task-hour":{"get":{"tags":["RES"],"summary":"gets task hour","operationId":"GetTaskHour","description":"By passing in the id, get task and hour\n","produces":["application/json"],"parameters":[{"in":"query","name":"id","description":"guid, for example ceff6aab-359c-4e98-9de6-f514aaf4ae7b","required":true,"type":"string"}],"responses":{"200":{"description":"task hours returned","schema":{"type":"object","properties":{"id":{"type":"string","format":"guid","example":"ceff6aab-359c-4e98-9de6-f514aaf4ae7b"},"name":{"type":"string","example":"Working Hour - 2021 10% Improvement"},"tasks":{"type":"array","items":{"$ref":"#/definitions/TaskHour"},"example":[{"name":"Sample BOM input and check","hour":0.5},{"name":"Sample BOM creation","hour":4},{"name":"Series BOM input and check","hour":1},{"name":"Serires BOM creation","hour":4},{"name":"Offer drawing input and check","hour":0},{"name":"Offer drawing creation and review","hour":23},{"name":"Label drawing input and check","hour":0},{"name":"Label drawing creation and review","hour":15},{"name":"MDS input and check","hour":0.5},{"name":"MDS create and release","hour":6},{"name":"Requirement check","hour":3},{"name":"Mounting assessment","hour":14},{"name":"Customer communication","hour":7.5}]}}}}}}}},"definitions":{"RoleEstimation":{"type":"object","required":["roleId"],"properties":{"roleId":{"type":"string","format":"guid","example":"d024ea5e-edae-4f7e-8f62-feff678dd1ef"},"years":{"type":"array","items":{"type":"object","properties":{"hour":{"type":"number","example":38},"cost":{"type":"number","example":1505.94},"tasks":{"type":"array","items":{"type":"string"},"example":["Offer drawing input and check","Offer drawing creation and review"]}}}},"premise":{"type":"string","example":"something to note"}}},"Role":{"type":"object","required":["id","name","hourlyRateName"],"properties":{"id":{"type":"string","format":"guid","example":"d024ea5e-edae-4f7e-8f62-feff678dd1ef"},"name":{"type":"string","example":"AE/ECU-CN AE/EAB-CN [MEENG],1024356"},"region":{"type":"string","example":"CN"},"department":{"type":"string","example":"AE/ECU-CN"},"hourlyRateName":{"type":"string","example":"EuroECU"}}},"TaskHour":{"type":"object","required":["name","hour"],"properties":{"name":{"type":"string","example":"Sample BOM input and check"},"hour":{"type":"number","example":0.5}}}},"schemes":["https","http"],"host":"virtserver.swaggerhub.com","basePath":"/stefan.ma/ab-quotation/1.1.0"}