vehicle/data/element_name
The vehicle/data/element_name URI gets a specific vehicle data element.
URI path
vehicle/data/element_name
Supported request methods
GET
Queries the system for the record associated with the specific vehicle data element. An example of a queryable element is EngineSpeed.
Supported content types
Returned vehicle data element values may be expressed in a variety of categories, such as decimal or hexadecimal numbers or strings. The examples below demonstrate several types of returned values.
J1939 SPNs, or parameters, that are described as bit fields or enumerations are represented as ints. J1939 SPNs that can have floating point values are represented as floats. In general, variables that are strings of bytes are represented as binary data.
XML
The result is returned in a data content block, including a timestamp and a value (scalar, where numeric), and wrapped in a block named for the requested element. For example, here is the returned value for EngineSpeed:
<EngineSpeed> <timestamp>2012-12-09T05:15:32Z</timestamp> <value>2350.0</value> </EngineSpeed>
The variable vehicle/data/ParkingBrake is an int variable, and its values are reported in decimal:
<ParkingBrake> <value>0</value> <timestamp>2013-11-07T16:54:12Z</timestamp> </ParkingBrake>
The variable vehicle/data/IgnitionSwitchStatus is a binary value. Its values are reported in hexadecimal. In the following example, the returned value is 0x55, which is 85 in decimal:
<IgnitionSwitchStatus> <value>55</value> <timestamp>2013-11-07T16:57:33Z</timestamp> </IgnitionSwitchStatus>
JSON
The result is returned as an object with timestamp and value fields, assigned to a field corresponding to the requested value. Following are JSON examples of same values shown above.
{ "EngineSpeed" : { "timestamp" : "2012-12-09T05:15:32Z", "value": "2350.0" } } { "ParkingBrake": { "value": 0, "timestamp": "2013-11-07T16:55:37Z" } } { "IgnitionSwitchStatus": { "value": "55", "timestamp": "2013-11-07T16:59:39Z" }