Communication between gateway and server

Introduction

This document defines the 'protocol' used for communication between server and gateway. Communication between the gateway and server is based on simple HTTP GET requests. The server features two endpoints that can be accessed by the gateway:

  • A control endpoint - used to determine which versions are available for a gateway
  • A data endpoint - used to retrieve the contents of a specific version

Definitions

The following definitions are used in this document:

  • <host> equals the server host as determined by the discovery service on the gateway, for example: http://provisioning.luminis.net:8080
  • <id> equals the gateway ID as determined by the identification service on the gateway, for example: myGateway
  • <version> equals a string representation of a version as specified by the OSGi specification (see also this), for example: 1.0.2
  • deployment package the set of software to be run on a gateway as defined by the OSGi specification (see also this)

The control endpoint

The control endpoint is available on the server on the following location:

<host>/control/<id>/versions

Requesting this address will result in a reply containing the versions of the available deployment packages for the specified gateway, one version per line. If the gateway is not known or no versions are available a HTTP 404 error code (see status code definitions for a list of all status codes of the HTTP protocol) will be replied.

The data endpoint

The data endpoint is available on the server on the following location:

<host>/data/<id>/versions/<version>

Requesting this address will result in a reply containing the deployment package with the specified version, the deployment package is basically a jar file, see the specification for details. If the gateway is not known or the requested version is not available a HTTP 404 error code will be replied.

Fix-package data

A fix-package is a deployment package that only contains changes in regard to a specific version. The data endpoint is available on the server on the following location:

<host>/data/<id>/version/<version>?current=<version>

Requesting this address will result in a reply containing either a normal deployment package for the specified version (the first one) or a fix-package that brings the current version (the second one) up to the specified version. If the gateway is not known or the requested version is not available a HTTP 404 error code will be replied.

  • No labels

1 Comment

  1. The data and control endpoint are merged to one: /deployment

    Perhaps add a complete example:

    http://localhost:8080/deployment/configuredGatewayID/versions
    will return:

    1.0.0
    2.0.0
    3.5.1