-
Notifications
You must be signed in to change notification settings - Fork 7
Rest inspect api
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.
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>
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 |
Go to the following URL in any browser http://localhost:8080/rose/wui/index.html
The following section show you how to use the Inspect API with curl.
- 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}
- 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}
- 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}
## API