Use API

The ase-core-api service provides an API to access the core Edge Compute Platform services. It is available as an http(2) server and as an AMQP connection (in which case the client is responsible for supplying the callback queue and consuming the message(s)).

The callback queue has to start with "ase.callback.api." and should have a unique (random) suffix.

The Edge Compute Platform Internal Device Model uses links for REST HATEOAS. The communication model on Edge Compute Platform uses RabbitMQ queues instead of a REST API. In order to "translate" (mimic REST) the Message Service should be the primary connection using the ase.exchange.api exchange with headers href and requestMethod and the message as the equivalent of the request body.

The ase.exchange.api exchange method uses the RPC approach (i.e., with callback queue and correlationId, see RabbitMQ Tutorial 6). The client is responsible for supplying the callback queue and consuming the message(s).

Example 1

GET /things/itMmuV7uNt3onfDldnoR

Exchange Headers Body
ase.exchange.api requestMethod=GET

href=/things/itMmuV7uNt3onfDldnoR

Example 2

PUT /things/itMmuV7uNt3onfDldnoR/properties/temperature

{
  "temperature": 34
}
Exchange Headers Body
ase.exchange.api requestMethod=PUT

href=/things/itMmuV7uNt3onfDldnoR/properties/temperature

{"temperature":34}