Name: RADAR-RestApi
Owner: RADAR-CNS
Owner: RADAR-CNS
Description: RESTful interface to access near real-time data
Created: 2016-10-18 19:09:34.0
Updated: 2017-10-03 19:46:57.0
Pushed: 2018-02-05 14:50:24.0
Size: 78739
Language: Java
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
A REST-FULL Service using Tomcat 8.0.37, MongoDb 3.2.10, Swagger 2.0, Apache Avro 1.7.7 and Jersey 2.
Thi project implents the downstream REST API for the RADAR-CNS project'
This project uses git submodule
. When cloning, please use the command git clone --recursive
. For already cloned repos, use git submodule update --init --recursive
to update modules.
To deploy the war do:
device-catalog.yml
configuration file and specify its location in radar.yml
radar.yml
config file and then copy it your config folder. Paths checked to find the config file are/usr/share/tomcat8/conf/
/usr/local/tomcat/conf/radar/
./gradlew build
build/libs/
in /usr/local/tomcat/webapp/
By default, log messages are redirected to the STDOUT
.
The api documentation is located at <your-server-address>:<port>/radar/api/swagger.json
Click here to see documentation of dev deploy instance.
Click here to see some mock data.
Swagger provides a tool to automatically generate a client in several programming language.
File / Import URL
http://radar-restapi.eu-west-1.elasticbeanstalk.com/api/swagger.json
Import
Generate Client
and select your programming languageUseful for testing the integration between RADAR-CNS Hotstorage
and RADAR-CNS Rest API
. Before running the test, add 127.0.0.1 hotstorage
to the hosts
file.
To run the test:
gradlew integrationTest
This project contains an end to end test for the RADAR-CNS platform covering:
Confluent Rest-Proxy
Kafka infrastructure
RADAR-CNS kafka streams application
RADAR-CNS MongoDb connector
RADAR-CNS Hotstorage
RADAR-CNS Rest API
Infrastructure settings are located at src/endToEndTest/resources/pipeline.yml
.
Test case settings are located at src/endToEndTest/resources/pipeline.yml
. Each test case is specified as:
pic: android_empatica_e4_acceleration
nsor: ACCELEROMETER
equency: 32.0
le: accelerometer.csv
y_schema: org.radarcns.key.MeasurementKey
lue_schema: org.radarcns.empatica.EmpaticaE4Acceleration
lue_fields: [x, y, z]
nimum: -2.0
ximum: 2.0
ximum_difference: 1e-10
The test will generate random data between minimum
and maximum
, and stream it to the landing topic specified by topic
having for key key_schema
and for value value_schema
. Data for the sensor type sensor
are randomly generated according to the frequency
: number of messages generated per second. value_fields
is the variables list which will be tested against the RESTfull service. Since we are comparing double
s, magnitude
represents the maximum delta between expected and actual values for which both numbers are still considered equal.
To run the test:
adlew endToEndTest
Code should be formatted using the Google Java Code Style Guide. If you want to contribute a feature or fix, please make a pull request.