This repository has been archived by the owner on Jan 22, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6
Open Universal Rest API and Json Data Model
tkurki edited this page Mar 22, 2014
·
6 revisions
So if <uri>
returns a list of vessels
{
"vessels": [
"244060807": {
"name": "Merrimac"
"href": "244060807"
},
"230029970": {
"name": "Cassiopeia"
"href": "230029970"
}
]
}
then <uri>/vessel/244060807
would return the model and the data for that vessel,<uri>/vessel/244060807/model
the metadata model for what information/data items are available about that vessel and
<uri>/vessel/244060807/data
would return current data for just that vessel.
Furthermore just some parts of the total data set can be requested with more specific urls like <uri>/vessel/244060807/data/navigation/heading
default/preferred reading
{
"heading":"129.9",
"reference":"Magnetic",
"source": {
"type:" "n2k",
"id":"/dev/actisense-1",
"timestamp":"2013-10-08-15:47:28.264",
"src":"204",
"pgn":"127250"
}
}
<uri>/vessel/244060807/data/navigation/heading/
note the trailing slash: all readings
[
{
"heading":"129.9",
"reference":"Magnetic",
"source": {
"type:" "n2k",
"id":"/dev/actisense-1",
"timestamp":"2013-10-08-15:47:28.264",
"src":"204",
"pgn":"127250"
}
},
{
"heading":"128.9",
"reference":"Magnetic",
"source": {
"type:" "n2k",
"id":"/dev/actisense-2",
"timestamp":"2013-10-08-15:47:27.222",
"src":"177",
"pgn":"127250"
}
},
{
"heading":"128.9",
"reference":"Magnetic",
"source": {
"type:" "nmea",
"id":"/dev/nmea-autopilot",
"timestamp":"2013-10-08-15:47:25.123",
"sentence":"HDG"
}
}
]