Driven by platform

Operations driven by platform

OpenGate initiates the communication with the device, asking for an operation execution. Once requested, the device can respond synchronously or asynchronously using the HTTP protocol.

Synchronous

A single HTTP request and response drives the whole operation.

Synchronous Operation Strategy Synchronous Operation Strategy

Asynchronous

In this case, OpenGate sends the operation to the device using an HTTP request, and the device answers with an acknowledgment using the HTTP response.

Later, OpenGagate can receive one or several HTTP requests sent by the device. The device can send these HTTP requests informing about the subsequent steps that the operation needs.

Simple response

The device sends only a final response message to answer the request.

Asynchronous Operation Strategy - Simple Response Asynchronous Operation Strategy - Simple Response

Multiple responses

The device and a final response at the end of the sequence can send multiple partial responses.

Figure 5. Asynchronous Operation Strategy - Multiple Responses Figure 5. Asynchronous Operation Strategy - Multiple Responses

Operation structure

Simple request/response

The operation has only a request and a response to finish it. There are no intermediate steps. It can be used synchronously or asynchronously (simple response).

Multi-step response

The operation requires a list of steps to track the operation. The device can inform about these steps in one single response or gradually in partial responses until it reaches the final step. The device can answer using a synchronous or asynchronous (simple or multiple responses) flow strategy.

Response structure

There is no difference between synchronous and asynchronous responses regarding the JSON format.

  • Synchronous: The device embeds the JSON payload in the HTTP response.
  • Asynchronous: The device embeds the JSON payload in a new HTTP POST initiated by the device.

URIs

Attending to the flow strategies described above, south operations API can be summarized:

  • It uses an HTTP request/response mechanism with an embedded JSON file to both flow directions:
    • Platform - Device: Synchronous/Asynchronous Operation Request
    • Device - Platform:
    • Operation response
    • On-demand request
  • Both platform and device must implement an HTTP web service publishing a URI as defined in the next table:
Side URI Port
Device /v80/devices/{device.id}/operation/request 1123 / 11235 (secure mode)
Platform /south/v80/devices/{device.id}/operation/response 443 (secure HTTP)