<div dir="ltr"><div><div><div><div><div><div><div><div><div>Dear devs,<br><br></div>In the last days I've started thinking to a <a href="https://en.wikipedia.org/wiki/Representational_state_transfer">REST API</a> for GRASS.<br></div>I think would be nice to offer some of the GRASS functionalities through a web service.<br><br></div>I would like to detailed the whole REST API using the <a href="http://www.yaml.org/">YAML</a> format following the <a href="http://swagger.io">Swagger</a> specifications/services, but before start the real work I would like to receive feedback on the idea...<br><br></div>- first of all: is build a REST API for GRASS a stupid idea? should we use/promote just the WPS?<br></div>- I've started a first conceptual draft of a possible API available at this repository: <br><a href="https://github.com/HotMaps/GRASS-rest/blob/master/swagger/grass_gis_concept.yaml">https://github.com/HotMaps/GRASS-rest/blob/master/swagger/grass_gis_concept.yaml</a>, the file is just a sketch of what the API could looks like/do (and is not yet compliant/usable with Swagger).<br><br></div><div>I've tried to synthesize the concept in <a href="https://github.com/HotMaps/GRASS-rest/blob/master/README.md">README</a> let me know if you have comments and ideas, please feel free to open new issues or pull requests.<br></div><div><br></div><div>I see a major issue that is that: GRASS is using unix permissions to define the rules on who can access on what. <br></div>To preserve this part, the REST service must be executed as super-user in order to be able to execute a module as the owner of a specific mapset and all the user of the platform must be also user of the system. <br>The other option that I see is to execute the service as a normal user of the system who is the owner of all the gisbase, locations and mapsets, and the permission are checked before the execution of each module. The permission check must be implemented in a new layer on top of GRASS. With this solution the user of the platform are different from the user and group of the system.<br><br></div>Any ideas that you want to share?<br><br></div>Best regards<br><br></div>Pietro<br></div>