Sensors & Services

List available services: GET /sensors/{id}/services/available

This method lists all the available services for a sensor based on its data fields.

URLhttps://api.sense-os.nl/sensors/{id}/services/available
MethodGET
Need AuthTrue

Request Headers

NameDefaultTypeStyleRequired
Accept*xsd:stringheaderTrue

Request Parameters

NameDescriptionType

List all available services: GET /sensors/services/available

This method lists all the available services for all the sensors. Available services are selected based on their data fields.

URLhttps://api.sense-os.nl/sensors/services/available
MethodGET
Need AuthTrue

Request Headers

NameDefaultTypeStyleRequired
Accept*xsd:stringheaderTrue

Request Parameters

NameDescriptionType

List running services: GET /sensors/{id}/services

This method lists all the running services for a sensor. It also lists the data fields of the sensor that are used by each service.

URLhttps://api.sense-os.nl/sensors/{id}/services
MethodGET
Need AuthTrue

Request Headers

NameDefaultTypeStyleRequired
Accept*xsd:stringheaderTrue

Request Parameters

NameDescriptionType

Use a service: POST /sensors/{id}/services

This method connects a sensor to a service. In the POST data a
service object is posted with the name of the service that is used.
If the id of an existing service object is specified then this
sensor will be connected to that service. Otherwise a new service
will be created. In the optional array 'data_fields' the data fields
of the sensor that should be used by this service can be specified.
For every new service a virtual sensor is created. Data send from
this service is stored under that virtual sensor. Optionally a
sensor object with the name and device_type for the virtual sensor
can be posted along with the creation of the service.

URLhttps://api.sense-os.nl/sensors/{id}/services
MethodPOST
Need AuthTrue

Request Headers

NameDefaultTypeStyleRequired
Accept*xsd:stringheaderTrue

Request Parameters

NameDescriptionType

Request Body

The service and optional sensor objects

{
    "service": {
        "id": "11",
        "name": "averager",
        "data_fields": [
            "x-axis",
            "y-axis",
            "z-axis"
        ]
    },
    "sensor": {
        "name": "accelerometeraverager",
        "device_type": "BMA1503-axis"
    }
}

List service methods: GET /sensors/{id}/services/{service_id}/methods

This method lists all the available methods of the service selected
with. These methods can be accessed to set and retrieve the
settings of a service.

URLhttps://api.sense-os.nl/sensors/{id}/services/{service_id}/methods
MethodGET
Need AuthTrue

Request Headers

NameDefaultTypeStyleRequired
Accept*xsd:stringheaderTrue

Request Parameters

NameDescriptionType

Run a service get method: GET /sensors/{id}/services/{service_id}/{method}

To retrieve information about a service, one of its 'get_methods' can be accessed by specifying the method name in the request url.

URLhttps://api.sense-os.nl/sensors/{id}/services/{service_id}/{method}
MethodGET
Need AuthTrue

Request Headers

NameDefaultTypeStyleRequired
Accept*xsd:stringheaderTrue

Request Parameters

NameDescriptionType

Run a service set method: POST /sensors/{id}/services/{service_id}/{method}

To change specific settings of a service, one of its 'set_methods'
can be accessed by specifying the method name in the request url.
The parameters for the method are send in a parameters array. The
response content is based on the method return type. If the method
does not have a return value then it will return an object with
result ok if the method succeeds.

URLhttps://api.sense-os.nl/sensors/{id}/services/{service_id}/{method}
MethodPOST
Need AuthTrue

Request Headers

NameDefaultTypeStyleRequired
Accept*xsd:stringheaderTrue

Request Parameters

NameDescriptionType

Request Body

{
    "parameters": [
        "0",
        "0",
        "1"
    ]
}

Learn a pattern: POST /sensors/{id}/services/{service_id}/manualLearn

With this method states can be learned using previously stored data. This method is currently only available for the state_recognition_service and the pose_prediction_service. By giving a class label, start and end date, a state will be learned using the data from all the associated sensors from within the given time range.

URLhttps://api.sense-os.nl/sensors/{id}/services/{service_id}/manualLearn
MethodPOST
Need AuthTrue

Request Headers

NameDefaultTypeStyleRequired
Accept*xsd:stringheaderTrue

Request Parameters

NameDescriptionType
start_dateThe start date in UNIX time format (double seconds). Used as date to start the item search from. xsd:float
end_dateThe end date in UNIX time format (double seconds). The date until which the items will be searched. xsd:float
class_labelThe class label is the name of the state that will be learned. xsd:string