Skip to content
This repository has been archived by the owner on Jul 14, 2022. It is now read-only.

Rest inspect api

torito edited this page Jan 9, 2013 · 5 revisions

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:
curl -i -H "Accept: application/json" -X GET http://localhost:8080/rose/inspect/machines
  • Get the description of the machine {id}:
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.
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}

...?machine={machineId}
  • Get the the description of the remote endpoint successfully imported on this gateway (a proxy has been created).
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}

...?machine={machineId}

Services

  • Get the the endpoint description of the OSGi service successfully exported.
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}

...?machine={machineId}