Method | HTTP request | Description |
---|---|---|
all | GET /sensor | Get the set of all sensors. |
allByParticipant | GET /participant/{participant_id}/sensor | Get all sensors for a participant. |
allByResearcher | GET /researcher/{researcher_id}/sensor | Get all sensors for a researcher. |
allByStudy | GET /study/{study_id}/sensor | View all sensors in a study. |
create | POST /study/{study_id}/sensor | Create a new Sensor under the given Study. |
delete | DELETE /sensor/{sensor_id} | Delete a Sensor. |
update | PUT /sensor/{sensor_id} | Update an Sensor's settings. |
view | GET /sensor/{sensor_id} | Get a single sensor, by identifier. |
array[object] all()
Get the set of all sensors.
Get the set of all sensors.
import LAMP from 'lamp-core'
// Get the set of all sensors.
const result = LAMP.Sensor.all()
console.dir(result)
Name | Type | Description | Notes |
---|---|---|---|
transform | string | [optional] |
array[object]
- Content-Type:
application/json
- Accept:
application/json
Status code | Description | Response headers |
---|---|---|
200 | 200 Success | - |
400 | 400 Bad Request | - |
403 | 403 Authorization Failed | - |
404 | 404 Not Found | - |
0 | 500 Internal Error | - |
array[object] allByParticipant(participant_id)
Get all sensors for a participant.
Get the set of all sensors available to a participant, by participant identifier.
import LAMP from 'lamp-core'
let participant_id = 'participant_id_example' // string
// Get all sensors for a participant.
const result = LAMP.Sensor.allByParticipant(participant_id)
console.dir(result)
Name | Type | Description | Notes |
---|---|---|---|
participant_id | string | ||
transform | string | [optional] |
array[object]
- Content-Type:
application/json
- Accept:
application/json
Status code | Description | Response headers |
---|---|---|
200 | 200 Success | - |
400 | 400 Bad Request | - |
403 | 403 Authorization Failed | - |
404 | 404 Not Found | - |
0 | 500 Internal Error | - |
array[object] allByResearcher(researcher_id)
Get all sensors for a researcher.
Get the set of all sensors available to participants of any study conducted by a researcher, by researcher identifier.
import LAMP from 'lamp-core'
let researcher_id = 'researcher_id_example' // string
// Get all sensors for a researcher.
const result = LAMP.Sensor.allByResearcher(researcher_id)
console.dir(result)
Name | Type | Description | Notes |
---|---|---|---|
researcher_id | string | ||
transform | string | [optional] |
array[object]
- Content-Type:
application/json
- Accept:
application/json
Status code | Description | Response headers |
---|---|---|
200 | 200 Success | - |
400 | 400 Bad Request | - |
403 | 403 Authorization Failed | - |
404 | 404 Not Found | - |
0 | 500 Internal Error | - |
array[object] allByStudy(study_id)
View all sensors in a study.
Get the set of all sensors available to participants of a single study, by study identifier.
import LAMP from 'lamp-core'
let study_id = 'study_id_example' // string
// View all sensors in a study.
const result = LAMP.Sensor.allByStudy(study_id)
console.dir(result)
Name | Type | Description | Notes |
---|---|---|---|
study_id | string | ||
transform | string | [optional] |
array[object]
- Content-Type:
application/json
- Accept:
application/json
Status code | Description | Response headers |
---|---|---|
200 | 200 Success | - |
400 | 400 Bad Request | - |
403 | 403 Authorization Failed | - |
404 | 404 Not Found | - |
0 | 500 Internal Error | - |
character create(study_id, sensor)
Create a new Sensor under the given Study.
Create a new Sensor under the given Study.
import LAMP from 'lamp-core'
let study_id = 'study_id_example' // string
let sensor = Sensor.new("id_example", "spec_example", "name_example", 123) // Sensor
// Create a new Sensor under the given Study.
const result = LAMP.Sensor.create(study_id, sensor)
console.dir(result)
Name | Type | Description | Notes |
---|---|---|---|
study_id | string | ||
sensor | Sensor |
string
- Content-Type:
application/json
- Accept:
application/json
Status code | Description | Response headers |
---|---|---|
200 | 200 Success | - |
400 | 400 Bad Request | - |
403 | 403 Authorization Failed | - |
404 | 404 Not Found | - |
0 | 500 Internal Error | - |
character delete(sensor_id)
Delete a Sensor.
Delete a Sensor.
import LAMP from 'lamp-core'
let sensor_id = 'sensor_id_example' // string
// Delete a Sensor.
const result = LAMP.Sensor.delete(sensor_id)
console.dir(result)
Name | Type | Description | Notes |
---|---|---|---|
sensor_id | string |
string
- Content-Type:
application/json
- Accept:
application/json
Status code | Description | Response headers |
---|---|---|
200 | 200 Success | - |
400 | 400 Bad Request | - |
403 | 403 Authorization Failed | - |
404 | 404 Not Found | - |
0 | 500 Internal Error | - |
character update(sensor_id, sensor)
Update an Sensor's settings.
Update an Sensor's settings.
import LAMP from 'lamp-core'
let sensor_id = 'sensor_id_example' // string
let sensor = Sensor.new("id_example", "spec_example", "name_example", 123) // Sensor
// Update an Sensor's settings.
const result = LAMP.Sensor.update(sensor_id, sensor)
console.dir(result)
Name | Type | Description | Notes |
---|---|---|---|
sensor_id | string | ||
sensor | Sensor |
string
- Content-Type:
application/json
- Accept:
application/json
Status code | Description | Response headers |
---|---|---|
200 | 200 Success | - |
400 | 400 Bad Request | - |
403 | 403 Authorization Failed | - |
404 | 404 Not Found | - |
0 | 500 Internal Error | - |
array[object] view(sensor_id)
Get a single sensor, by identifier.
Get a single sensor, by identifier.
import LAMP from 'lamp-core'
let sensor_id = 'sensor_id_example' // string
// Get a single sensor, by identifier.
const result = LAMP.Sensor.view(sensor_id)
console.dir(result)
Name | Type | Description | Notes |
---|---|---|---|
sensor_id | string | ||
transform | string | [optional] |
array[object]
- Content-Type:
application/json
- Accept:
application/json
Status code | Description | Response headers |
---|---|---|
200 | 200 Success | - |
400 | 400 Bad Request | - |
403 | 403 Authorization Failed | - |
404 | 404 Not Found | - |
0 | 500 Internal Error | - |