Get a list of all sensors.
{
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "http://schema.envirocar.org/sensor.json#",
"allOf": [
{
"$ref": "#/definitions/base"
},
{
"$ref": "#/definitions/with-id"
},
{
"oneOf": [
{
"not": {
"$ref": "#/definitions/car-type"
}
},
{
"allOf": [
{
"$ref": "#/definitions/car-type"
},
{
"$ref": "#/definitions/car-properties"
}
]
}
]
}
],
"definitions": {
"base": {
"type": "object",
"required": [
"type",
"properties"
],
"properties": {
"type": {
"type": "string"
},
"properties": {
"type": "object"
}
}
},
"with-id": {
"properties": {
"properties": {
"required": [
"id"
],
"properties": {
"id": {
"type": "string"
}
}
}
}
},
"car-type": {
"properties": {
"type": {
"enum": [
"car"
]
}
}
},
"car-properties": {
"properties": {
"properties": {
"properties": {
"manufacturer": {
"type": "string"
},
"model": {
"type": "string"
},
"fuelType": {
"type": "string",
"enum": [
"diesel",
"gasoline",
"biodiesel",
"kerosene",
"electric"
]
},
"constructionYear": {
"type": "integer",
"minimum": 0
},
"VIN": {
"type": "string"
}
}
}
}
}
}
}
{
"groups": [
{
"created": "2013-06-25T10:00:30Z",
"description": "Product Owner Description",
"modified": "2013-06-28T08:47:16Z",
"name": "Product Owner",
"owner": {
"country": "Germany",
"created": "2013-06-25T09:56:13Z",
"dayOfBirth": "1989-01-01",
"firstName": "Jakob",
"gender": "m",
"language": "de-DE",
"lastName": "M",
"mail": "jakob@jakob.de",
"modified": "2013-07-10T08:30:04Z",
"name": "jakob1"
}
},
{
"description": "enviroCar Developer Group",
"name": "enviroCar developer",
"owner": {
"name": "dustin"
}
},
{
"description": "FirstTestGroup_ARE_secondInputField",
"name": "FirstTestGroup_ARE",
"owner": {
"created": "2013-06-28T15:47:04Z",
"modified": "2013-07-03T16:13:46Z",
"name": "AlbertRemke"
}
},
{
"description": "enviroCar Scrum Master Group",
"name": "scrum master",
"owner": {
"name": "dustin"
}
},
{
"description": "52\u00b0North staff members",
"name": "52\u00b0North",
"owner": {
"name": "daniel"
}
},
{
"description": "Wer sp\u00e4ter bremst bleibt l\u00e4nger schnell.",
"name": "Raser-Club M\u00fcnster",
"owner": {
"created": "2013-06-25T15:21:17Z",
"modified": "2013-07-01T17:18:03Z",
"name": "Turbomartin"
}
}
]
}
Get the sensor sensor
.
{
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "http://schema.envirocar.org/sensor.json#",
"allOf": [
{
"$ref": "#/definitions/base"
},
{
"$ref": "#/definitions/with-id"
},
{
"oneOf": [
{
"not": {
"$ref": "#/definitions/car-type"
}
},
{
"allOf": [
{
"$ref": "#/definitions/car-type"
},
{
"$ref": "#/definitions/car-properties"
}
]
}
]
}
],
"definitions": {
"base": {
"type": "object",
"required": [
"type",
"properties"
],
"properties": {
"type": {
"type": "string"
},
"properties": {
"type": "object"
}
}
},
"with-id": {
"properties": {
"properties": {
"required": [
"id"
],
"properties": {
"id": {
"type": "string"
}
}
}
}
},
"car-type": {
"properties": {
"type": {
"enum": [
"car"
]
}
}
},
"car-properties": {
"properties": {
"properties": {
"properties": {
"manufacturer": {
"type": "string"
},
"model": {
"type": "string"
},
"fuelType": {
"type": "string",
"enum": [
"diesel",
"gasoline",
"biodiesel",
"kerosene",
"electric"
]
},
"constructionYear": {
"type": "integer",
"minimum": 0
},
"VIN": {
"type": "string"
}
}
}
}
}
}
}
{
"properties": {
"constructionYear": 2012,
"created": "2013-07-15T13:34:18Z",
"fuelType": "gasoline",
"id": "51e3fa5ae4b0feb05dbf4168",
"manufacturer": "Toyota",
"model": "Prius III",
"modified": "2013-07-15T13:34:18Z"
},
"type": "car"
}
Creates a new sensor.
{
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "http://schema.envirocar.org/sensor.create.json#",
"allOf": [
{
"$ref": "http://schema.envirocar.org/sensor.json#/definitions/base"
},
{
"oneOf": [
{
"not": {
"$ref": "http://schema.envirocar.org/sensor.json#/definitions/car-type"
}
},
{
"allOf": [
{
"$ref": "http://schema.envirocar.org/sensor.json#/definitions/car-type"
},
{
"$ref": "#/definitions/car-properties"
}
]
}
]
}
],
"definitions": {
"car-properties": {
"allOf": [
{
"$ref": "http://schema.envirocar.org/sensor.json#/definitions/car-properties"
},
{
"properties": {
"properties": {
"required": [
"manufacturer",
"model",
"fuelType",
"constructionYear"
]
}
}
}
]
}
}
}
{
"type": "car",
"properties": {
"model": "TestCar",
"fuelType": "gasolene",
"manufacturer": "TestManufacturer",
"constructionYear": 2001
}
}