README.md: formatting fixes
[e-mobility-charging-stations-simulator.git] / README.md
index c61910c98d40c4de9d7377b93784f53e8f64657d..e0cbce54918fa5a3d875285c30669f95adffc86a 100644 (file)
--- a/README.md
+++ b/README.md
@@ -386,6 +386,10 @@ All kind of OCPP parameters are supported in a charging station configuration or
 
 Protocol to control the simulator via a Websocket or HTTP server.
 
+### HTTP Protocol
+
+A Postman and [Insomnia](https://insomnia.rest/) requests collection, to learn how to use the HTTP protocol to pilot the simulator, is available in [src/assets](./src/assets/) directory.
+
 ### WebSocket Protocol
 
 PDU stands for Protocol Data Unit.
@@ -401,13 +405,13 @@ PDU stands for Protocol Data Unit.
   `uuid`: String uniquely linking the response to the request  
   `PDU`: Response data to requested procedure
 
-### Version 0.0.1
+#### Version 0.0.1
 
 Set the WebSocket header _Sec-Websocket-Protocol_ to `ui0.0.1`.
 
-#### Procedures
+##### Procedures
 
-##### Start Simulator
+###### Start Simulator
 
 - Request:  
   `ProcedureName`: 'startSimulator'  
@@ -415,10 +419,10 @@ Set the WebSocket header _Sec-Websocket-Protocol_ to `ui0.0.1`.
 
 - Response:  
   `PDU`: {  
-  `status`  
+  `status`: 'success' | 'failure'  
   }
 
-##### Stop Simulator
+###### Stop Simulator
 
 - Request:  
   `ProcedureName`: 'stopSimulator'  
@@ -426,10 +430,10 @@ Set the WebSocket header _Sec-Websocket-Protocol_ to `ui0.0.1`.
 
 - Response:  
   `PDU`: {  
-  `status`  
+  `status`: 'success' | 'failure'  
   }
 
-##### List Charging Stations
+###### List Charging Stations
 
 - Request:  
   `ProcedureName`: 'listChargingStations'  
@@ -437,96 +441,136 @@ Set the WebSocket header _Sec-Websocket-Protocol_ to `ui0.0.1`.
 
 - Response:  
   `PDU`: {  
-  `status`,  
+  `status`: 'success' | 'failure',  
   `index`: ChargingStationData,  
   ...  
   `index`: ChargingStationData  
   }
 
-##### Start Transaction
+###### Start Transaction
 
 - Request:  
   `ProcedureName`: 'startTransaction'  
   `PDU`: {  
-  `hashId`: charging station unique identifier string (deprecated) | `hashIds`: charging station unique identifier strings array,  
+  `hashIds`: charging station unique identifier strings array (optional, default: all charging stations),  
   `connectorId`: connector id integer,  
   `idTag`: RFID tag string  
   }
 
 - Response:  
   `PDU`: {  
-  `status`  
+  `status`: 'success' | 'failure',  
+  `hashIdsSucceeded`: charging station unique identifier strings array,  
+  `hashIdsFailed`: charging station unique identifier strings array (optional)  
   }
 
-##### Stop Transaction
+###### Stop Transaction
 
 - Request:  
   `ProcedureName`: 'stopTransaction'  
   `PDU`: {  
-  `hashId`: charging station unique identifier string (deprecated) | `hashIds`: charging station unique identifier strings array,  
+  `hashIds`: charging station unique identifier strings array (optional, default: all charging stations),  
   `transactionId`: transaction id integer  
   }
 
 - Response:  
   `PDU`: {  
-  `status`  
+  `status`: 'success' | 'failure',  
+  `hashIdsSucceeded`: charging station unique identifier strings array,  
+  `hashIdsFailed`: charging station unique identifier strings array (optional)  
   }
 
-##### Start Charging Station
+###### Start Charging Station
 
 - Request:  
   `ProcedureName`: 'startChargingStation'  
   `PDU`: {  
-  `hashId`: charging station unique identifier string (deprecated) | `hashIds`: charging station unique identifier strings array
+  `hashIds`: charging station unique identifier strings array (optional, default: all charging stations)  
   }
 
 - Response:  
   `PDU`: {  
-  `status`  
+  `status`: 'success' | 'failure',  
+  `hashIdsSucceeded`: charging station unique identifier strings array,  
+  `hashIdsFailed`: charging station unique identifier strings array (optional)  
   }
 
-##### Stop Charging Station
+###### Stop Charging Station
 
 - Request:  
   `ProcedureName`: 'stopChargingStation'  
   `PDU`: {  
-  `hashId`: charging station unique identifier string (deprecated) | `hashIds`: charging station unique identifier strings array  
+  `hashIds`: charging station unique identifier strings array (optional, default: all charging stations)  
   }
 
 - Response:  
   `PDU`: {  
-  `status`  
+  `status`: 'success' | 'failure',  
+  `hashIdsSucceeded`: charging station unique identifier strings array,  
+  `hashIdsFailed`: charging station unique identifier strings array (optional)  
   }
 
-##### Open Connection
+###### Open Connection
 
 - Request:  
   `ProcedureName`: 'openConnection'  
   `PDU`: {  
-  `hashId`: charging station unique identifier string (deprecated) | `hashIds`: charging station unique identifier strings array  
+  `hashIds`: charging station unique identifier strings array (optional, default: all charging stations)  
   }
 
 - Response:  
   `PDU`: {  
-  `status`  
+  `status`: 'success' | 'failure',  
+  `hashIdsSucceeded`: charging station unique identifier strings array,  
+  `hashIdsFailed`: charging station unique identifier strings array (optional)  
   }
 
-##### Close Connection
+###### Close Connection
 
 - Request:  
   `ProcedureName`: 'closeConnection'  
   `PDU`: {  
-  `hashId`: charging station unique identifier string (deprecated) | `hashIds`: charging station unique identifier strings array  
+  `hashIds`: charging station unique identifier strings array (optional, default: all charging stations)  
   }
 
 - Response:  
   `PDU`: {  
-  `status`  
+  `status`: 'success' | 'failure',  
+  `hashIdsSucceeded`: charging station unique identifier strings array,  
+  `hashIdsFailed`: charging station unique identifier strings array (optional)  
   }
 
-### HTTP Protocol
+###### Start Automatic Transaction Generator
+
+- Request:  
+  `ProcedureName`: 'startAutomaticTransactionGenerator'  
+  `PDU`: {  
+  `hashIds`: charging station unique identifier strings array (optional, default: all charging stations),  
+  `connectorIds`: connector id integer array (optional, default: all connectors)  
+  }
+
+- Response:  
+  `PDU`: {  
+  `status`: 'success' | 'failure',  
+  `hashIdsSucceeded`: charging station unique identifier strings array,  
+  `hashIdsFailed`: charging station unique identifier strings array (optional)  
+  }
+
+###### Stop Automatic Transaction Generator
+
+- Request:  
+  `ProcedureName`: 'stopAutomaticTransactionGenerator'  
+  `PDU`: {  
+  `hashIds`: charging station unique identifier strings array (optional, default: all charging stations),  
+  `connectorIds`: connector id integer array (optional, default: all connectors)  
+  }
 
-A Postman or Advanced REST client collection to learn how to use the HTTP protocol to pilot the simulator is available.
+- Response:  
+  `PDU`: {  
+  `status`: 'success' | 'failure',  
+  `hashIdsSucceeded`: charging station unique identifier strings array,  
+  `hashIdsFailed`: charging station unique identifier strings array (optional)  
+  }
 
 ## Support, Feedback, Contributing