user-guide:additional_interfaces:api
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
user-guide:additional_interfaces:api [2025/01/22 12:26] – [GroPy] Tim | user-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 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 |
+ | |||
+ | <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< | ||
+ | User <- ClientScript | ||
+ | User -> GroIMP: Stop GroIMP | ||
+ | |||
+ | |||
+ | @enduml | ||
+ | </ | ||
===== Installation and execution ===== | ===== Installation and execution ===== | ||
Line 109: | Line 132: | ||
==== GroPy ==== | ==== GroPy ==== | ||
- | The [[https:// | + | The [[https:// |
+ | <code bash> | ||
+ | pip install GroPy --index-url https:// | ||
+ | </ | ||
+ | Additionally it is possible to only get the file GroPy.py from the repository and link it directly. | ||
=== Structure === | === Structure === | ||
Line 127: | Line 154: | ||
A WBRef object represents the connection to a workbench, it does not hold any information other than the id of the workbench and the link to the API server. This object provides function to create calls for the [[# | A WBRef object represents the connection to a workbench, it does not hold any information other than the id of the workbench and the link to the API server. This object provides function to create calls for the [[# | ||
- | |||
- | |||
- | === Project management === | ||
- | |||
- | === Project interaction === | ||
=== custom calls === | === custom calls === | ||
+ | |||
+ | Due to the design of the API server it is possible to send request regarding commands that where not originally part of the GroLink project. To be able to address this command from the python library the function '' | ||
+ | <code python> | ||
+ | link = GroPy.GroLink(" | ||
+ | link.createAppCall("/ | ||
+ | WBref1 = link.createWB().run().read() | ||
+ | WBref1.createWBCall("/ | ||
+ | </ | ||
==== GroR ==== | ==== GroR ==== | ||
[[https:// | [[https:// | ||
- | ===== Tutorials | + | === Installation |
+ | |||
+ | The GroR package is not added to any public repository | ||
+ | |||
+ | == Adding the R file as a Source | ||
+ | |||
+ | It is possible to download the GroR.R file from this repository and link it to your R file with this code: | ||
+ | '' | ||
+ | |||
+ | == Package == | ||
+ | |||
+ | The releases contain packages that can be installed directly with either the R command: | ||
+ | |||
+ | '' | ||
+ | |||
+ | Alternatively, | ||
+ | |||
+ | === Structure === | ||
+ | |||
+ | The library comes with two sets for functions, one set with the prefix " | ||
+ | |||
+ | |||
+ | ===== More documentation ===== | ||
+ | |||
+ | * [[https:// | ||
+ | * [[: | ||
===== Tutorials ===== | ===== Tutorials ===== | ||
+ | |||
+ | * [[: | ||
* [[: | * [[: | ||
* [[: | * [[: | ||
* [[: | * [[: | ||
* [[: | * [[: | ||
+ | * [[: | ||
+ | * [[: | ||
===== Examples ===== | ===== Examples ===== | ||
- | * [[https:// | + | |
- | * [[https:// | + | We provide |
- | * [[https:// | + | Additionally you can find there a ready to use docker container to ease the first tests. |
user-guide/additional_interfaces/api.1737545203.txt.gz · Last modified: 2025/01/22 12:26 by Tim