|
| 1 | +openapi: "3.0.3" |
| 2 | +info: |
| 3 | + title: evcc REST-API |
| 4 | + description: "TODO: Alle möglichen Responses, Enums, Datentypregeln, Authentifizierung und Responseobjekte dokumentieren" |
| 5 | + version: Latest |
| 6 | +servers: |
| 7 | + - url: https://demo.evcc.io/api |
| 8 | +tags: |
| 9 | + - name: State |
| 10 | + description: TODO |
| 11 | + - name: Site |
| 12 | + description: TODO |
| 13 | + - name: Loadpoints |
| 14 | + description: TODO |
| 15 | + - name: Vehicles |
| 16 | + description: TODO |
| 17 | +paths: |
| 18 | + /state: |
| 19 | + get: |
| 20 | + summary: Get system state |
| 21 | + description: TODO |
| 22 | + tags: |
| 23 | + - State |
| 24 | + responses: |
| 25 | + 200: |
| 26 | + description: TODO |
| 27 | + content: |
| 28 | + application/json: |
| 29 | + schema: |
| 30 | + $ref: "#/components/schemas/State" |
| 31 | + # ------------------- |
| 32 | + /health: |
| 33 | + get: |
| 34 | + summary: Health check |
| 35 | + description: TODO |
| 36 | + tags: |
| 37 | + - Site |
| 38 | + responses: |
| 39 | + 200: |
| 40 | + description: TODO |
| 41 | + content: |
| 42 | + text/plan: |
| 43 | + schema: |
| 44 | + type: string |
| 45 | + enum: [OK] |
| 46 | + /batterydischargecontrol/{enable}: |
| 47 | + post: |
| 48 | + summary: Control battery-discharge |
| 49 | + description: TODO |
| 50 | + tags: |
| 51 | + - Site |
| 52 | + parameters: |
| 53 | + - $ref: "#/components/parameters/enable" |
| 54 | + responses: |
| 55 | + 200: |
| 56 | + description: TODO |
| 57 | + content: |
| 58 | + application/json: |
| 59 | + schema: |
| 60 | + type: object |
| 61 | + properties: |
| 62 | + result: |
| 63 | + description: TODO |
| 64 | + type: boolean |
| 65 | + /batterygridchargelimit/{cost}: |
| 66 | + post: |
| 67 | + summary: Set battery grid charge limit |
| 68 | + description: TODO |
| 69 | + tags: |
| 70 | + - Site |
| 71 | + parameters: |
| 72 | + - $ref: "#/components/parameters/cost" |
| 73 | + responses: |
| 74 | + 200: |
| 75 | + $ref: "#/components/responses/NumberResult" |
| 76 | + /batterygridchargelimit: |
| 77 | + delete: |
| 78 | + summary: Remove battery grid charge limit |
| 79 | + description: TODO |
| 80 | + tags: |
| 81 | + - Site |
| 82 | + responses: |
| 83 | + 200: |
| 84 | + description: "TODO: Request does not work or does not respond?" |
| 85 | + /buffersoc/{soc}: |
| 86 | + post: |
| 87 | + summary: Set battery buffer soc |
| 88 | + description: TODO |
| 89 | + tags: |
| 90 | + - Site |
| 91 | + parameters: |
| 92 | + - $ref: "#/components/parameters/soc" |
| 93 | + responses: |
| 94 | + 200: |
| 95 | + $ref: "#/components/responses/NumberResult" |
| 96 | + /bufferstartsoc/{soc}: |
| 97 | + post: |
| 98 | + summary: Set battery buffer start soc |
| 99 | + description: TODO |
| 100 | + tags: |
| 101 | + - Site |
| 102 | + parameters: |
| 103 | + - $ref: "#/components/parameters/soc" |
| 104 | + responses: |
| 105 | + 200: |
| 106 | + $ref: "#/components/responses/NumberResult" |
| 107 | + /prioritysoc/{soc}: |
| 108 | + post: |
| 109 | + summary: Set battery priority soc |
| 110 | + description: TODO |
| 111 | + tags: |
| 112 | + - Site |
| 113 | + parameters: |
| 114 | + - $ref: "#/components/parameters/soc" |
| 115 | + responses: |
| 116 | + 200: |
| 117 | + $ref: "#/components/responses/NumberResult" |
| 118 | + /residualpower/{power}: |
| 119 | + post: |
| 120 | + summary: Set grid residual power |
| 121 | + description: TODO |
| 122 | + tags: |
| 123 | + - Site |
| 124 | + parameters: |
| 125 | + - $ref: "#/components/parameters/power" |
| 126 | + responses: |
| 127 | + 200: |
| 128 | + $ref: "#/components/responses/NumberResult" |
| 129 | + /smartcostlimit/{cost}: |
| 130 | + post: |
| 131 | + summary: Set smart charging cost limit for all loadpoints |
| 132 | + description: TODO |
| 133 | + tags: |
| 134 | + - Site |
| 135 | + parameters: |
| 136 | + - $ref: "#/components/parameters/cost" |
| 137 | + responses: |
| 138 | + 200: |
| 139 | + $ref: "#/components/responses/NumberResult" |
| 140 | + /smartcostlimit: |
| 141 | + delete: |
| 142 | + summary: Remove smart charging cost limit for all loadpoints |
| 143 | + description: TODO |
| 144 | + tags: |
| 145 | + - Site |
| 146 | + responses: |
| 147 | + 200: |
| 148 | + description: "TODO: Request does not work or does not respond?" |
| 149 | + /tariff/{type}: |
| 150 | + get: |
| 151 | + summary: Get list of tariff prices |
| 152 | + description: TODO |
| 153 | + tags: |
| 154 | + - Site |
| 155 | + parameters: |
| 156 | + - name: type |
| 157 | + in: path |
| 158 | + description: TODO |
| 159 | + required: true |
| 160 | + schema: |
| 161 | + type: string |
| 162 | + # enum ? |
| 163 | + responses: |
| 164 | + 200: |
| 165 | + description: TODO |
| 166 | + content: |
| 167 | + application/json: |
| 168 | + schema: |
| 169 | + type: object |
| 170 | + properties: |
| 171 | + result: |
| 172 | + description: TODO |
| 173 | + type: object |
| 174 | + properties: |
| 175 | + rates: |
| 176 | + description: TODO |
| 177 | + type: array |
| 178 | + items: |
| 179 | + description: TODO |
| 180 | + type: object |
| 181 | + properties: |
| 182 | + start: |
| 183 | + description: TODO |
| 184 | + type: string |
| 185 | + format: date-time |
| 186 | + end: |
| 187 | + description: TODO |
| 188 | + type: string |
| 189 | + format: date-time |
| 190 | + price: |
| 191 | + description: TODO |
| 192 | + type: number |
| 193 | + minimum: 0 |
| 194 | + /sessions: |
| 195 | + get: |
| 196 | + summary: Get charging sessions |
| 197 | + description: TODO |
| 198 | + tags: |
| 199 | + - Site |
| 200 | + parameters: |
| 201 | + - name: format |
| 202 | + in: query |
| 203 | + description: TODO |
| 204 | + required: false |
| 205 | + schema: |
| 206 | + type: string |
| 207 | + - name: lang |
| 208 | + in: query |
| 209 | + description: TODO |
| 210 | + required: false |
| 211 | + schema: |
| 212 | + type: string |
| 213 | + responses: |
| 214 | + 200: |
| 215 | + description: TODO |
| 216 | + /session/{id}: |
| 217 | + parameters: |
| 218 | + - $ref: "#/components/parameters/id" |
| 219 | + put: |
| 220 | + summary: Update session |
| 221 | + description: TODO |
| 222 | + tags: |
| 223 | + - Site |
| 224 | + responses: |
| 225 | + 200: |
| 226 | + description: TODO |
| 227 | + delete: |
| 228 | + summary: Delete session |
| 229 | + description: TODO |
| 230 | + tags: |
| 231 | + - Site |
| 232 | + responses: |
| 233 | + 200: |
| 234 | + description: TODO |
| 235 | + /settings/telemetry: |
| 236 | + get: |
| 237 | + summary: Get telemetry status |
| 238 | + description: TODO |
| 239 | + tags: |
| 240 | + - Site |
| 241 | + responses: |
| 242 | + 200: |
| 243 | + $ref: "#/components/responses/BooleanResult" |
| 244 | + /settings/telemetry/{enable}: |
| 245 | + post: |
| 246 | + summary: Enable/disable telemetry |
| 247 | + description: TODO |
| 248 | + tags: |
| 249 | + - Site |
| 250 | + parameters: |
| 251 | + - $ref: "#/components/parameters/enable" |
| 252 | + responses: |
| 253 | + 200: |
| 254 | + $ref: "#/components/responses/BooleanResult" |
| 255 | + |
| 256 | +components: |
| 257 | + schemas: |
| 258 | + State: |
| 259 | + type: object |
| 260 | + properties: |
| 261 | + result: |
| 262 | + description: TODO |
| 263 | + type: object |
| 264 | + parameters: |
| 265 | + id: |
| 266 | + name: id |
| 267 | + in: path |
| 268 | + description: The ID. Starts with 1. |
| 269 | + required: true |
| 270 | + schema: |
| 271 | + type: integer |
| 272 | + minimum: 1 |
| 273 | + enable: |
| 274 | + name: enable |
| 275 | + in: path |
| 276 | + description: TODO |
| 277 | + required: true |
| 278 | + schema: |
| 279 | + type: boolean |
| 280 | + enum: |
| 281 | + [1, 0, t, f, T, F, "true", "false", "TRUE", "FALSE", "True", "False"] |
| 282 | + soc: |
| 283 | + name: soc |
| 284 | + in: path |
| 285 | + description: Soc in % |
| 286 | + required: true |
| 287 | + schema: |
| 288 | + type: number |
| 289 | + minimum: 0 |
| 290 | + maximum: 100 |
| 291 | + cost: |
| 292 | + name: cost |
| 293 | + in: path |
| 294 | + description: TODO |
| 295 | + required: true |
| 296 | + schema: |
| 297 | + type: number |
| 298 | + power: |
| 299 | + name: power |
| 300 | + in: path |
| 301 | + description: Power in Watt |
| 302 | + required: true |
| 303 | + schema: |
| 304 | + type: number |
| 305 | + minimum: 0 |
| 306 | + responses: |
| 307 | + NumberResult: |
| 308 | + description: TODO |
| 309 | + content: |
| 310 | + application/json: |
| 311 | + schema: |
| 312 | + type: object |
| 313 | + properties: |
| 314 | + result: |
| 315 | + description: TODO |
| 316 | + type: number |
| 317 | + BooleanResult: |
| 318 | + description: TODO |
| 319 | + content: |
| 320 | + application/json: |
| 321 | + schema: |
| 322 | + type: object |
| 323 | + properties: |
| 324 | + result: |
| 325 | + description: TODO |
| 326 | + type: boolean |
0 commit comments