Worked examples of complete operations. Each one shows the JSON documents exchanged through the north
API, used by back-office applications, and through the south API, used by devices — so you can see
how a single job request turns into what the device actually receives.
Software and firmware update is the most complete operation OpenGate models: it is long-running,
multi-step, and its progress matters as much as its outcome. It is therefore a good example of the
asynchronous flow with multiple responses.
Flow diagram
OpenGate suggests a complete flow covering all the possible stages of a device update. In the real world
a device may implement only part of these steps — any number and kind of steps implemented by your
device is supported.
Each notification is an HTTP POST from the device carrying the operation response, and each ACK is
OpenGate’s HTTP 200 reply. Every notification updates the operation’s steps array, so the north API
sees the download percentage advance in real time.
The UPDATE operation type declares the following steps: ACCEPTED, BEGINUPDATE, DOWNLOADFILE,
BEGINPREACTION, ENDPREACTION, BEGININSTALL, ENDINSTALL, BEGINPOSTACTION, ENDPOSTACTION and
ENDUPDATE. See the status reference for the results a step can
report.
North API invocation
Back office applications invoke device update operations through the ordinary
jobs API — everything you know about jobs applies. What is specific to updates is the
operation name and its parameters:
This is the document the device receives from the platform. The deploymentElements array is what makes
an update different from any other operation: it tells the device what to download, where to put it, in
which order, and how to verify it.