diff options
author | Albin Suresh <albin.suresh@softwareag.com> | 2022-08-18 15:18:23 +0530 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-18 15:18:23 +0530 |
commit | 54160cf3c127859619bf1e51cb7bef69b4c9c110 (patch) | |
tree | 314ccdeb0e644673c69c76a00effef32966e10b4 /docs | |
parent | 7c4087e584a48c8cd7ba85c335761705d390f524 (diff) | |
parent | cffd75655369381ae753593705f20b125cd4188c (diff) |
Merge pull request #1198 from albinsuresh/feature/1197/events-support-child-device
Issue #1197 Document events API for child devices
Diffstat (limited to 'docs')
-rw-r--r-- | docs/src/tutorials/send-events.md | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/docs/src/tutorials/send-events.md b/docs/src/tutorials/send-events.md index 5a658539..1e5bdc20 100644 --- a/docs/src/tutorials/send-events.md +++ b/docs/src/tutorials/send-events.md @@ -47,6 +47,12 @@ When the `time` field is not provided, thin-edge.io will use the current system When you want to skip both fields, use an empty payload to indicate the same. There are no such restrictions on the `<event-type>` value. +### Sending events from child devices + +Events for child devices can be sent by publishing the event payload to `tedge/events/<event-type>/<child-device-id>` topic, +where the `child-device-id` is the unique device id of the child device. +The event payload structure is the same, as described in the previous section. + ## Cloud data mapping If the device is connected to some supported IoT cloud platform, an event that is triggered locally on thin-edge.io will be forwarded to the connected cloud platform as well. @@ -76,9 +82,10 @@ The Cumulocity JSON mapping of the same event would be as follows: "type":"login_event", "text":"A user just logged in", "time":"2021-01-01T05:30:45+00:00", - "source": { - "id":"<c8y-device-id>" - } + "externalSource":{ + "externalId":"<child-device-id>", + "type":"c8y_Serial" + } } ``` |