Environments
List environments: GET /environments
This method lists the environments of a user
URL | https://api.sense-os.nl/environments |
Method | GET |
Need Auth | True |
Request Headers
Name | Default | Type | Style | Required |
---|---|---|---|---|
Accept | * | xsd:string | header | True |
Request Parameters
Name | Description | Type |
---|
Delete environment: DELETE /environments/{id}
This method deletes an environment
URL | https://api.sense-os.nl/environments/{id} |
Method | DELETE |
Need Auth | True |
Request Headers
Name | Default | Type | Style | Required |
---|---|---|---|---|
Accept | * | xsd:string | header | True |
Request Parameters
Name | Description | Type |
---|
List sub environments: GET /environments/{id}/environments
This method returns the sub environments of a selected environment.
URL | https://api.sense-os.nl/environments/{id}/environments |
Method | GET |
Need Auth | True |
Request Headers
Name | Default | Type | Style | Required |
---|---|---|---|---|
Accept | * | xsd:string | header | True |
Request Parameters
Name | Description | Type |
---|
Create environment: POST /environments
This method creates a new environment.
The gps_outline field should contain a list of latitude longitude points describing the outline of the environment.
The list of points should create a polygon.
The latitude longitude coordinates are separated by a space and each tuple by a comma.
Optionally a third coordinate altitude can be specified after the longitude separated by a space.
The gps_outline field can have 8000 characters.
The position field should be the center of the environment which is also a gps point in the order latitude longitude altitude separated by spaces.
The field floors indicates the amount of floors the environment has.
URL | https://api.sense-os.nl/environments |
Method | POST |
Need Auth | True |
Request Headers
Name | Default | Type | Style | Required |
---|---|---|---|---|
Accept | * | xsd:string | header | True |
Request Parameters
Name | Description | Type |
---|
Request Body
The environment object
{ "environment": { "name": "Sense", "floors": "3", "gps_outline": "51.903714 4.459679,51.903415 4.4598,51.903421 4.459896,51.903732 4.459805,51.903714 4.459679", "position": "51.903492 4.460028" } }
Remove sub environment: DELETE /environments/{id}/environments/{sub_id}
This method removes a sub environment from an environment
URL | https://api.sense-os.nl/environments/{id}/environments/{sub_id} |
Method | DELETE |
Need Auth | True |
Request Headers
Name | Default | Type | Style | Required |
---|---|---|---|---|
Accept | * | xsd:string | header | True |
Request Parameters
Name | Description | Type |
---|
Update environment: PUT /environments/{id}
This method updates an environment
URL | https://api.sense-os.nl/environments/{id} |
Method | PUT |
Need Auth | True |
Request Headers
Name | Default | Type | Style | Required |
---|---|---|---|---|
Accept | * | xsd:string | header | True |
Request Parameters
Name | Description | Type |
---|
Request Body
The environment object
{ "environment": { "name": "Sense", "floors": "3", "gps_outline": "51.903714 4.459679,51.903415 4.4598,51.903421 4.459896,51.903732 4.459805,51.903714 4.459679", "position": "51.903492 4.460028" } }
Add sensors to environment: POST /environments/{id}/sensors
The method adds a sensor to an environment.
To connect an individual sensor a sensor object with only the sensor id can be given
and to connect a list of sensors a sensors object with an array of sensor ids can be given.
URL | https://api.sense-os.nl/environments/{id}/sensors |
Method | POST |
Need Auth | True |
Request Headers
Name | Default | Type | Style | Required |
---|---|---|---|---|
Accept | * | xsd:string | header | True |
Request Parameters
Name | Description | Type |
---|
Request Body
The sensor array
{ "sensors": [ { "id": 20 }, { "id": 21 } ] }
List environment sensors: GET /environments/{id}/sensors
This method lists the sensors which are connected to this environment
URL | https://api.sense-os.nl/environments/{id}/sensors |
Method | GET |
Need Auth | True |
Request Headers
Name | Default | Type | Style | Required |
---|---|---|---|---|
Accept | * | xsd:string | header | True |
Request Parameters
Name | Description | Type |
---|
Add sub environment: POST /environments/{id}/environments
This method adds sub environments to an environment
URL | https://api.sense-os.nl/environments/{id}/environments |
Method | POST |
Need Auth | True |
Request Headers
Name | Default | Type | Style | Required |
---|---|---|---|---|
Accept | * | xsd:string | header | True |
Request Parameters
Name | Description | Type |
---|
Request Body
The environment array
{ "environments": [ { "id": 10 } ] }
Remove sensor from environment: DELETE /environments/{environment_id}/sensors/{sensor_id}
This method removes the selected sensor from the environment
URL | https://api.sense-os.nl/environments/{environmentid}/sensors/{sensorid} |
Method | DELETE |
Need Auth | True |
Request Headers
Name | Default | Type | Style | Required |
---|---|---|---|---|
Accept | * | xsd:string | header | True |
Request Parameters
Name | Description | Type |
---|
Read environment: GET /sensors/{id}/environment
The method returns the details of the selected environment
URL | https://api.sense-os.nl/sensors/{id}/environment |
Method | GET |
Need Auth | True |
Request Headers
Name | Default | Type | Style | Required |
---|---|---|---|---|
Accept | * | xsd:string | header | True |
Request Parameters
Name | Description | Type |
---|