Skip to content

Commit

Permalink
docs(readme): update endpoints
Browse files Browse the repository at this point in the history
  • Loading branch information
Curve committed Dec 4, 2023
1 parent b93b0f4 commit a70214b
Showing 1 changed file with 25 additions and 7 deletions.
32 changes: 25 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,31 @@ The Rest-Server exposes three simple endpoints
> List all available applications to share.
> You can optionally define a JSON-Body containing all the props the listed nodes should have (i.e. `["node.name"]`).
* (POST) `/link`
> Expects a JSON-Body containing the target application, i.e. `{"key": "node.name", "value": "Firefox", "mode": "include"}`
> Valid values for `mode` are:
> * `include`
> The specified application will be shared
> * `exclude`
> All _but_ the specified application will be shared
* (POST) `/link`
<blockquote>
Expects a JSON-Body in the following form:
<pre lang="json">
{
"include":
[
{ "key": "node.name", "value": "Firefox" }
],
"exclude":
[
{ "key": "node.name", "value": "Chrome" }
]
}
</pre>

Depending on wether or not `include` or `exclude` are defined the behavior will change:

* only `include`
* Links nodes that match given props
* only `exclude`
* Links nodes that do not match given props
* both `include` and `exclude`
* Links all applications that match props in `include` and not those given in `exclude`
</blockquote>

* (GET) `/unlink`
> Unlinks the currently linked application
Expand Down

0 comments on commit a70214b

Please sign in to comment.