User Tools

Site Tools


user-guide:additional_interfaces:api

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
user-guide:additional_interfaces:api [2025/01/22 12:41] – [GroR] Timuser-guide:additional_interfaces:api [2025/02/07 17:12] (current) – [Examples] Tim
Line 1: Line 1:
-====== API GroIMP user guide ======+====== API ======
  
-With the use of the GroLink Project GroIMP can be started as an API server, that can handle Http-requests.+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.
  
 +
 +<uml>
 +@startuml
 +!pragma teoz true
 +hide footbox
 +title API
 +
 +participant User
 +participant ClientScript
 +participant API
 +participant GroIMP
 +
 +
 +User -> GroIMP: Start GroIMP
 +User -> ClientScript
 +ClientScript <->API
 +& API<-> GroIMP
 +User <- ClientScript
 +User -> GroIMP: Stop GroIMP
 +
 +
 +@enduml
 +</uml>
 ===== Installation and execution ===== ===== Installation and execution =====
  
Line 161: Line 184:
  
 Alternatively, it is possible to install the package with the R Studio package manager by selecting “install from package archive file”. Alternatively, it is possible to install the package with the R Studio package manager by selecting “install from package archive file”.
-===== Tutorials and examples =====+ 
 +=== Structure ==
 + 
 +The library comes with two sets for functions, one set with the prefix "GroLink." and one with the prefix "WBRef.". The GroLink.* functions take the address of the API server as first input and provided a implementation for most [[#project_management | Project Management]] requests. Most of them return wb objects which are the first needed parameter for the WBRef.* functions. These functions implement the requests for [[#project_interaction | Project interaction]]. A list of all avialable commands can be found in the [[https://gitlab.com/grogra/groimp-utils/rapilibrary/-/blob/main/README.md|readme]] of the repository. 
 +  
 + 
 +===== More documentation ===== 
 + 
 +  * [[https://wkurth.grogra.de/oberlaender_msc.pdf| GroLink: implementing and testing a general application programming interface for the plant-modelling platform GroIMP (original Thesis)]] 
 +  * [[:groimp-platform:interfaces:api|API implementation]]
  
 ===== Tutorials ===== ===== Tutorials =====
  
 +
 +  * [[:Tutorials:Startup-API |Start the API]]
   * [[:Tutorials:Getting-started-with-GroLink-and-GroPy|getting started with GroLink and Python(GroPy)]]   * [[:Tutorials:Getting-started-with-GroLink-and-GroPy|getting started with GroLink and Python(GroPy)]]
   * [[:Tutorials:Getting-started-with-GroLink-and-GroR|getting started with GroLink and R(GroR)]]   * [[:Tutorials:Getting-started-with-GroLink-and-GroR|getting started with GroLink and R(GroR)]]
   * [[:Tutorials:Getting-started-with-GroLink-and-HTTP|getting started with GroLink and HTTP in your web browser]]   * [[:Tutorials:Getting-started-with-GroLink-and-HTTP|getting started with GroLink and HTTP in your web browser]]
   * [[:Tutorials:Handeling-data-in-GroLink-Projects|Handling data in GroLink projects]]   * [[:Tutorials:Handeling-data-in-GroLink-Projects|Handling data in GroLink projects]]
 +  * [[:Tutorials:grolink-on-kubernetes|Deploying GroIMP/GroLink on Kubernetes]] 
 +  * [[:dev-guide:create-new-api-function|How to create new API commands]]
  
 ===== Examples ===== ===== Examples =====
-  * [[https://gitlab.com/groimp-api-examples/pythonnotebook|Python Notebook]] + 
-  * [[https://gitlab.com/groimp-api-examples/forester-game|Godot Game]] +We provide examples in Python, R and Godot to get a first impression: https://gitlab.com/groimp-api-examples. 
-  * [[https://gitlab.com/groimp-api-examples/apiplus|example Addition]]+Additionally you can find there a ready to use docker container to ease the first tests.
user-guide/additional_interfaces/api.1737546109.txt.gz · Last modified: 2025/01/22 12:41 by Tim