Chapter 1. API

Table of Contents

1.1. Installation and execution
1.2. HTTP request structure
1.3. Project management
1.3.1. Opening a Project
1.3.2. Creating a workbench
1.3.3. Loading an example
1.3.4. Saving a project
1.4. Project interaction
1.4.1. RGG/ XL
1.4.2. Graph view
1.4.3. File management
1.4.4. Import/Export
1.4.5. Data handling
1.5. Client libraries
1.5.1. GroPy
1.5.2. GroR
1.6. More documentation
1.7. Tutorials
1.8. Examples

GroIMP can be started as an HTTP API that provides a generalized set of commands allowing interaction from other software. Currently a Python and a R library are provided but any software capable of HTTP requests could interact with GroIMP. This approach can be used to automatically start a simulation and interact with it during the execution.

1.1. Installation and execution

Starting with GroIMP 2.1 the API application is included and can be started with the following command:

java -Xverify:none -jar core.jar --headless -a api

This starts a local web server, the default port is 58081, this can be changed either in the preferences panel in the GUI or by adding -Xport=58080 to the command above. A more in-depth explanation of GroIMP arguments can be found here.

Now the API can be reached at http://localhost:58081/api. This will return an error message since no command was given.