Rest API 0.1.0 Open API Docs


Overview


Version information

Version : 1.0.0


URI scheme

Host : radar-cns-platform.rosalind.kcl.ac.uk
BasePath : /api
Schemes : HTTPS


Paths


Return an Applications status

GET /android/avro/status/{subjectId}/{sourceId}

Description

The Android application periodically updates its current status


Parameters

Type Name Description Schema Default

Path

sourceId
required

string

Path

subjectId
required

string


Responses

HTTP Code Description Schema

200

Return a application.avsc object containing lastreceived status

No Content

204

No value for the given parameters

No Content

500

An error occurs while executing

No Content


Produces

  • application/octet-stream


Return an Applications status

GET /android/status/{subjectId}/{sourceId}

Description

The Android application periodically updates its current status


Parameters

Type Name Description Schema Default

Path

sourceId
required

string

Path

subjectId
required

string


Responses

HTTP Code Description Schema

200

Return a application.avsc object containing lastreceived status

No Content

204

No value for the given parameters, in the bodythere is a message.avsc object with more details

No Content

500

An error occurs while executing, in the bodythere is a message.avsc object with more details

No Content


Produces

  • application/json


Returns a dataset object formatted in Apache AVRO.

GET /data/avro/realTime/{sensor}/{stat}/{interval}/{subjectId}/{sourceId}

Description

Each collected sample is aggregated to provide near real-time statistical results. This end-point returns the last computed result of type stat for the given subjectID, sourceID, and sensor. Data can be queried using different time-frame resolutions. The response is formatted in Apache AVRO.


Parameters

Type Name Description Schema Default

Path

interval
required

enum (TEN_SECOND, THIRTY_SECOND, ONE_MIN, TEN_MIN, ONE_HOUR, ONE_DAY, ONE_WEEK)

Path

sensor
required

enum (ACCELEROMETER, BATTERY, BLOOD_VOLUME_PULSE, ELECTRODERMAL_ACTIVITY, INTER_BEAT_INTERVAL, HEART_RATE, THERMOMETER)

Path

sourceId
required

string

Path

stat
required

enum (AVERAGE, COUNT, MAXIMUM, MEDIAN, MINIMUM, SUM, INTERQUARTILE_RANGE, LOWER_QUARTILE, UPPER_QUARTILE, QUARTILES, RECEIVED_MESSAGES)

Path

subjectId
required

string


Responses

HTTP Code Description Schema

200

Returns a byte array serialising a dataset.avsc object containing last computed sample for the given inputs formatted either Acceleration.avsc or DoubleValue.avsc

No Content

204

No value for the given parameters.

No Content

500

An error occurs while executing

No Content


Produces

  • application/octet-stream


Returns a dataset object formatted in Apache AVRO.

GET /data/avro/{sensor}/{stat}/{interval}/{subjectId}/{sourceId}

Description

Each collected sample is aggregated to provide near real-time statistical results. This end-point returns all available results of type stat for the given subjectID, sourceID, and sensor. Data can be queried using different time-frame resolutions. The response is formatted in Apache AVRO.


Parameters

Type Name Description Schema Default

Path

interval
required

enum (TEN_SECOND, THIRTY_SECOND, ONE_MIN, TEN_MIN, ONE_HOUR, ONE_DAY, ONE_WEEK)

Path

sensor
required

enum (ACCELEROMETER, BATTERY, BLOOD_VOLUME_PULSE, ELECTRODERMAL_ACTIVITY, INTER_BEAT_INTERVAL, HEART_RATE, THERMOMETER)

Path

sourceId
required

string

Path

stat
required

enum (AVERAGE, COUNT, MAXIMUM, MEDIAN, MINIMUM, SUM, INTERQUARTILE_RANGE, LOWER_QUARTILE, UPPER_QUARTILE, QUARTILES, RECEIVED_MESSAGES)

Path

subjectId
required

string


Responses

HTTP Code Description Schema

200

Returns a byte array serialising a dataset.avsc object containing all available samples for the given inputs formatted either Acceleration.avsc or DoubleValue.avsc

No Content

204

No value for the given parameters.

No Content

500

An error occurs while executing.

No Content


Produces

  • application/octet-stream


Returns a dataset object formatted in Apache AVRO.

GET /data/avro/{sensor}/{stat}/{interval}/{subjectId}/{sourceId}/{start}/{end}

Description

Each collected sample is aggregated to provide near real-time statistical results. This end-point returns all available results of type stat for the given subjectID, sourceID, and sensor belonging to the time window [start - end]. Data can be queried using different time-frame resolutions. The response is formatted in Apache AVRO.


Parameters

Type Name Description Schema Default

Path

end
required

integer(int64)

Path

interval
required

enum (TEN_SECOND, THIRTY_SECOND, ONE_MIN, TEN_MIN, ONE_HOUR, ONE_DAY, ONE_WEEK)

Path

sensor
required

enum (ACCELEROMETER, BATTERY, BLOOD_VOLUME_PULSE, ELECTRODERMAL_ACTIVITY, INTER_BEAT_INTERVAL, HEART_RATE, THERMOMETER)

Path

sourceId
required

string

Path

start
required

integer(int64)

Path

stat
required

enum (AVERAGE, COUNT, MAXIMUM, MEDIAN, MINIMUM, SUM, INTERQUARTILE_RANGE, LOWER_QUARTILE, UPPER_QUARTILE, QUARTILES, RECEIVED_MESSAGES)

Path

subjectId
required

string


Responses

HTTP Code Description Schema

200

Returns a byte array serialising a dataset.avsc object containing samples belonging to the time window [start - end] for the given inputs formatted either Acceleration.avsc or DoubleValue.avsc.

No Content

204

No value for the given parameters

No Content

500

An error occurs while executing

No Content


Produces

  • application/octet-stream


Returns a dataset object formatted in JSON.

GET /data/realTime/{sensor}/{stat}/{interval}/{subjectId}/{sourceId}

Description

Each collected sample is aggregated to provide near real-time statistical results. This end-point returns the last computed result of type stat for the given subjectID, sourceID, and sensor. Data can be queried using different time-frame resolutions. The response is formatted in JSON.


Parameters

Type Name Description Schema Default

Path

interval
required

enum (TEN_SECOND, THIRTY_SECOND, ONE_MIN, TEN_MIN, ONE_HOUR, ONE_DAY, ONE_WEEK)

Path

sensor
required

enum (ACCELEROMETER, BATTERY, BLOOD_VOLUME_PULSE, ELECTRODERMAL_ACTIVITY, INTER_BEAT_INTERVAL, HEART_RATE, THERMOMETER)

Path

sourceId
required

string

Path

stat
required

enum (AVERAGE, COUNT, MAXIMUM, MEDIAN, MINIMUM, SUM, INTERQUARTILE_RANGE, LOWER_QUARTILE, UPPER_QUARTILE, QUARTILES, RECEIVED_MESSAGES)

Path

subjectId
required

string


Responses

HTTP Code Description Schema

200

Returns a dataset.avsc object containing last computed sample for the given inputs formatted either Acceleration.avsc or DoubleValue.avsc

No Content

204

No value for the given parameters, in the body there is a message.avsc object with more details.

No Content

500

An error occurs while executing, in the body there is a message.avsc object with more details.

No Content


Produces

  • application/json


Returns a dataset object formatted in JSON.

GET /data/{sensor}/{stat}/{interval}/{subjectId}/{sourceId}

Description

Each collected sample is aggregated to provide near real-time statistical results. This end-point returns all available results of type stat for the given subjectID, sourceID, and sensor. Data can be queried using different time-frame resolutions. The response is formatted in JSON.


Parameters

Type Name Description Schema Default

Path

interval
required

enum (TEN_SECOND, THIRTY_SECOND, ONE_MIN, TEN_MIN, ONE_HOUR, ONE_DAY, ONE_WEEK)

Path

sensor
required

enum (ACCELEROMETER, BATTERY, BLOOD_VOLUME_PULSE, ELECTRODERMAL_ACTIVITY, INTER_BEAT_INTERVAL, HEART_RATE, THERMOMETER)

Path

sourceId
required

string

Path

stat
required

enum (AVERAGE, COUNT, MAXIMUM, MEDIAN, MINIMUM, SUM, INTERQUARTILE_RANGE, LOWER_QUARTILE, UPPER_QUARTILE, QUARTILES, RECEIVED_MESSAGES)

Path

subjectId
required

string


Responses

HTTP Code Description Schema

200

Returns a dataset.avsc object containing all available samples for the given inputs formatted either Acceleration.avsc or DoubleValue.avsc

No Content

204

No value for the given parameters, in the body there is a message.avsc object with more details.

No Content

500

An error occurs while executing, in the body there is a message.avsc object with more details.

No Content


Produces

  • application/json


Returns a dataset object formatted in JSON.

GET /data/{sensor}/{stat}/{interval}/{subjectId}/{sourceId}/{start}/{end}

Description

Each collected sample is aggregated to provide near real-time statistical results. This end-point returns all available results of type stat for the given subjectID, sourceID, and sensor belonging to the time window [start - end]. Data can be queried using different time-frame resolutions. The response is formatted in JSON.


Parameters

Type Name Description Schema Default

Path

end
required

integer(int64)

Path

interval
required

enum (TEN_SECOND, THIRTY_SECOND, ONE_MIN, TEN_MIN, ONE_HOUR, ONE_DAY, ONE_WEEK)

Path

sensor
required

enum (ACCELEROMETER, BATTERY, BLOOD_VOLUME_PULSE, ELECTRODERMAL_ACTIVITY, INTER_BEAT_INTERVAL, HEART_RATE, THERMOMETER)

Path

sourceId
required

string

Path

start
required

integer(int64)

Path

stat
required

enum (AVERAGE, COUNT, MAXIMUM, MEDIAN, MINIMUM, SUM, INTERQUARTILE_RANGE, LOWER_QUARTILE, UPPER_QUARTILE, QUARTILES, RECEIVED_MESSAGES)

Path

subjectId
required

string


Responses

HTTP Code Description Schema

200

Returns a dataset.avsc object containing samples belonging to the time window [start - end] for the given inputs formatted either Acceleration.avsc or DoubleValue.avsc.

No Content

204

No value for the given parameters, in the body there is a message.avsc object with more details.

No Content

500

An error occurs while executing, in the body there is a message.avsc object with more details.

No Content


Produces

  • application/json


Return a User value

GET /source/avro/getAllSources/{subjectId}

Description

Return all known sources associated with the give subjectID


Parameters

Type Name Description Schema Default

Path

subjectId
required

string


Responses

HTTP Code Description Schema

200

Return a subject.avsc object

No Content

204

No value for the given parameters

No Content

500

An error occurs while executing

No Content


Produces

  • application/octet-stream


Return a SourceDefinition specification

GET /source/avro/specification/{sourceType}

Description

Return the data specification of all on-board sensors for the givensource type


Parameters

Type Name Description Schema Default

Path

sourceType
required

enum (ANDROID, EMPATICA, PEBBLE, BIOVOTION)


Responses

HTTP Code Description Schema

200

Return a source_specification.avsc objectcontaining last computed status

No Content

204

No value for the given parameters

No Content

500

An error occurs while executing

No Content


Produces

  • application/octet-stream


Return a SourceDefinition values

GET /source/avro/state/{subjectId}/{sourceId}

Description

Using the source sensors values arrived within last 60sec, it computes thesender status for the given subjectID and sourceID


Parameters

Type Name Description Schema Default

Path

sourceId
required

string

Path

subjectId
required

string


Responses

HTTP Code Description Schema

200

Return a byte array serialising source.avsc objectcontaining last computed status

No Content

204

No value for the given parameters

No Content

500

An error occurs while executing

No Content


Produces

  • application/octet-stream


Return a User value

GET /source/getAllSources/{subjectId}

Description

Return all known sources associated with the give subjectID


Parameters

Type Name Description Schema Default

Path

subjectId
required

string


Responses

HTTP Code Description Schema

200

Return a subject.avsc object

No Content

204

No value for the given parameters, in the bodythere is a message.avsc object with more details

No Content

500

An error occurs while executing, in the bodythere is a message.avsc object with more details

No Content


Produces

  • application/json


Return a SourceDefinition specification

GET /source/specification/{sourceType}

Description

Return the data specification of all on-board sensors for the givensource type


Parameters

Type Name Description Schema Default

Path

sourceType
required

enum (ANDROID, EMPATICA, PEBBLE, BIOVOTION)


Responses

HTTP Code Description Schema

200

Return a source_specification.avsc objectcontaining last computed status

No Content

204

No value for the given parameters, in the bodythere is a message.avsc object with more details

No Content

500

An error occurs while executing, in the bodythere is a message.avsc object with more details

No Content


Produces

  • application/json


Return a SourceDefinition values

GET /source/state/{subjectId}/{sourceId}

Description

Using the source sensors values arrived within last 60sec, it computes thesender status for the given subjectID and sourceID


Parameters

Type Name Description Schema Default

Path

sourceId
required

string

Path

subjectId
required

string


Responses

HTTP Code Description Schema

200

Return a source.avsc object containing lastcomputed status

No Content

204

No value for the given parameters, in the bodythere is a message.avsc object with more details

No Content

500

An error occurs while executing, in the bodythere is a message.avsc object with more details

No Content


Produces

  • application/json


Return a list of subjects

GET /subject/avro/getAllSubjects/{studyId}

Description

Each subject can have multiple sourceID associated with him


Parameters

Type Name Description Schema Default

Path

studyId
required

string


Responses

HTTP Code Description Schema

200

Return a byte array serialising a list ofsubject.avsc objects

No Content

204

No value for the given parameters

No Content

500

An error occurs while executing

No Content


Produces

  • application/octet-stream


Return the information related to given subject identifier

GET /subject/avro/getSubject/{subjectId}

Description

Some information are not implemented yet. The returned values are hardcoded.


Parameters

Type Name Description Schema Default

Path

subjectId
required

string


Responses

HTTP Code Description Schema

200

Return the subject.avsc object associated with the given subject identifier

No Content

204

No value for the given parameters, in the bodythere is a message.avsc object with more details

No Content

500

An error occurs while executing, in the bodythere is a message.avsc object with more details

No Content


Produces

  • application/octet-stream


Return a list of subjects

GET /subject/getAllSubjects/{studyId}

Description

Each subject can have multiple sourceID associated with him


Parameters

Type Name Description Schema Default

Path

studyId
required

string


Responses

HTTP Code Description Schema

200

Return a list of subject.avsc objects

No Content

204

No value for the given parameters, in the bodythere is a message.avsc object with more details

No Content

500

An error occurs while executing, in the bodythere is a message.avsc object with more details

No Content


Produces

  • application/json


Return the information related to given subject identifier

GET /subject/getSubject/{subjectId}

Description

Some information are not implemented yet. The returned values are hardcoded.


Parameters

Type Name Description Schema Default

Path

subjectId
required

string


Responses

HTTP Code Description Schema

200

Return the subject.avsc object associated with the given subject identifier

No Content

204

No value for the given parameters, in the bodythere is a message.avsc object with more details

No Content

500

An error occurs while executing, in the bodythere is a message.avsc object with more details

No Content


Produces

  • application/json