You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+99-20Lines changed: 99 additions & 20 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
# HTTP Digital Adapter Java
2
2
3
-
The `HttpDigitalAdapter` is a powerful component designed to facilitate the integration of Digital Twins into HTTP-based systems.
4
-
It serves as a bridge between a Digital Twin and HTTP-based applications, allowing developers to easily expose and interact with
3
+
The `HttpDigitalAdapter` is a powerful component designed to facilitate the integration of Digital Twins into HTTP-based systems.
4
+
It serves as a bridge between a Digital Twin and HTTP-based applications, allowing developers to easily expose and interact with
5
5
Digital Twin data and functionalities over HTTP.
6
6
7
7
Key Features:
@@ -10,20 +10,20 @@ Key Features:
10
10
-**Dynamic Configuration:** Offers a flexible configuration mechanism through the HttpDigitalAdapterConfiguration, allowing developers to customize the adapter's behavior based on specific requirements.
11
11
-**State Monitoring:** Monitors changes in the Digital Twin state and provides HTTP endpoints to query the state of the Digital Twin (properties, events, actions and relationships).
12
12
-**Event Notifications:** Allows developers to retrieve event notifications triggered by changes in the Digital Twin state.
13
+
-**Storage & Query:** Since version 0.2 the HTTP Digital Adapter is able to retrieve Storage Statistics and execute query on the target DT

17
16
18
17
A complete example is provided in the `test` folder with a complete DT Creation in the `TestMain` class together with a demo DT with and emulated Physical Adapter and the HTTP Digital Adapter.
19
18
20
19
## WLDT-Core Version Compatibility
21
20
22
21
The correct mapping and compatibility between versions is reported in the following table
This section of the documentation provides detailed information about the RESTful API exposed by the WLDT - HTTP Digital Adapter.
172
-
The API allows you to interact with the Digital Twin (DT) instance, retrieve its state, read properties, actions, event and relationships description,
171
+
This section of the documentation provides detailed information about the RESTful API exposed by the WLDT - HTTP Digital Adapter.
172
+
The API allows you to interact with the Digital Twin (DT) instance, retrieve its state, read properties, actions, event and relationships description,
173
173
and trigger actions.
174
174
175
175
Available endpoints with the associated methods are:
@@ -185,12 +185,91 @@ Available endpoints with the associated methods are:
185
185
-`POST``/state/actions/{actionKey}`: Triggers the specified action (e.g., /state/actions/switch_on) in the Digital Twin state. The raw body contains the action request payload.
186
186
-`GET``/state/relationships`: Retrieves the list of relationships in the Digital Twin state.
187
187
-`GET``/state/relationships/{relationshipName}/instances`: Retrieves the instances of the specified relationship (e.g., /state/relationships/insideIn/instances) in the Digital Twin state.
188
+
-`GET``/storage`: Retrieves Storage Statistics from the target Digital Twin
189
+
-`POST``/storage/query`: Allows the execution of a query, where the query structure is specified through a JSON Message in the request Body. For additional information about the Query System see [Query System Page](/docs/guides/storage-layer/)
188
190
189
191
Note: Replace {propertyKey}, {actionKey}, and {relationshipName} with the actual values you want to retrieve or trigger.
190
-
Make sure to use the appropriate HTTP method (GET, POST) and include any required parameters or payload as described in each endpoint's description. For more detailed information, refer to the Postman Collection for this API available in the folder `api`: [http_adapter_api_postman.json](api%2Fhttp_adapter_api_postman.json)`
192
+
Make sure to use the appropriate HTTP method (GET, POST) and include any required parameters or payload as described in each endpoint's description. For more detailed information, refer to the Postman Collection for this API available in the folder `api`: [http_adapter_api_postman.json](https://github.com/wldt/http-digital-adapter-java/blob/master/api/http_adapter_api_postman.json)
191
193
194
+
Example of Storage Query Requests are the following:
192
195
196
+
Retrieve the first 4 Digital Twin State Variations
193
197
198
+
```json
199
+
{
200
+
"resourceType": "DIGITAL_TWIN_STATE",
201
+
"queryType": "SAMPLE_RANGE",
202
+
"startIndex": 0,
203
+
"endIndex": 3
204
+
}
205
+
```
206
+
207
+
Retrieve Digital Twin State Variations in a Time Range
208
+
209
+
```json
210
+
{
211
+
"resourceType": "DIGITAL_TWIN_STATE",
212
+
"queryType": "TIME_RANGE",
213
+
"startIndex": 161989898,
214
+
"endIndex": 162989898
215
+
}
216
+
```
217
+
218
+
Retrieve the last Digital Twin State
219
+
220
+
```json
221
+
{
222
+
"resourceType": "DIGITAL_TWIN_STATE",
223
+
"queryType": "LAST_VALUE"
224
+
}
225
+
```
226
+
227
+
Available keywords for Query Resource Type and Query Type are the following (as explained in the dedicated [Query System Page](/docs/guides/storage-layer/)):
0 commit comments