@@ -277,6 +277,56 @@ _Even if this version is increased, the API remains backward compatible.
277
277
It just help backends development to identify if new features are
278
278
present in a gateway._
279
279
280
+ #### Set configuration data item
281
+
282
+ Only processed if CONFIGURATION_DATA_V1 feature flag is set on the gateway.
283
+
284
+ - ** Request:**
285
+
286
+ > ** topic:** gw-request/set_configuration_data_item/* \< gw-id\> /\< sink-id\> *
287
+ >
288
+ > ** content:** [ GenericMessage] [ message_GenericMessage ] .[ WirepasMessage] [ message_WirepasMessage ] .SetConfigurationDataItemReq
289
+
290
+ - ** Response:**
291
+
292
+ > ** topics:** gw-response/set_configuration_data_item/* \< gw-id\> /\< sink-id\> *
293
+ >
294
+ > ** content:** [ GenericMessage] [ message_GenericMessage ] .[ WirepasMessage] [ message_WirepasMessage ] .SetConfigurationDataItemResp
295
+ >
296
+ > ** possible errors:**
297
+ > - INVALID_ROLE: Node is not a sink.
298
+ > - SINK_OUT_OF_MEMORY: Payload is too large or maximum number of items is reached.
299
+ > - INVALID_DEST_ENDPOINT: Endpoint is too large (it should be a 16 bit unsigned integer).
300
+ > - INVALID_DATA_PAYLOAD: Payload is rejected for this endpoint by the sink.
301
+ > - INVALID_SINK_ID: Invalid sink id in the request header.
302
+
303
+ :warning :
304
+
305
+ _ Successfully setting an item must be treated as a configuration change on the
306
+ sink, meaning that the gateway must report the new complete configuration data
307
+ content by generating a new [ StatusEvent] [ message_StatusEvent ] message._
308
+
309
+ #### Get configuration data item
310
+
311
+ Only processed if CONFIGURATION_DATA_V1 feature flag is set on the gateway.
312
+
313
+ - ** Request:**
314
+
315
+ > ** topic:** gw-request/get_configuration_data_item/* \< gw-id\> /\< sink-id\> *
316
+ >
317
+ > ** content:** [ GenericMessage] [ message_GenericMessage ] .[ WirepasMessage] [ message_WirepasMessage ] .GetConfigurationDataItemReq
318
+
319
+ - ** Response:**
320
+
321
+ > ** topics:** gw-response/get_configuration_data_item/* \< gw-id\> /\< sink-id\> *
322
+ >
323
+ > ** content:** [ GenericMessage] [ message_GenericMessage ] .[ WirepasMessage] [ message_WirepasMessage ] .GetConfigurationDataItemResp
324
+ >
325
+ > ** possible errors:**
326
+ > - INVALID_DEST_ENDPOINT: Endpoint is too large (it should be a 16 bit unsigned integer).
327
+ > - INVALID_PARAM: No item found with the given endpoint.
328
+ > - INVALID_SINK_ID: Invalid sink id in the request header.
329
+
280
330
### Data module
281
331
282
332
---
@@ -518,6 +568,9 @@ definition)
518
568
519
569
gw-request/otap_set_target_scratchpad/<gw-id>/<sink-id>
520
570
571
+ gw-request/set_configuration_data_item/<gw-id>/<sink-id>
572
+
573
+ gw-request/get_configuration_data_item/<gw-id>/<sink-id>
521
574
```
522
575
523
576
* Response* from a gateway to a backend:
@@ -538,6 +591,10 @@ definition)
538
591
gw-response/otap_process_scratchpad/<gw-id>/<sink-id>
539
592
540
593
gw-response/otap_set_target_scratchpad/<gw-id>/<sink-id>
594
+
595
+ gw-response/set_configuration_data_item/<gw-id>/<sink-id>
596
+
597
+ gw-response/get_configuration_data_item/<gw-id>/<sink-id>
541
598
```
542
599
543
600
* Asynchronous* event from a gateway:
@@ -591,4 +648,13 @@ definition)
591
648
592
649
[ message_SetScratchpadTargetAndActionResp ] : https://github.com/wirepas/backend-apis/blob/77d83cc91ccfede5e457a488f0611f1fed342585/gateway_to_backend/protocol_buffers_files/otap_message.proto#L54-L56
593
650
651
+ <!-- TODO update links and take them into use once they are available in the master branch -->
652
+ <!-- [message_SetConfigurationDataItemReq]: -->
653
+ <!-- -->
654
+ <!-- [message_SetConfigurationDataItemResp]: -->
655
+ <!-- -->
656
+ <!-- [message_GetConfigurationDataItemReq]: -->
657
+ <!-- -->
658
+ <!-- [message_GetConfigurationDataItemResp]: -->
659
+
594
660
[ protobuf_homepage ] : https://developers.google.com/protocol-buffers
0 commit comments