@@ -57,82 +57,68 @@ This ensures all containers, networks, and volumes created by docker-compose are
5757
5858Base URL: ` / `
5959
60- ## Auth Routes (` /auth ` )
60+ ### Auth Routes (` /auth ` )
6161
62- | Method | Endpoint | Description |
63- | --------| -----------------| ----------------------------|
64- | POST | /auth/register | Register a new user |
65- | POST | /auth/login | Login and get JWT token |
62+ POST /auth/register → Register a new user
63+ POST /auth/login → Login and get JWT token
6664
6765
68- ## Users Routes (` /users ` ) 🔒 Protected (JWT required, except registration)
66+ ### Users Routes (` /users ` ) 🔒 Protected (JWT required, except registration)
6967
70- | Method | Endpoint | Description |
71- | --------| -----------------| ----------------------------|
72- | POST | /users/register | Register a new user |
73- | GET | /users/me | Get current logged-in user |
74- | GET | /users/ | List all users |
75- | GET | /users/{id} | Get user by ID |
76- | DELETE | /users/{id} | Delete a user |
68+ POST /users/register → Register a new user
69+ GET /users/me → Get current logged-in user
70+ GET /users/ → List all users
71+ GET /users/{id} → Get user by ID
72+ DELETE /users/{id} → Delete a user
7773
7874
75+ ### Device Routes (` /devices ` ) 🔒 Protected (JWT required)
7976
80- ## Device Routes (` /devices ` ) 🔒 Protected (JWT required)
77+ GET /devices/ → List all devices
78+ POST /devices/ → Add a new device
79+ GET /devices/{id} → Get device details by ID
80+ PUT /devices/{id} → Update device
81+ DELETE /devices/{id} → Delete device
8182
82- | Method | Endpoint | Description |
83- | --------| ---------------------| --------------------------|
84- | GET | /devices/ | List all devices |
85- | POST | /devices/ | Add a new device |
86- | GET | /devices/{id} | Get device details by ID |
87- | PUT | /devices/{id} | Update device |
88- | DELETE | /devices/{id} | Delete device |
8983
84+ ### Analytics Routes (` /analytics ` ) 🔒 Protected (JWT required)
9085
91- ## Analytics Routes (` /analytics ` ) 🔒 Protected (JWT required)
92-
93- | Method | Endpoint | Description |
94- | --------| -----------------------------| -------------------------------------|
95- | GET | /analytics/summary | Get daily & monthly analytics |
96- | GET | /analytics/source/{id} | Get analytics by source |
97- | GET | /analytics/device/{id} | Get analytics by device |
98- | GET | /analytics/comparison | Compare multiple sources analytics |
86+ GET /analytics/summary → Get daily & monthly analytics
87+ GET /analytics/source/{id} → Get analytics by source
88+ GET /analytics/device/{id} → Get analytics by device
89+ GET /analytics/comparison → Compare multiple sources analytics
9990
10091
10192## Reading Routes (` /readings ` ) 🔒 Protected (JWT required)
10293
103- | Method | Endpoint | Description |
104- | --------| -----------------------------| ------------------------------------|
105- | POST | /readings/ | Create a new reading |
106- | GET | /readings/ | List readings (with pagination) |
107- | GET | /readings/{id} | Get reading by ID |
108- | GET | /readings/source/{source} | Get readings by source |
109- | GET | /readings/device/{device_id}| Get readings by device |
110- | GET | /readings/date | Get readings by date range |
94+ POST /readings/ → Create a new reading
95+ GET /readings/ → List readings (with pagination)
96+ GET /readings/{id} → Get reading by ID
97+ GET /readings/source/{source} → Get readings by source
98+ GET /readings/device/{device_id} → Get readings by device
99+ GET /readings/date → Get readings by date range
100+
111101
102+ ### Reports & Alerts Routes 🔒 Protected (JWT required)
112103
113- ## Reports & Alerts Routes 🔒 Protected (JWT required)
104+ #### Reports
114105
115- ### Reports
116- | Method | Endpoint | Description |
117- | --------| ------------------------| ------------------------------|
118- | GET | /reports/generation | Get total energy generation |
119- | GET | /reports/consumption | Get total energy consumption |
106+ GET /reports/generation → Get total energy generation
107+ GET /reports/consumption → Get total energy consumption
120108
121- ### Alerts
109+ #### Alerts
122110| Method | Endpoint | Description |
123111| --------| --------------| ------------------------|
124112| GET | /alerts/ | List all alerts |
125113| POST | /alerts/ | Create a new alert |
126114
127115
128- ## Energy Sources Routes (` /sources ` ) 🔒 Protected (JWT required)
116+ ### Energy Sources Routes (` /sources ` ) 🔒 Protected (JWT required)
129117
130- | Method | Endpoint | Description |
131- | --------| --------------------| ---------------------------|
132- | GET | /sources/ | List all energy sources |
133- | POST | /sources/ | Add a new energy source |
134- | GET | /sources/{id} | Get source by ID |
135- | PUT | /sources/{id} | Update source |
136- | DELETE | /sources/{id} | Delete source |
118+ GET /sources/ → List all energy sources
119+ POST /sources/ → Add a new energy source
120+ GET /sources/{id} → Get source by ID
121+ PUT /sources/{id} → Update source
122+ DELETE /sources/{id} → Delete source
137123
138124
0 commit comments