Updated API (markdown)

Matt McClaskey 2024-09-23 06:37:21 -04:00
parent 15e7f2f56b
commit 79a7f311e4

14
API.md

@ -1,6 +1,18 @@
KasmVNC has an API to make changes or get data via simple HTTPS API calls.
All API calls require owner credentials.
All API calls require owner credentials. The following command will create a user with the owner permission.
```bash
vncpasswd -u my_username -w -r -o
```
Here is an example of how to use curl to send an API call.
```bash
curl -u 'my_username:mypassword' https://localhost:6901/api/get_bottleneck_stats -k
```
This uses the curl `-u` option, however, you can also send the credentials in the `Authorization` header. See specifications on HTTP Basic Authorization for more details.
### Bottleneck stats
Returns CPU and Network bottleneck statistics. These metrics attempt to identify where performance issues may be occurring. The network and CPU stats each have two numbers. The first number is the current snapshot in time value and the second is averaged over time. Values range from 0 to 10 with 10 representing no constraints. When the frame rate drops, the bottleneck stats should help identify if the bottleneck is server side CPU or the network. The following is an example of what is returned