Commit 22411716 authored by canterafonsj's avatar canterafonsj
Browse files

API Examples from WI-009

parent 2c728a4f
{
"id": "urn:ngsi-ld:ContextSourceRegistration:csr1a3456",
"type": "ContextSourceRegistration",
"information": [
{
"entities": [
{
"id": "urn:ngsi-ld:Vehicle:A456",
"type": "Vehicle"
}
],
"properties": [
"brandName",
"speed"
],
"relationships": [
"isParked"
]
},
{
"entities": [
{
"idPattern": ".*downtown$",
"type": "OffStreetParking"
},
{
"idPattern": ".*47$",
"type": "OffStreetParking"
}
],
"properties": [
"availableSotNumber",
"totalSpotNumber"
],
"relationships": [
"isNextToBuilding"
]
}
],
"endpoint": "http://my.csource.org:1026",
"location": {
"type": "Polygon",
"coordinates": [
[
[
100.0,
0.0
],
[
101.0,
0.0
],
[
101.0,
1.0
],
[
100.0,
1.0
],
[
100.0,
0.0
]
]
]
},
"timestamp": {
"start": " 2017-11-29T14:53:15"
},
"@context": [
"https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/coreContext/ngsi-ld-core-context.json",
"http://example.org/cim/commonTerms.jsonld",
"http://example.org/cim/vehicle.jsonld",
"http://example.org/cim/parking.jsonld"
]
}
{
"id": "urn:ngsi-ld:Vehicle:B9211",
"type": "Vehicle",
"brandName": [
{
"type": "Property",
"value": "Volvo"
}
],
"speed": [
{
"type": "Property",
"value": 120,
"observedAt": "2018-08-01T12:03:00"
},
{
"type": "Property",
"value": 80,
"observedAt": "2018-08-01T12:05:00"
},
{
"type": "Property",
"value": 100,
"observedAt": "2018-08-01T12:07:00"
}
],
"@context": [
"https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/coreContext/ngsi-ld-core-context.json",
"http://example.org/ngsi-ld/vehicle.jsonld"
]
}
{
"id": "urn:ngsi-ld:Vehicle:B9211",
"type": "Vehicle",
"brandName": {
"type": "Property",
"values": [
[
"Volvo",
""
]
]
},
"speed": {
"type": "Property",
"values": [
[
120,
"2018-08-01T12:03:00"
],
[
80,
"2018-08-01T12:05:00"
],
[
100,
"2018-08-01T12:07:00"
]
]
},
"@context": [
"https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/coreContext/ngsi-ld-core-context.json",
"http://example.org/ngsi-ld/vehicle.jsonld"
]
}
{
"id": "urn:ngsi-ld:OffStreetParking:Downtown1",
"type": "OffStreetParking",
"name": {
"type": "Property",
"value": "Downtown One"
},
"availableSpotNumber": {
"type": "Property",
"value": 121,
"observedAt": "2017-07-29T12:05:02",
"reliability": {
"type": "Property",
"value": 0.7
},
"providedBy": {
"type": "Relationship",
"object": "urn:ngsi-ld:Camera:C1"
}
},
"totalSpotNumber": {
"type": "Property",
"value": 200
},
"location": {
"type": "GeoProperty",
"value": {
"type": "Point",
"coordinates": [-8.5, 41.2]
}
},
"@context": [
"http://uri.etsi.org/ngsi-ld/coreContext.jsonld",
"http://example.org/cim/parking.jsonld"
]
}
{
"id": "urn:ngsi-ld:OffStreetParking:Downtown1",
"type": "OffStreetParking",
"name": "Downtown One",
"availableSpotNumber": 121,
"totalSpotNumber": 200,
"location": {
"type": "Point",
"coordinates": [-8.5, 41.2]
},
"@context": [
"http://uri.etsi.org/ngsi-ld/coreContext.jsonld",
"http://example.org/cim/parking.jsonld"
]
}
{
"id": "urn:ngsi-ld:Subscription:mySubscription",
"type": "Subscription",
"entities": [
{
"type": "Vehicle"
}
],
"watchedAttributes": [
"speed"
],
"q": "speed>50",
"geoQ": {
"georel": "near;maxDistance==2000",
"geometry": "Point",
"coordinates": [
-1,
100
]
},
"notification": {
"attributes": [
"speed"
],
"format": "keyValues",
"endpoint": {
"uri": "http://my.endpoint.org/notify",
"accept": "application/json"
}
},
"@context": [
"https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/coreContext/ngsi-ld-core-context.json",
"http://example.org/cim/vehicle.jsonld"
]
}
{
"id": "urn:ngsi-ld:Vehicle:A4567",
"type": "Vehicle",
"brandName": {
"type": "Property",
"value": "Mercedes"
},
"isParked": {
"type": "Relationship",
"object": "urn:ngsi-ld:OffStreetParking:Downtown1",
"observedAt": "2017-07-29T12:00:04",
"providedBy": {
"type": "Relationship",
"object": "urn:ngsi-ld:Person:Bob"
}
},
"@context": [
"https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/coreContext/ngsi-ld-core-context.json",
"http://example.org/cim/commonTerms.jsonld",
"http://example.org/cim/vehicle.jsonld",
"http://example.org/cim/parking.jsonld"
]
}
{
"id": "urn:ngsi-ld:Vehicle:A4567",
"type": "Vehicle",
"speed#1": {
"type": "Property",
"value": 55,
"source": {
"type": "Property",
"value": "Speedometer"
},
"datasetId": "urn:ngsi-ld:Property:speedometerA4567-speed"
},
"speed#2": {
"type": "Property",
"value": 54.5,
"source": {
"type": "Property",
"value": "GPS"
},
"datasetId": "urn:ngsi-ld:Property:gpsBxyz123-speed"
},
"@context": [
"https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/coreContext/ngsi-ld-core-context.json",
{
"speed#1": "http://example.org/speed",
"speed#2": "http://example.org/speed",
"source": "http://example.org/hasSource"
}
]
}
\ No newline at end of file
{
"id": "urn:ngsi-ld:Vehicle:A4567",
"type": "Vehicle",
"brandName": "Mercedes",
"isParked": "urn:ngsi-ld:OffStreetParking:Downtown1",
"@context": [
"https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/coreContext/ngsi-ld-core-context.json",
"http://example.org/cim/commonTerms.jsonld",
"http://example.org/cim/vehicle.jsonld",
"http://example.org/cim/parking.jsonld"
]
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment