docs
Some checks failed
Code checks / check-url-paths (push) Has been cancelled
docker / docker_dev (push) Has been cancelled
Deploy MkDocs / deploy (push) Has been cancelled

Signed-off-by: jokob-sk <jokob.sk@gmail.com>
This commit is contained in:
jokob-sk
2025-08-31 10:23:31 +10:00
parent fd3f1fc929
commit 6f606f34d1
6 changed files with 207 additions and 22 deletions

View File

@@ -28,6 +28,24 @@ Track and manage device connection sessions. Sessions record when a device conne
}
```
#### `curl` Example
```bash
curl -X POST "http://<server_ip>:<GRAPHQL_PORT>/sessions/create" \
-H "Authorization: Bearer <API_TOKEN>" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{
"mac": "AA:BB:CC:DD:EE:FF",
"ip": "192.168.1.10",
"start_time": "2025-08-01T10:00:00",
"end_time": "2025-08-01T12:00:00",
"event_type_conn": "Connected",
"event_type_disc": "Disconnected"
}'
```
---
### Delete Sessions
@@ -51,6 +69,18 @@ Track and manage device connection sessions. Sessions record when a device conne
}
```
#### `curl` Example
```bash
curl -X DELETE "http://<server_ip>:<GRAPHQL_PORT>/sessions/delete" \
-H "Authorization: Bearer <API_TOKEN>" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{
"mac": "AA:BB:CC:DD:EE:FF"
}'
```
---
### List Sessions
@@ -86,7 +116,13 @@ Track and manage device connection sessions. Sessions record when a device conne
]
}
```
#### `curl` Example
```bash
curl -X GET "http://<server_ip>:<GRAPHQL_PORT>/sessions/list?mac=AA:BB:CC:DD:EE:FF&start_date=2025-08-01&end_date=2025-08-21" \
-H "Authorization: Bearer <API_TOKEN>" \
-H "Accept: application/json"
```
---
### Calendar View of Sessions
@@ -123,6 +159,14 @@ Track and manage device connection sessions. Sessions record when a device conne
}
```
#### `curl` Example
```bash
curl -X GET "http://<server_ip>:<GRAPHQL_PORT>/sessions/calendar?start=2025-08-01&end=2025-08-21" \
-H "Authorization: Bearer <API_TOKEN>" \
-H "Accept: application/json"
```
---
### Device Sessions
@@ -158,6 +202,14 @@ Track and manage device connection sessions. Sessions record when a device conne
}
```
#### `curl` Example
```bash
curl -X GET "http://<server_ip>:<GRAPHQL_PORT>/sessions/AA:BB:CC:DD:EE:FF?period=7%20days" \
-H "Authorization: Bearer <API_TOKEN>" \
-H "Accept: application/json"
```
---
### Session Events Summary
@@ -179,3 +231,10 @@ Track and manage device connection sessions. Sessions record when a device conne
**Response:**
Returns a list of events or sessions with formatted connection, disconnection, duration, and IP information.
#### `curl` Example
```bash
curl -X GET "http://<server_ip>:<GRAPHQL_PORT>/sessions/session-events?type=all&period=7%20days" \
-H "Authorization: Bearer <API_TOKEN>" \
-H "Accept: application/json"
```