Skip to content

Commit

Permalink
Add apiKey, switch to user-context
Browse files Browse the repository at this point in the history
  • Loading branch information
jason-fox committed Jul 9, 2024
1 parent 103388c commit 167fe61
Show file tree
Hide file tree
Showing 8 changed files with 186 additions and 160 deletions.
12 changes: 8 additions & 4 deletions NGSI-LD Subscriptions.postman_collection.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
],
"body": {
"mode": "raw",
"raw": "{\n \"description\": \"Notify me of low feedstock on Farm:001\",\n \"type\": \"Subscription\",\n \"entities\": [{\"type\": \"FillingLevelSensor\"}],\n \"watchedAttributes\": [\"filling\"],\n \"q\": \"filling>0.6;filling<0.8;controlledAsset==urn:ngsi-ld:Building:farm001\",\n \"notification\": {\n \"attributes\": [\"filling\", \"controlledAsset\"],\n \"format\": \"keyValues\",\n \"endpoint\": {\n \"uri\": \"http://tutorial:3000/subscription/low-stock-farm001\",\n \"accept\": \"application/json\"\n }\n },\n \"@context\": \"http://context/ngsi-context.jsonld\"\n}"
"raw": "{\n \"description\": \"Notify me of low feedstock on Farm:001\",\n \"type\": \"Subscription\",\n \"entities\": [{\"type\": \"FillingLevelSensor\"}],\n \"watchedAttributes\": [\"filling\"],\n \"q\": \"filling>0.6;filling<0.8;controlledAsset==urn:ngsi-ld:Building:farm001\",\n \"notification\": {\n \"attributes\": [\"filling\", \"controlledAsset\"],\n \"format\": \"keyValues\",\n \"endpoint\": {\n \"uri\": \"http://tutorial:3000/subscription/low-stock-farm001\",\n \"accept\": \"application/json\"\n }\n },\n \"@context\": \"http://context/user-context.jsonld\"\n}"
},
"url": {
"raw": "http://{{orion}}/ngsi-ld/v1/subscriptions/",
Expand Down Expand Up @@ -64,7 +64,7 @@
],
"body": {
"mode": "raw",
"raw": "{\n \"description\": \"Notify me of low feedstock on Farm:001\",\n \"type\": \"Subscription\",\n \"entities\": [{\"type\": \"FillingLevelSensor\"}],\n \"watchedAttributes\": [\"filling\"],\n \"q\": \"filling>0.4;filling<0.6;controlledAsset==urn:ngsi-ld:Building:farm001\",\n \"notification\": {\n \"attributes\": [\"filling\", \"controlledAsset\"],\n \"format\": \"normalized\",\n \"endpoint\": {\n \"uri\": \"http://tutorial:3000/subscription/low-stock-farm001-ngsild\",\n \"accept\": \"application/json\"\n }\n },\n \"@context\": \"http://context/ngsi-context.jsonld\"\n}"
"raw": "{\n \"description\": \"Notify me of low feedstock on Farm:001\",\n \"type\": \"Subscription\",\n \"entities\": [{\"type\": \"FillingLevelSensor\"}],\n \"watchedAttributes\": [\"filling\"],\n \"q\": \"filling>0.4;filling<0.6;controlledAsset==urn:ngsi-ld:Building:farm001\",\n \"notification\": {\n \"attributes\": [\"filling\", \"controlledAsset\"],\n \"format\": \"normalized\",\n \"endpoint\": {\n \"uri\": \"http://tutorial:3000/subscription/low-stock-farm001-ngsild\",\n \"accept\": \"application/json\"\n }\n },\n \"@context\": \"http://context/user-context.jsonld\"\n}"
},
"url": {
"raw": "http://{{orion}}/ngsi-ld/v1/subscriptions/",
Expand Down Expand Up @@ -101,7 +101,7 @@
],
"body": {
"mode": "raw",
"raw": "{\n \"description\": \"Notify me of low feedstock on Farm:001\",\n \"type\": \"Subscription\",\n \"entities\": [{\"type\": \"FillingLevelSensor\"}],\n \"watchedAttributes\": [\"filling\"],\n \"q\": \"filling<0.4;controlledAsset==urn:ngsi-ld:Building:farm001\",\n \"notification\": {\n \"attributes\": [\"filling\", \"controlledAsset\"],\n \"format\": \"x-ngsiv2-normalized\",\n \"endpoint\": {\n \"uri\": \"http://tutorial:3000/subscription/low-stock-farm001-ngsiv2\",\n \"accept\": \"application/json\"\n }\n },\n \"@context\": \"http://context/ngsi-context.jsonld\"\n}"
"raw": "{\n \"description\": \"Notify me of low feedstock on Farm:001\",\n \"type\": \"Subscription\",\n \"entities\": [{\"type\": \"FillingLevelSensor\"}],\n \"watchedAttributes\": [\"filling\"],\n \"q\": \"filling<0.4;controlledAsset==urn:ngsi-ld:Building:farm001\",\n \"notification\": {\n \"attributes\": [\"filling\", \"controlledAsset\"],\n \"format\": \"x-ngsiv2-normalized\",\n \"endpoint\": {\n \"uri\": \"http://tutorial:3000/subscription/low-stock-farm001-ngsiv2\",\n \"accept\": \"application/json\"\n }\n },\n \"@context\": \"http://context/user-context.jsonld\"\n}"
},
"url": {
"raw": "http://{{orion}}/ngsi-ld/v1/subscriptions/",
Expand Down Expand Up @@ -144,7 +144,7 @@
],
"body": {
"mode": "raw",
"raw": "{\n \"description\": \"Notify me of all product price changes\",\n \"type\": \"Subscription\",\n \"entities\": [{\"type\": \"Product\"}],\n \"watchedAttributes\": [\"price\"],\n \"notification\": {\n \"format\": \"keyValues\",\n \"endpoint\": {\n \"uri\": \"http://tutorial:3000/subscription/price-change\",\n \"accept\": \"application/json\"\n }\n },\n \"@context\": \"http://context/ngsi-context.jsonld\"\n}"
"raw": "{\n \"description\": \"Notify me of all product price changes\",\n \"type\": \"Subscription\",\n \"entities\": [{\"type\": \"Product\"}],\n \"watchedAttributes\": [\"price\"],\n \"notification\": {\n \"format\": \"keyValues\",\n \"endpoint\": {\n \"uri\": \"http://tutorial:3000/subscription/price-change\",\n \"accept\": \"application/json\"\n }\n },\n \"@context\": \"http://context/user-context.jsonld\"\n}"
},
"url": {
"raw": "http://{{orion}}/ngsi-ld/v1/subscriptions/",
Expand Down Expand Up @@ -339,6 +339,10 @@
{
"key": "ngsi-context.jsonld",
"value": "http://context/ngsi-context.jsonld"
},
{
"key": "user-context.jsonld",
"value": "http://context/user-context.jsonld"
}
]
}
10 changes: 5 additions & 5 deletions README.ja.md
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ curl -L -X POST 'http://localhost:1026/ngsi-ld/v1/subscriptions/' \
"accept": "application/json"
}
},
"@context": "http://context/ngsi-context.jsonld"
"@context": "http://context/user-context.jsonld"
}'
```
Expand Down Expand Up @@ -373,7 +373,7 @@ curl -L -X POST 'http://localhost:1026/ngsi-ld/v1/subscriptions/' \
"accept": "application/json"
}
},
"@context": "http://context/ngsi-context.jsonld"
"@context": "http://context/user-context.jsonld"
}'
```

Expand Down Expand Up @@ -436,7 +436,7 @@ curl -L -X POST 'http://localhost:1026/ngsi-ld/v1/subscriptions/' \
"accept": "application/json"
}
},
"@context": "http://context/ngsi-context.jsonld"
"@context": "http://context/user-context.jsonld"
}'
```

Expand Down Expand Up @@ -529,7 +529,7 @@ curl -L -X POST 'http://localhost:1026/ngsi-ld/v1/subscriptions/' \
]
}
},
"@context": "http://context/ngsi-context.jsonld"
"@context": "http://context/user-context.jsonld"
}'
```

Expand Down Expand Up @@ -595,7 +595,7 @@ curl -L -X POST 'http://localhost:1026/ngsi-ld/v1/subscriptions/' \
"accept": "application/json"
}
},
"@context": "http://context/ngsi-context.jsonld"
"@context": "http://context/user-context.jsonld"
}'
```

Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ curl -L -X POST 'http://localhost:1026/ngsi-ld/v1/subscriptions/' \
"accept": "application/json"
}
},
"@context": "http://context/ngsi-context.jsonld"
"@context": "http://context/user-context.jsonld"
}'
```
Expand Down Expand Up @@ -352,7 +352,7 @@ curl -L -X POST 'http://localhost:1026/ngsi-ld/v1/subscriptions/' \
"accept": "application/json"
}
},
"@context": "http://context/ngsi-context.jsonld"
"@context": "http://context/user-context.jsonld"
}'
```

Expand Down Expand Up @@ -415,7 +415,7 @@ curl -L -X POST 'http://localhost:1026/ngsi-ld/v1/subscriptions/' \
"accept": "application/json"
}
},
"@context": "http://context/ngsi-context.jsonld"
"@context": "http://context/user-context.jsonld"
}'
```

Expand Down Expand Up @@ -503,7 +503,7 @@ curl -L -X POST 'http://localhost:1026/ngsi-ld/v1/subscriptions/' \
]
}
},
"@context": "http://context/ngsi-context.jsonld"
"@context": "http://context/user-context.jsonld"
}'
```

Expand Down Expand Up @@ -564,7 +564,7 @@ curl -L -X POST 'http://localhost:1026/ngsi-ld/v1/subscriptions/' \
"accept": "application/json"
}
},
"@context": "http://context/ngsi-context.jsonld"
"@context": "http://context/user-context.jsonld"
}'
```

Expand Down
147 changes: 5 additions & 142 deletions data-models/ngsi-context.jsonld
Original file line number Diff line number Diff line change
@@ -1,143 +1,6 @@
{
"@context": {
"type": "@type",
"id": "@id",
"ngsi-ld": "https://uri.etsi.org/ngsi-ld/",
"fiware": "https://uri.fiware.org/ns/dataModels#",
"schema": "https://schema.org/",
"tutorial": "https://ngsi-ld-tutorials.readthedocs.io/en/latest/datamodels.html#",
"Building": "https://uri.fiware.org/ns/dataModels#Building",
"Device": "fiware:Device",
"Animal": "fiware:Animal",
"Female": "schema:Female",
"FillingLevelSensor": "tutorial:FillingLevelSensor",
"Herbicide": "tutorial:Product",
"HVAC": "https://w3id.org/saref#HVAC",
"Male": "schema:Male",
"PartField": "tutorial:PartField",
"Person": "fiware:Person",
"SoilSensor": "tutorial:SoilSensor",
"TemperatureSensor": "tutorial:TemperatureSensor",
"Task": "fiware:Activity",
"Tractor": "tutorial:Tractor",
"Water": "tutorial:Water",
"actuator": "https://w3id.org/saref#actuator",
"additionalName": "schema:additionalName",
"address": "schema:address",
"addressCountry": "schema:addressCountry",
"addressLocality": "schema:addressLocality",
"addressRegion": "schema:addressRegion",
"airPollution": "https://w3id.org/saref#airPollution",
"atmosphericPressure": "https://w3id.org/saref#atmosphericPressure",
"barn": "https://wiki.openstreetmap.org/wiki/Tag:building%3Dbarn",
"batteryLevel": "fiware:batteryLevel",
"category": "fiware:category",
"configuration": "fiware:configuration",
"conservatory": "https://wiki.openstreetmap.org/wiki/Tag:building%3Dconservatory",
"containedInPlace": "fiware:containedInPlace",
"controlledAsset": "fiware:controlledAsset",
"controlledProperty": "fiware:controlledProperty",
"cowshed": "https://wiki.openstreetmap.org/wiki/Tag:building%3Dcowshed",
"dataProvider": "fiware:dataProvider",
"dateCreated": "fiware:dateCreated",
"dateFirstUsed": "fiware:dateFirstUsed",
"dateInstalled": "fiware:dateInstalled",
"dateLastCalibration": "fiware:dateLastCalibration",
"dateLastValueReported": "fiware:dateLastValueReported",
"dateManufactured": "fiware:dateManufactured",
"dateModified": "fiware:dateModified",
"depth": "https://w3id.org/saref#depth",
"description": "ngsi-ld:description",
"deviceState": "fiware:deviceState",
"digester": "https://wiki.openstreetmap.org/wiki/Tag:building%3Ddigester",
"eatingActivity": "https://w3id.org/saref#eatingActivity",
"email": "schema:email",
"endgun": "https://w3id.org/saref#endgun",
"familyName": "schema:familyName",
"farm": "https://wiki.openstreetmap.org/wiki/Tag:building%3Dfarm",
"farm_auxiliary": "https://wiki.openstreetmap.org/wiki/Tag:building%3Dfarm_auxiliary",
"faxNumber": "schema:faxNumber",
"filling": "https://w3id.org/saref#fillingLevel",
"firmwareVersion": "fiware:firmwareVersion",
"floorsAboveGround": "fiware:floorsAboveGround",
"floorsBelowGround": "fiware:floorsBelowGround",
"gender": "schema:gender",
"givenName": "schema:givenName",
"greenhouse": "https://wiki.openstreetmap.org/wiki/Tag:building%3Dgreenhouse",
"hangar": "https://wiki.openstreetmap.org/wiki/Tag:building%3Dhangar",
"hardwareVersion": "fiware:hardwareVersion",
"honorificPrefix": "schema:honorificPrefix",
"honorificSuffix": "schema:honorificSuffix",
"humidity": "https://w3id.org/saref#humidity",
"hut": "https://wiki.openstreetmap.org/wiki/Tag:building%3Dhut",
"implement": "https://w3id.org/saref#implement",
"ipAddress": "fiware:ipAddress",
"irrSection": "https://w3id.org/saref#irrSection",
"irrSystem": "https://w3id.org/saref#irrSystem",
"isicV4": "schema:isicV4",
"jobTitle": "schema:jobTitle",
"location": "https://w3id.org/saref#location",
"macAddress": "fiware:macAddress",
"mcc": "fiware:mcc",
"meter": "https://w3id.org/saref#meter",
"milking": "https://w3id.org/saref#milking",
"mnc": "fiware:mnc",
"motion": "https://w3id.org/saref#motion",
"movementActivity": "https://w3id.org/saref#movementActivity",
"multimedia": "https://w3id.org/saref#multimedia",
"name": "schema:name",
"network": "https://w3id.org/saref#network",
"observedAt": "ngsi-ld:observedAt",
"occupancy": "https://w3id.org/saref#occupancy",
"occupier": "fiware:occupier",
"openingHours": "fiware:openingHours",
"osVersion": "fiware:osVersion",
"owner": "fiware:owner",
"postalCode": "schema:postalCode",
"precipitation": "https://w3id.org/saref#precipitation",
"pressure": "https://w3id.org/saref#pressure",
"providedBy": "fiware:providedBy",
"provider": "fiware:provider",
"refDeviceModel": "fiware:refDeviceModel",
"refMap": "fiware:refMap",
"rssi": "fiware:rssi",
"sensor": "https://w3id.org/saref#sensor",
"serialNumber": "fiware:serialNumber",
"service": "https://wiki.openstreetmap.org/wiki/Tag:building%3Dservice",
"shed": "https://wiki.openstreetmap.org/wiki/Tag:building%3Dshed",
"softwareVersion": "fiware:softwareVersion",
"soilMoisture": "https://w3id.org/saref#soilMoisture",
"solarRadiation": "https://w3id.org/saref#solarRadiation",
"source": "fiware:source",
"stable": "https://wiki.openstreetmap.org/wiki/Tag:building%3Dstable",
"streetAddress": "schema:streetAddress",
"sty": "https://wiki.openstreetmap.org/wiki/Tag:building%3Dsty",
"supportedProtocol": "fiware:supportedProtocol",
"taxID": "schema:taxID",
"telephone": "schema:telephone",
"temperature": "https://w3id.org/saref#temperature",
"transformer_tower": "https://wiki.openstreetmap.org/wiki/Tag:building%3Dtransformer_tower",
"unitCode": "ngsi-ld:unitCode",
"value": "fiware:value",
"vatID": "schema:vatID",
"waterConsumption": "https://w3id.org/saref#waterConsumption",
"water_tower": "https://wiki.openstreetmap.org/wiki/Tag:building%3Dwater_tower",
"weatherConditions": "https://w3id.org/saref#weatherConditions",
"weight": "https://w3id.org/saref#weight",
"windDirection": "https://w3id.org/saref#windDirection",
"windSpeed": "https://w3id.org/saref#windSpeed",
"status": "https://saref.etsi.org/core/status",
"state": "https://saref.etsi.org/core/hasState",
"heartRate": "https://purl.bioontology.org/ontology/MESH/D006339",
"product": "fiware:refObject",
"worker": "fiware:refAgent",
"field": "fiware:refTarget",

"on": "https://w3id.org/saref#on",
"off": "https://w3id.org/saref#off",
"verified": "fiware:verified",
"species": "fiware:species",
"sex": "fiware:sex",
"legalID": "fiware:legalID"
}
}
"@context": [
"http://context/user-context.jsonld",
"https://uri.etsi.org/ngsi-ld/v1/ngsi-ld-core-context-v1.8.jsonld"
]
}
Loading

0 comments on commit 167fe61

Please sign in to comment.