The REST Inspect Api allows you to inspect the RoSe machines at runtime. It provides a simple way to know which machines has been properly created as well as the endpoints discovered, the service exporter and the endpoints imported via those machines.

Install

In order to use the REST Inspect API, you must deploy the Jax-Rs Exporter and its dependencies. The bundle which contains the REST Inspect API resources is:

<dependency>
    <artifactId>rose-wui</artifactId>
    <groupId>org.ow2.chameleon.rose</groupId>
    <version>1.0.1-SNAPSHOT</version>
</dependency>

Overview

Method Path Query Param Type
GET /rose/inspect/machines filter application/json
GET /rose/inspect/machines/{id} application/json
GET /rose/inspect/discovered machine application/json
GET /rose/inspect/imported machine application/json
GET /rose/inspect/exported machine application/json

Use the Web User Interface - WUI

Go to the following URL in any browser http://localhost:8080/rose/wui/index.html

Usage

The following section show you how to use the Inspect API with curl.

Machines

  • Get the ids of the RoSe machine available on the gateway: bash curl -i -H "Accept: application/json" -X GET http://localhost:8080/rose/inspect/machines

  • Get the description of the machine {id}: bash curl -i -H "Accept: application/json" -X GET http://localhost:8080/rose/inspect/machines/{id}

Endpoints

  • Get the the description of the description of the endpoint discovered on this gateway. bash curl -i -H "Accept: application/json" -X GET http://localhost:8080/rose/inspect/discovered to get only the description of the endpoint discovered via the RoSe machine of id {machineId} bash ...?machine={machineId}

  • Get the the description of the remote endpoint successfully imported on this gateway (a proxy has been created). bash curl -i -H "Accept: application/json" -X GET http://localhost:8080/rose/inspect/imported to get only the endpoints imported via the RoSe machine of id {machineId} bash ...?machine={machineId}

Services

  • Get the the endpoint description of the OSGi service successfully exported. bash curl -i -H "Accept: application/json" -X GET http://localhost:8080/rose/inspect/exported to get only the endpoint description of services exported via the RoSe machine of id {machineId} bash ...?machine={machineId}