Skip to content
This repository was archived by the owner on Dec 1, 2024. It is now read-only.

Commit 4a59eb5

Browse files
committed
Update examples
1 parent 94d57ee commit 4a59eb5

1 file changed

Lines changed: 33 additions & 5 deletions

File tree

README.md

Lines changed: 33 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ REST API and Web server on base **.NET HttpListener** and backend only **PowerSh
2727
🐧 Since the server is built on .NET, this implementation is **cross-platform**, you can try managing Linux services from a Windows system: **[dotNET-Systemd-API](https://github.com/Lifailon/dotNET-Systemd-API)**.
2828

2929
➡️ [🚀 Install](#-install)
30+
➡️ [📊 Examples](#-output-data-examples)
3031

3132
## 🎉 Web server
3233

@@ -429,7 +430,7 @@ curl -s -X GET -u $user:$pass -H 'Content-Type: application/html' http://192.168
429430
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>HTML TABLE</title> </head><body> <table> <colgroup><col/><col/><col/><col/></colgroup> <tr><th>Name</th><th>DisplayName</th><th>Status</th><th>StartType</th></tr> <tr><td>WinRM</td><td>Служба удаленного управления Windows (WS-Management)</td><td>Stopped</td><td>Manual</td></tr> </table> </body></html>
430431
```
431432

432-
## 📊 GET data (output examples)
433+
## 📊 Output data examples
433434

434435
### Service and process management
435436

@@ -491,14 +492,41 @@ lifailon@hv-devops-01:~$ pass="api"
491492
}
492493
```
493494

494-
```Bash
495-
lifailon@hv-devops-01:~$ curl -s -X POST -u $user:$pass --data '' http://192.168.3.99:8443/api/process/qbittorrent -H "Status: Check"
495+
`curl -s -X POST -u $user:$pass --data '' http://192.168.3.99:8443/api/process/qbittorrent -H "Status: Check"`
496+
497+
```
496498
Number active qbittorrent processes: 0
499+
```
497500

498-
lifailon@hv-devops-01:~$ curl -s -X POST -u $user:$pass --data '' http://192.168.3.99:8443/api/process/qbittorrent -H "Status: Start"
501+
`curl -s -X POST -u $user:$pass --data '' http://192.168.3.99:8443/api/process/qbittorrent -H "Status: Start"`
502+
503+
```
499504
Number active qbittorrent processes: 1
505+
```
506+
507+
`curl -s -u $user:$pass http://192.168.3.99:8443/api/process/qbittorrent`
500508

501-
lifailon@hv-devops-01:~$ curl -s -X POST -u $user:$pass --data '' http://192.168.3.99:8443/api/process/qbittorrent -H "Status: Stop"
509+
```JSON
510+
{
511+
"ProcessName": "qbittorrent",
512+
"TotalProcTime": "00:01:35",
513+
"UserProcTime": "00:00:51",
514+
"PrivilegedProcTime": "00:00:43",
515+
"WorkingSet": "55 MB",
516+
"PeakWorkingSet": "573 MB",
517+
"PageMemory": "552 MB",
518+
"VirtualMemory": "2102047 MB",
519+
"PrivateMemory": "552 MB",
520+
"RunTime": "01:27:00",
521+
"Threads": 16,
522+
"Handles": 578,
523+
"Path": "C:\\Program Files\\qBittorrent\\qbittorrent.exe"
524+
}
525+
```
526+
527+
`curl -s -X POST -u $user:$pass --data '' http://192.168.3.99:8443/api/process/qbittorrent -H "Status: Stop"`
528+
529+
```
502530
Number active qbittorrent processes: 0
503531
```
504532

0 commit comments

Comments
 (0)