SlideShare ist ein Scribd-Unternehmen logo
1 von 34
Downloaden Sie, um offline zu lesen
i4Trust Website
i4Trust Community
NGSI-LD
Advanced Operations
Useful links
Latest NGSI-LD specification:
https://www.etsi.org/deliver/etsi_gs/CIM/001_099/009/01.04.01_60/gs_cim009v010401p.pdf
NGSI-LD Tutorials:
https://ngsi-ld-tutorials.readthedocs.io/
Swagger Specification
https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/spec/updated/generated/full_api.json
Guidelines for Creating NGSI-LD Models:
https://github.com/smart-data-models/data-models/blob/master/guidelines.md
Semantic Modelling with NGSI-LD Whitepaper:
https://www.etsi.org/images/files/ETSIWhitePapers/etsi_wp_42_NGSI_LD.pdf
1
NGSI-LD Specific Headers
NGSI-v2 headers
▪ fiware-service
▪ fiware-servicepath
NGSI-LD headers
▪ NGSILD-Tenant - equivalent to fiware-service
▪ NGSILD-Scope ??? - not defined in the NGSI-LD specification
Context brokers are implicitly multi-tenant. The default NGSILD-Tenant is blank.
Data from separate tenants is held in separate databases for legal reasons.
2
Content-Type Header
Supported Content-Types
▪ application/json
▪ application/ld+json
Default is application/json, in which case the
@context must be supplied in a Link header
see: https://developer.mozilla.org/en-US/
docs/Web/HTTP/Headers/Link
Link Header is to be preferred as it reduces the size of
the payloads
Follow JSON-LD best practices.
see https://w3c.github.io/json-ld-bp
3
{
"@context": [
"https://fiware.github.io/data-models/context.jsonld",
"https://uri.etsi.org/ngsi-ld/v1/ngsi-ld-core-context.jsonld"
],
"id": "http://dbpedia.org/resource/John_Lennon",
"type": "Person",
"name": {"type": "Property", "value": "John Lennon"},
"born": {"type": "Property", "value": "1940-10-09"},
"spouse": {"
type": "Relationship",
"object": "http://dbpedia.org/resource/Cynthia_Lennon"
}
}
{
"id": "http://dbpedia.org/resource/John_Lennon",
"type": "Person",
"name": {"type": "Property", "value": "John Lennon"},
"born": {"type": "Property", "value": "1940-10-09"},
"spouse": {"
"type": "Relationship",
"object": "http://dbpedia.org/resource/Cynthia_Lennon"
}
}
'Link: <http://.../path-to-my-public-server/ngsi-context.jsonld>;
rel="http://www.w3.org/ns/json-ld#context"; type="application/ld+json"'
Accept Header for GET /entities and Subscription payloads
Supported Accept Types
▪ application/json - @context is returned in a Link header
▪ application/ld+json - @context is returned in the payload body
▪ application/geo+json - GeoJSON response for GET /entities and subscriptions
see https://tools.ietf.org/html/rfc7946
The fallback for error messages is application/json
Common NGSI-LD Formats
▪ options=normalized
▪ options=keyValues
Custom Formats may be supported by selected context brokers:
▪ options=x-ngsiv2-normalized
▪ options=x-ngsiv2-keyValues
▪ options=x-ngsiv2-keyValues-compacted
Custom NGSI-LD Formats should be used connection to microservices only
Do not use them for data exchange
4
GeoJSON request example
Give me all Animal entities which are pigs inCalf to be found within 2km of 13.364°N 52.52°E
… and return the data as key-value pairs in GeoJSON format without an @context attribute
5
curl -G 'http://localhost:1026/ngsi-ld/v1/entities/' 
-d 'georel=near;maxDistance==2000' 
-d 'geometry=Point' 
-d 'coordinates=%5B13.364,52.52%5D' 
-d 'q=species==%22pig%22;reproductiveCondition==%22inCalf%22' 
-d 'type=Animal' 
-d 'options=keyValues' 
-H 'NGSILD-Tenant: openiot' 
-H 'Accept: application/geo+json' 
-H 'Prefer: body=json' 
-H 'Link: <http://.../path-to-my-public-server/ngsi-context.jsonld>;
rel="http://www.w3.org/ns/json-ld#context"; type="application/ld+json'
Use Prefer=ld+json to return in GeoJSON-LD format
see https://geojson.org/geojson-ld/
GeoJSON response example
▪ Since entities typically have a location they
can be plotted onto a map.
▪ GeoJSON is used as an output format only.
▪ Any GeoJSON Feature and/or FeatureCollection
can be easily digested by any GIS system.
6
{
"type": "FeatureCollection",
"features": [
{
"id": "urn:ngsi-ld:Animal:pig016",
"type": "Feature",
"properties": {
"type": "Animal",
"heartRate": 62,
"phenologicalCondition": "femaleAdult",
"reproductiveCondition": "inCalf",
"name": "Tango",
"legalID": "F-sow016-Tango",
"sex": "female",
"species": "pig",
"location": {
"type": "Point",
"coordinates": [13.355, 52.523]
}
},
"geometry": {
"type": "Point",
"coordinates": [ 13.355, 52.523]
}
},
...etc
]
}
NGSI-LD Temporal interface
Give me the last 5 readings about a single entity and return in default (normalized) format:
7
curl -G -X GET 'http://localhost:8080/temporal/entities/urn:ngsi-ld:Animal:cow001’ 
-d 'lastN=5' 
-H 'NGSILD-Tenant: openiot' 
-H 'Link: <http://.../path-to-my-public-server/ngsi-context.jsonld>;
rel="http://www.w3.org/ns/json-ld#context"; type="application/ld+json"'
▪ Temporal endpoints are found under /temporal/entities
▪ Temporal endpoints are optional - not supported by all context brokers
▪ Gives a context broker a “memory” at the cost of data storage and maintenance.
▪ Expect a performance hit - don’t run as DEBUG
Sample docker-compose:
https://github.com/FIWARE/tutorials.Short-Term-History/blob/NGSI-LD/docker-compose/orion-ld.yml
Normalized Temporal request - 1.4 kB
8
{
"id": "urn:ngsi-ld:Animal:cow001",
"type": "Animal",
"legalID": [
{
"type": "Property",
"value": "M-bull001-Beany",
"instanceId": "urn:ngsi-ld:attribute:instance:ec12e7fc-a45d-11eb-a739-0242ac120106"
},
… etc
],
"name": [
{
"type": "Property",
"value": "Beany",
"instanceId": "urn:ngsi-ld:attribute:instance:ec1284c4-a45d-11eb-a739-0242ac120106"
},
… etc
],
"sex": [
{
"type": "Property",
"value": "male",
"instanceId": "urn:ngsi-ld:attribute:instance:ec12aad0-a45d-11eb-a739-0242ac120106"
},
… etc
],
...etc
],
"location": [
{
"type": "GeoProperty",
"value": {
"type": "Point",
"coordinates": [13.409,52.471,0]
},
"observedAt": "2021-04-26T09:35:16.814Z",
"instanceId": "urn:ngsi-ld:attribute:...",
"providedBy": {
"object": "urn:ngsi-ld:Device:cowcollar001",
"type": "Relationship",
"instanceId": "urn:ngsi-ld:attribute:...",
}
},
… etc
],
"heartRate": [
{
"type": "Property",
"value": 52,
"observedAt": "2021-04-26T09:35:16.814Z",
"instanceId": "urn:ngsi-ld:attribute:..",
"unitCode": "5K",
"providedBy": {
"object": "urn:ngsi-ld:Device:cowcollar001",
"type": "Relationship",
"instanceId": "urn:ngsi-ld:attribute:...",
}
},
...etc
]
}
The following are mandated by the core @context
▪ value
▪ unitCode
▪ observedAt
Unlimited Temporal Responses get very long very quickly
Temporal Queries on attributes without observedAt
Give me the last 5 readings about all female Animals, and return them 2 at a time
9
curl -G -X GET 'http://localhost:8080/temporal/entities' 
-d 'type=Animal' 
-d 'pageSize=2' 
-d 'lastN=5' 
-d 'q=sex==%22female%22' 
-d 'timeproperty=modifiedAt' 
-d 'options=count' 
-H 'NGSILD-Tenant: openiot' 
-H 'Link: <http://.../path-to-my-public-server/ngsi-context.jsonld>;
rel="http://www.w3.org/ns/json-ld#context"; type="application/ld+json"
▪ Default temporal attribute is observedAt.
▪ static attributes are usually not observed - cannot be queried in the q parameter directly
▪ Use timeproperty=modifiedAt to query static properties
Temporal Response including modifiedAt
10
{ "id": "urn:ngsi-ld:Animal:cow003",
"type": "Animal",
"heartRate": [
{
"type": "Property",
"value": 51.0,
"observedAt": "2021-04-26T09:36:36.577Z",
"modifiedAt": "2021-04-26T09:38:09.579Z",
"instanceId": "urn:ngsi-ld:attribute:instance:627f4202-a673-11eb-89a1-0242ac120106",
"unitCode": "5K",
"providedBy": {
"object": "urn:ngsi-ld:Device:cowcollar003",
"type": "Relationship",
"modifiedAt": "2021-04-26T09:38:09.579Z",
"instanceId": "urn:ngsi-ld:attribute:instance:62816672-a673-11eb-89a1-0242ac120106"
}
}
… etc
▪ modifiedAt is returned in the response.
▪ There may be a significant lag between observedAt and modifiedAt
▪ modifiedAt identifies the last confirmed value, not necessarily the last change of value
Pagination options
Query Parameters
▪ lastN - limits the number of returned Attributes
▪ pageSize - limits the number of returned Entities
▪ pageAnchor - id of the first returned Entity
▪ options=count - includes the number of entities
as a header in the response
Relevant Headers in response
▪ Content-Range -
date-time 2021-04-26T09:41:15.752-2021-04-26T09:29:10.834/5
▪ NGSILD-Results-Count - 174
▪ Page-Size - 2
▪ Next-Page - urn:ngsi-ld:Animal:cow004
11
curl -G -X GET
'http://localhost:8080/temporal/entities' 
-d 'type=Animal' 
-d 'pageSize=2' 
-d 'lastN=5' 
-d 'q=sex==%22female%22' 
-d 'timeproperty=modifiedAt' 
-d 'options=count' 
-d pageAnchor=urn:ngsi-ld:Animal:cow004 
...etc
Time limiting and Geofencing Temporal Queries
Give me the heartRate, location and controlledAsset attributes of all Device entities,
found within 800m of 13.364°N 52.52°E and return all readings taken since 8:30 a.m on 22nd
April, returning them 2 devices at a time and in temporal values format
12
curl -L -g -X GET 'http://localhost:8080/temporal/entities' 
-d 'type=Device' 
-d 'attrs=location,controlledAsset' 
-d 'options=temporalValues' 
-d 'georel=near%3BmaxDistance==800' 
-d 'geometry=Point' 
-d 'coordinates=[13.364,52.52]' 
-d 'timerel=after' 
-d 'timeAt=2021-04-22T08:33:51.255Z' 
-d 'pageSize=2' 
-H 'NGSILD-Tenant: openiot' 
-H 'Link: <http://.../path-to-my-public-server/ngsi-context.jsonld>;
rel="http://www.w3.org/ns/json-ld#context"; type="application/ld+json"' 
-H 'Accept: application/json'
Temporal Values Response
13
[
{
"id": "urn:ngsi-ld:Device:pigcollar001",
"type": "Device",
"heartRate": {
"type": "Property",
"values": [
[ 61.0, "2021-04-26T08:55:56.100Z"]
...etc
]
},
"location": {
"type": "GeoProperty",
"values": [
[{"type": "Point", "coordinates": [13.355, 52.516, 0.0]},"2021-04-26T08:55:56.100Z"],
...etc
]
},
"controlledAsset": {
"type": "Relationship",
"objects": [
["urn:ngsi-ld:Animal:pig001", "2021-04-26T08:55:56.100Z"],
... etc
]
}
},
… etc
]
● The response holds an array of
attribute value-time stamp pairs for each
observed reading.
● Properties are held in values arrays,
Relationships use objects
NGSI-LD Language Maps
14
{
"id": "urn:ngsi-ld:Vehicle:A4567",
"type": "Vehicle",
"brandName": {
"type": "Property",
"value": "Mercedes"
},
"street": {
"type": "LanguageProperty",
"languageMap": {
"fr": "Grand Place",
"nl": "Grote Markt"
}
},
"isParked": {
"type": "Relationship",
"object": "urn:ngsi-ld:OffStreetParking:Downtown1",
"observedAt": "2017-07-29T12:00:04Z",
"providedBy": {
"type": "Relationship",
"object": "urn:ngsi-ld:Person:Bob"
}
}
}
NGSI-LD inherits concepts from JSON-LD
▪ NGSI-LD Entity id and Relationship object is
defined as a JSON-LD @id
@id is used to uniquely identify node objects that
are being described in the JSON-LD document
▪ NGSI-LD Entity type is defined as a JSON-LD
@type
@type is used to set the type of a node or the datatype of a
typed value
▪ NGSI-LD value is defined as an JSON-LD @value
@value is used to specify the data that is associated with
a particular property in the graph
JSON-LD also defines @language- used to specify the
language for a particular string value
▪ Each Property languageMap is defined as a
JSON-LD @language used for multi-language
support of simple string values
Park a car on the Street known as Grand
Place in French and Grote Markt in Dutch
lang follows the same rules as the Accept-Language Header
▪ lang="en" - English only
▪ lang="fr-CH,fr" - Either Swiss French or French
▪ lang="*" - Wildcard
▪ lang="fr-CH,fr;q=0.9,en;q=0.8,*;q=0.5"- Quality value ranking
Swiss French or French with no ranked preference, fallback to English as a second choice and finally fallback to
any other supported language.
Which street is urn:ngsi-ld:Vehicle:A4567 parked on? - return the name in French
Language Maps attributes can be retrieved as a value in a single language
using the lang parameter
15
curl -L -g -X GET
'http://localhost:1026/ngsi-ld/v1/entities/urn:ngsi-ld:Vehicle:A4567' 
-d 'attrs=street' 
-d 'lang=fr' 
-H 'Link: <http://.../path-to-my-public-server/ngsi-context.jsonld>;
rel="http://www.w3.org/ns/json-ld#context"; type="application/ld+json"' 
-H 'Accept: application/json'
{
"id": "urn:ngsi-ld:Vehicle:A4567",
"type": "Vehicle",
"street": {
"type": "Property",
"value": "Grand Place",
"lang": "fr",
}
}
Language Maps are limited to simple stings
16
{
"id": "urn:ngsi-ld:Event:bonjourLeMonde",
"type": "Event",
"name": {"type": "Property", "value": "Bonjour le Monde"
},
"description": {
"type": "Property",
"value": "«Bonjour le monde» sont les mots traditionnellement
écrits par un programme informatique simple"
},
"inLanguage": {"type": "Property", "value": "fr"},
"sameAs": [
{
"type": "Relationship", "datasetId": "urn:ngsi-ld:Relationship:1",
"object": "urn:ngsi-ld:Event:helloWorld",
"inLanguage": {"type": "Property", "value": "en"}
},
{
"type": "Relationship", "datasetId": "urn:ngsi-ld:Relationship:2",
"object": "urn:ngsi-ld:Event:halloWelt",
"inLanguage": {"type": "Property","value": "de"}
}
]
}
Well-defined properties, which already
have semantic meaning can be used
to internationalize complex entities
▪ schema.org/inLanguage
▪ schema.org/sameAs
This helps to keep the underlying data
models simple and facilitates reuse,
since not all data model users will need
internationalization
Expansion and Compaction
17
function translateRequest(req, res) {
const headers = req.headers;
headers.Accept = 'application/json';
const options = {
url: BASE_PATH + req.path,
method: req.method,
headers,
qs: req.query,
json: true
};
request(options)
.then(async function (cbResponse) {
cbResponse['@context'] = coreContext;
const expanded = await jsonld.expand(cbResponse);
const compacted = await jsonld.compact(expanded, alternate);
delete compacted['@context'];
return res.send(compacted);
})
.catch(function (err) {
return res.send(err);
});
}
Since NGSI-LD is an extended subset
of JSON-LD, you can use standard
JSON-LD libraries to perform
expansion and compaction operations.
Expansion and compaction can
operate on normalized or key-values
payloads
This could be used to support @vocab
elements as properties
Be careful, the resultant payload is
usually not valid NGSI-LD
NGSI-LD vs JSON-LD representations
18
{
"id": "urn:ngsi-ld:Building:store005",
"type": "Building",
"address": {
"type": "Property",
"value": {
"streetAddress": "Eisenacher Straße 98",
"addressRegion": "Berlin",
"addressLocality": "Marzahn",
"postalCode": "12685"
}
},
"location": {
"type": "GeoProperty",
"value": {
"type": "Point",
"coordinates": [13.5646, 52.5435]
}
},
"name": { "type": "Property", "value": "Yuusui-en" },
"category": {
"type": "Property", "value": "commercial"
}
}
{
"識別子": "urn:ngsi-ld:Building:store005",
"タイプ": "ビル",
"住所": {
"タイプ": "プロパティ",
"値": {
"addressLocality": "Marzahn",
"addressRegion": "Berlin",
"postalCode": "12685",
"streetAddress": "Eisenacher Straße 98"
}
},
"場所": {
"タイプ": "ジオプロパティ",
"値": {
"タイプ": "Point",
"座標": [13.5646, 52.5435]
}
},
"名前": { "タイプ": "プロパティ", "値": "Yuusui-en" },
"カテゴリー": {
"タイプ": "プロパティ", "値": "コマーシャル"
},
}
Context data is data for exchange. To facilitate data interchange, strings are always Unicode Strings,
Dates are always ISO 8601 dates etc. Data models shouldn’t hold additional formats unnecessarily. The
context provider and/or the receiver should be able to manipulate the payload themselves if necessary.
● Display opening and closing hours in French
● Sort street names in an accentless fashion in Spanish
● Accept alternate spellings (e.g. “ö” = “oe”) in German
If absolutely necessary use metadata properties-of-properties to describe and query the context data
new Intl.DateTimeFormat('new Intl.DateTimeFormat('fr-FR', { dateStyle: 'full', timeStyle: 'long' }).format(date)
fr-FR', { dateStyle: 'full', timeStyle: 'long' }).format(date)
Natural Language Collation Support
19
str.normalize("NFD").replace(/[u0300-u036f]/g, "").toLower()
or what context-brokers don’t do directly
new Intl.DateTimeFormat('fr-FR', { dateStyle: 'full', timeStyle: 'long' }).format(date)
/ngsi-ld/v1/entities/?type=Building&q=name.collate==%22schoene%20gruesse%22
str.toLower().replace('ö','oe').replace('ä','ae').replace('ü','ue').replace('ß','ss')
Context Entities hold a snapshot of the state of an entity representing a thing in the real world:
So how to:
● Store Images when there is no BLOB type
● Create short term predictions
● Create medium term predictions
Answer: don’t use a context broker for this. Use links to data storage, databases, actuations of external
services or chron-jobs where relevant. The real work is done by other microservices.
Remember : Context data is just data.
More context broker anti-patterns
20
or what context-brokers don’t do at all
When navigating the knowledge graph, only retrieve what
you really need:
● type - see also /types endpoint
● attrs - should be identifiable from the data model
● id - only guaranteed within a broker federation -
consider using an externally defined legalId Property
(or equivalent in use in your domain)
Each of these parameters can take a comma separated list. The short names for type and attrs
are defined using the @context
● Use simple JSON keyValues to minimize payloads internally
● Use full NGSI-LD normalized when initiating data exchange between clients
Filtering entity queries
21
let productsList = await ngsiLD.listEntities(
{
type: 'Shelf',
options: 'keyValues',
attrs: 'stocks,numberOfItems',
id: furniture.join(',')
},
headers
);
● equal - ==
● unequal - !=
● greater - >
● greaterEq - >=
● less - <
● lessEq - <=
● regex pattern - ~=
● not regex Pattern - !~=
● dots (range) - ..
● andOp - ;
● orOp - |
Filtering using the q parameter
22
?q=((speed>50|rpm>3000);brandName=="Mercedes")
?q=(temperature>=20;temperature<=25)|capacity<=10
?q=(temperature==20..25)|capacity<=10
?q=address[city]!="D%C3%BCsseldorf"
?q=temperature.observedAt>=2017-12-24T12:00:00Z
?q=category=="barn","farm_auxiliary"
● geometry - any supported GeoJSON type
● coordinates
● georel
○ near;maxDistance
○ near;minDistance
○ within
○ contains
○ intersects
○ equals
○ disjoint
○ overlaps
● geoproperty - Optional default is
location
The geoQ parameters
23
?georel=near;maxDistance==2000
&geometry=Point
&coordinates=[8,40]
&geoproperty=observationSpace
?georel=within&
geometry=Polygon&
coordinates=[[[100.0,0.0],[101.0,0.0],
[101.0,1.0],[100.0,1.0],[100.0,0.0]]]&
geoproperty=location
● timeAt - any DateTime
● endTimeAt - any DateTime
● timerel
○ before
○ after
○ between
● timeproperty - Optional default is
observedAt
The temporalQ parameters
24
?timerel=before&
timeAt=2020-04-13T14:20:00Z&
timeproperty=modifiedAt
?timerel=between&
timeAt=2021-04-26T09:00:00Z&
endTimeAt=2021-05-21T14:40:00Z&
timeproperty=observedAt
Imagine the following scenario:
● A farm has Pigs and Cows tracked with Animal Collars
● The veterinary practice holds status records for the same Pigs and Cows
● A weather service can provide detailed weather conditions for locations on the farm
Who are the data providers?
What data does the farmer own/purchase?
Which common data models should be used?
How to ensure data from other sources refers to the correct entity?
Connecting Data Providers
25
● Animal Data Model
https://github.com/smart-data-models/dataModel.Agrifood/tree/master/Animal
● Field Data Model
https://github.com/smart-data-models/dataModel.Agrifood/tree/master/AgriParcel
● Animal Collar Data Model
https://github.com/smart-data-models/dataModel.Device/tree/master/Device
● Weather Observed Data Model
https://github.com/smart-data-models/dataModel.Weather/tree/master/WeatherObserved
Farmer and Vet share Animal, WeatherObserved is used by the WeatherService
Data Models
26
27
{
"@context": "https://..path-to-context/ngsi-context.jsonld",
"id": "urn:ngsi-ld:Animal:cow006",
"type": "Animal",
"species": {"type": "Property", "value": "dairy cattle"},
"name": {"type": "Property", "value": "Twilight" },
"sex": {"type": "Property", "value": "female"},
"phenologicalCondition": {"type": "Property", "value": "femaleAdult"},
"reproductiveCondition": {"type": "Property", "value": "active"},
"legalID": {"type": "Property", "value": "F-cow006-Twilight" },
"heartRate": {
"type": "Property", "value": 52, "unitCode": "5K",
"observedAt": "2021-05-03T09:06:51.051Z",
"providedBy": {
"type": "Relationship",
"object": "urn:ngsi-ld:Device:cowCollar006"
}
},
"locatedAt": {"type": "Relationship", "object": "urn:ngsi-ld:AgriParcel:field001",
"weatherConditions": {
"weatherType": "Raining",
"temperature": 25,
... etc
}
},
"location": {
"type": "GeoProperty", "value": {"type": "Point", "coordinates": [13.41, 52.47]},
"observedAt": "2021-05-03T09:06:51.051Z",
"providedBy": {
"type": "Relationship",
"object": "urn:ngsi-ld:Device:cowCollar006"
}
}
}
Following the standard Animal
model:
id":"urn:ngsi-ld:Animal:cow006"
is unique to the Farmer’s system,
but not a globally shared identifier.
● legalId is a globally shared
between Farmer and Vet
● phenologicalCondition and
reproductiveCondition are
provided by Vet
● weatherConditions is a
property-of-a relationship copied
here for convenience. The
AgriParcel entity must hold
sufficient information to be able to
request the weather conditions.
28
curl -L -X POST 'http://localhost:1026/ngsi-ld/v1/subscriptions/' 
-H 'Content-Type: application/ld+json' 
-H 'NGSILD-Tenant: openiot' 
--data-raw '{
"description": "Notify me of Veterinary Requests",
"type": "Subscription",
"entities": [{"type": "Animal"}],
"watchedAttributes": ["filling"],
"notification": {
"attributes": ["legalId", "refreshVetData"],
"format": "keyValues",
"endpoint": {
"uri": "http://i4trust-app/veterinary-practice",
"accept": "application/json"
}
},
"@context": "https://..path-to-context/ngsi-context.jsonld"
}'
Subscribe to changes on an attribute to trigger
a refresh of data.
Ensure all relevant data is passed to the
subscription then make a GET request to the
Vet’s context broker.
Additional Business logic to manipulate
response (e.g. expansion/compaction) and
upsert the result back into the Farmer’s context
broker.
Option 1 - Provide a common agreed identifier such as legalId
curl -L -X PATCH 'http://localhost:1026/ngsi-ld/v1/entities/urn:ngsi-ld:Animal:cow006/attrs/refreshVetData' 
-H 'NGSILD-Tenant: openiot' 
-H 'Content-Type: application/json' 
-H 'Link: <https://..path-to-context/ngsi-context.jsonld>; rel="http://www.w3.org/ns/json-ld#context";
type="application/ld+json"' 
-d '{ "type": "Property", "value": "phenologicalCondition, reproductiveCondition"}'
29
{
"@context": "https://..path-to-context/ngsi-context.jsonld",
"id": "urn:ngsi-ld:AgriParcel:field001",
"type": "AgriParcel",
"location": { "type": "GeoProperty", "value": {
"type": "Polygon",
"coordinates": [[[100, 0], [101, 0],
[101, 1], [100, 1], [100, 0]]]
}
},
"area": { "type": "Property", "value": 200},
"description": { "type": "Property", "value": "Pasture”},
"category": { "type": "Property", "value": "grassland"},
"relatedSource": { "type": "Property", "value": [
{
"application": "urn:ngsi-ld:AgriApp:weather001",
"applicationEntityId": "app:ExternalWeatherStation"
}
]
},
"weatherConditions": { "type": "Property", "value": {
"weatherType": "Raining",
"temperature": 25,
... etc
}
"observedAt": "2021-05-03T09:06:51.051Z",
"providedBy": {
"type": "Relationship",
"object": "urn:ngsi-ld:AgriApp:weather001"
}
}
}
Following the standard AgriParcel model:
id":"urn:ngsi-ld:AgriParcel:field001" is
unique to the Farmer’s system, but not a
globally shared identifier.
The relatedSource attribute holds the
Weather Station identifier within the external
System
Additional weatherConditions attribute
within AgriParcel. This is able to hold
additional information which is not required on
each of the Animal entities.
Option 2 - use relatedSource
for linking to External Applications
30
curl -L -X PATCH 'http://localhost:4041/ngsi-ld/v1/entities/urn:ngsi-ld:AgriApp:weather001/attrs/update' 
-H 'NGSILD-Tenant: openiot' 
-H 'Content-Type: application/json' 
-H 'Link: <https://..path-to-context/ngsi-context.jsonld>; rel="http://www.w3.org/ns/json-ld#context";
type="application/ld+json"' 
-d '{ "type": "Property", "value": " " }'
Subscribe to changes on an attribute to trigger
a refresh of data.
Ensure all relevant data is passed to the
subscription then make a GET request to the
Weather provider’s context broker.
Additional Business logic to cascade batch
upsert the result back into the Farmer’s context
broker AgriParcel and Animal entities
Connecting to External Data Providers
curl -L -X POST 'http://localhost:1026/ngsi-ld/v1/subscriptions/' 
-H 'Content-Type: application/ld+json' 
-H 'NGSILD-Tenant: openiot' 
--data-raw '{
"description": "Notify me of Weather Requests",
"type": "Subscription",
"entities": [{"type": "Weather"}],
"watchedAttributes": ["update"],
"notification": {
"format": "keyValues",
"endpoint": {
"uri": "http://i4trust-app/weather-provider",
"accept": "application/json"
}
},
"@context": "https://..path-to-context/ngsi-context.jsonld"
}'
Strictly speaking, Animal shouldn’t have weatherConditions at all.
You can navigate the knowledge graph based on the locatedAt relationship
But what if you want to determine do cows lie down in the rain?
● Each cow can be moved to a separate field at different times.
● Each field could experience different weather conditions.
The data may be duplicated for ease of calculations but:
● More data storage required
● Potential reduction in interoperability - reuse common attribute names.
Usable or Ontologically Correct?
31
● A Push Model is typically used by Devices connected IoT Agents
POST /ngsi-ld/v1/entityOperations/upsert/
● Registration may be used for either federated environments or actuations but not both
● Subscriptions can also be used for actuation
Note that true federation implies a greater degree of trust than i4Trust
Upsert, Registration or Subscription
32
Thank you!
i4Trust has received funding from the European Union’s Horizon 2020
research and innovation programme under the Grant Agreement no 951975.
18

Weitere ähnliche Inhalte

Was ist angesagt?

Creating a Context-Aware solution, Complex Event Processing with FIWARE Perseo
Creating a Context-Aware solution, Complex Event Processing with FIWARE PerseoCreating a Context-Aware solution, Complex Event Processing with FIWARE Perseo
Creating a Context-Aware solution, Complex Event Processing with FIWARE PerseoFernando Lopez Aguilar
 
Actuation, Federation and Interoperability of Context Brokers
Actuation, Federation and Interoperability of Context BrokersActuation, Federation and Interoperability of Context Brokers
Actuation, Federation and Interoperability of Context BrokersFIWARE
 
FIWARE Wednesday Webinars - Introduction to NGSI-LD
FIWARE Wednesday Webinars - Introduction to NGSI-LDFIWARE Wednesday Webinars - Introduction to NGSI-LD
FIWARE Wednesday Webinars - Introduction to NGSI-LDFIWARE
 
FIWARE Global Summit - The Scorpio NGSI-LD Broker: Features and Supported Arc...
FIWARE Global Summit - The Scorpio NGSI-LD Broker: Features and Supported Arc...FIWARE Global Summit - The Scorpio NGSI-LD Broker: Features and Supported Arc...
FIWARE Global Summit - The Scorpio NGSI-LD Broker: Features and Supported Arc...FIWARE
 
NGSIv1 を知っている開発者向けの NGSIv2 の概要 (Orion 1.13.0対応)
NGSIv1 を知っている開発者向けの NGSIv2 の概要 (Orion 1.13.0対応)NGSIv1 を知っている開発者向けの NGSIv2 の概要 (Orion 1.13.0対応)
NGSIv1 を知っている開発者向けの NGSIv2 の概要 (Orion 1.13.0対応)fisuda
 
FIWARE Training: FIWARE Training: i4Trust Marketplace
FIWARE Training: FIWARE Training: i4Trust MarketplaceFIWARE Training: FIWARE Training: i4Trust Marketplace
FIWARE Training: FIWARE Training: i4Trust MarketplaceFIWARE
 
FIWARE Global Summit - NGSI-LD – an Evolution from NGSIv2
FIWARE Global Summit - NGSI-LD – an Evolution from NGSIv2FIWARE Global Summit - NGSI-LD – an Evolution from NGSIv2
FIWARE Global Summit - NGSI-LD – an Evolution from NGSIv2FIWARE
 
FIWARE Wednesday Webinars - How to Design DataModels
FIWARE Wednesday Webinars - How to Design DataModelsFIWARE Wednesday Webinars - How to Design DataModels
FIWARE Wednesday Webinars - How to Design DataModelsFIWARE
 
Session 1 - Introduction to i4Trust Data Spaces, building blocks, and roles |...
Session 1 - Introduction to i4Trust Data Spaces, building blocks, and roles |...Session 1 - Introduction to i4Trust Data Spaces, building blocks, and roles |...
Session 1 - Introduction to i4Trust Data Spaces, building blocks, and roles |...FIWARE
 
FIWARE Training: NGSI-LD Introduction
FIWARE Training: NGSI-LD IntroductionFIWARE Training: NGSI-LD Introduction
FIWARE Training: NGSI-LD IntroductionFIWARE
 
Orion Context Broker NGSI-v2 Overview for Developers That Already Know NGSI-v...
Orion Context Broker NGSI-v2 Overview for Developers That Already Know NGSI-v...Orion Context Broker NGSI-v2 Overview for Developers That Already Know NGSI-v...
Orion Context Broker NGSI-v2 Overview for Developers That Already Know NGSI-v...Fermin Galan
 
Big Data and Machine Learning with FIWARE
Big Data and Machine Learning with FIWAREBig Data and Machine Learning with FIWARE
Big Data and Machine Learning with FIWAREFernando Lopez Aguilar
 
FIWARE Training: API Umbrella
FIWARE Training: API UmbrellaFIWARE Training: API Umbrella
FIWARE Training: API UmbrellaFIWARE
 
i4Trust IAM Components
i4Trust IAM Componentsi4Trust IAM Components
i4Trust IAM ComponentsFIWARE
 
Integrating Fiware Orion, Keyrock and Wilma
Integrating Fiware Orion, Keyrock and WilmaIntegrating Fiware Orion, Keyrock and Wilma
Integrating Fiware Orion, Keyrock and WilmaDalton Valadares
 
JSON-LD for RESTful services
JSON-LD for RESTful servicesJSON-LD for RESTful services
JSON-LD for RESTful servicesMarkus Lanthaler
 
FIWARE: Managing Context Information at large scale
FIWARE: Managing Context Information at large scaleFIWARE: Managing Context Information at large scale
FIWARE: Managing Context Information at large scaleFermin Galan
 
FIWARE Wednesday Webinars - How to Secure FIWARE Architectures
FIWARE Wednesday Webinars - How to Secure FIWARE ArchitecturesFIWARE Wednesday Webinars - How to Secure FIWARE Architectures
FIWARE Wednesday Webinars - How to Secure FIWARE ArchitecturesFIWARE
 
Kong, Keyrock, Keycloak, i4Trust - Options to Secure FIWARE in Production
Kong, Keyrock, Keycloak, i4Trust - Options to Secure FIWARE in ProductionKong, Keyrock, Keycloak, i4Trust - Options to Secure FIWARE in Production
Kong, Keyrock, Keycloak, i4Trust - Options to Secure FIWARE in ProductionFIWARE
 

Was ist angesagt? (20)

Creating a Context-Aware solution, Complex Event Processing with FIWARE Perseo
Creating a Context-Aware solution, Complex Event Processing with FIWARE PerseoCreating a Context-Aware solution, Complex Event Processing with FIWARE Perseo
Creating a Context-Aware solution, Complex Event Processing with FIWARE Perseo
 
Actuation, Federation and Interoperability of Context Brokers
Actuation, Federation and Interoperability of Context BrokersActuation, Federation and Interoperability of Context Brokers
Actuation, Federation and Interoperability of Context Brokers
 
FIWARE Wednesday Webinars - Introduction to NGSI-LD
FIWARE Wednesday Webinars - Introduction to NGSI-LDFIWARE Wednesday Webinars - Introduction to NGSI-LD
FIWARE Wednesday Webinars - Introduction to NGSI-LD
 
FIWARE Global Summit - The Scorpio NGSI-LD Broker: Features and Supported Arc...
FIWARE Global Summit - The Scorpio NGSI-LD Broker: Features and Supported Arc...FIWARE Global Summit - The Scorpio NGSI-LD Broker: Features and Supported Arc...
FIWARE Global Summit - The Scorpio NGSI-LD Broker: Features and Supported Arc...
 
NGSIv1 を知っている開発者向けの NGSIv2 の概要 (Orion 1.13.0対応)
NGSIv1 を知っている開発者向けの NGSIv2 の概要 (Orion 1.13.0対応)NGSIv1 を知っている開発者向けの NGSIv2 の概要 (Orion 1.13.0対応)
NGSIv1 を知っている開発者向けの NGSIv2 の概要 (Orion 1.13.0対応)
 
Data Modeling with NGSI, NGSI-LD
Data Modeling with NGSI, NGSI-LDData Modeling with NGSI, NGSI-LD
Data Modeling with NGSI, NGSI-LD
 
FIWARE Training: FIWARE Training: i4Trust Marketplace
FIWARE Training: FIWARE Training: i4Trust MarketplaceFIWARE Training: FIWARE Training: i4Trust Marketplace
FIWARE Training: FIWARE Training: i4Trust Marketplace
 
FIWARE Global Summit - NGSI-LD – an Evolution from NGSIv2
FIWARE Global Summit - NGSI-LD – an Evolution from NGSIv2FIWARE Global Summit - NGSI-LD – an Evolution from NGSIv2
FIWARE Global Summit - NGSI-LD – an Evolution from NGSIv2
 
FIWARE Wednesday Webinars - How to Design DataModels
FIWARE Wednesday Webinars - How to Design DataModelsFIWARE Wednesday Webinars - How to Design DataModels
FIWARE Wednesday Webinars - How to Design DataModels
 
Session 1 - Introduction to i4Trust Data Spaces, building blocks, and roles |...
Session 1 - Introduction to i4Trust Data Spaces, building blocks, and roles |...Session 1 - Introduction to i4Trust Data Spaces, building blocks, and roles |...
Session 1 - Introduction to i4Trust Data Spaces, building blocks, and roles |...
 
FIWARE Training: NGSI-LD Introduction
FIWARE Training: NGSI-LD IntroductionFIWARE Training: NGSI-LD Introduction
FIWARE Training: NGSI-LD Introduction
 
Orion Context Broker NGSI-v2 Overview for Developers That Already Know NGSI-v...
Orion Context Broker NGSI-v2 Overview for Developers That Already Know NGSI-v...Orion Context Broker NGSI-v2 Overview for Developers That Already Know NGSI-v...
Orion Context Broker NGSI-v2 Overview for Developers That Already Know NGSI-v...
 
Big Data and Machine Learning with FIWARE
Big Data and Machine Learning with FIWAREBig Data and Machine Learning with FIWARE
Big Data and Machine Learning with FIWARE
 
FIWARE Training: API Umbrella
FIWARE Training: API UmbrellaFIWARE Training: API Umbrella
FIWARE Training: API Umbrella
 
i4Trust IAM Components
i4Trust IAM Componentsi4Trust IAM Components
i4Trust IAM Components
 
Integrating Fiware Orion, Keyrock and Wilma
Integrating Fiware Orion, Keyrock and WilmaIntegrating Fiware Orion, Keyrock and Wilma
Integrating Fiware Orion, Keyrock and Wilma
 
JSON-LD for RESTful services
JSON-LD for RESTful servicesJSON-LD for RESTful services
JSON-LD for RESTful services
 
FIWARE: Managing Context Information at large scale
FIWARE: Managing Context Information at large scaleFIWARE: Managing Context Information at large scale
FIWARE: Managing Context Information at large scale
 
FIWARE Wednesday Webinars - How to Secure FIWARE Architectures
FIWARE Wednesday Webinars - How to Secure FIWARE ArchitecturesFIWARE Wednesday Webinars - How to Secure FIWARE Architectures
FIWARE Wednesday Webinars - How to Secure FIWARE Architectures
 
Kong, Keyrock, Keycloak, i4Trust - Options to Secure FIWARE in Production
Kong, Keyrock, Keycloak, i4Trust - Options to Secure FIWARE in ProductionKong, Keyrock, Keycloak, i4Trust - Options to Secure FIWARE in Production
Kong, Keyrock, Keycloak, i4Trust - Options to Secure FIWARE in Production
 

Ähnlich wie Session 5 - NGSI-LD Advanced Operations | Train the Trainers Program

NGSI-LD Advanced Operations
NGSI-LD Advanced OperationsNGSI-LD Advanced Operations
NGSI-LD Advanced OperationsFIWARE
 
Orion Context Broker NGSIv2 Overview for Developers That Already Know NGSIv1 ...
Orion Context Broker NGSIv2 Overview for Developers That Already Know NGSIv1 ...Orion Context Broker NGSIv2 Overview for Developers That Already Know NGSIv1 ...
Orion Context Broker NGSIv2 Overview for Developers That Already Know NGSIv1 ...Fermin Galan
 
Orion Context Broker NGSIv2 Overview for Developers That Already Know NGSIv1 ...
Orion Context Broker NGSIv2 Overview for Developers That Already Know NGSIv1 ...Orion Context Broker NGSIv2 Overview for Developers That Already Know NGSIv1 ...
Orion Context Broker NGSIv2 Overview for Developers That Already Know NGSIv1 ...Fermin Galan
 
Orion Context Broker NGSI-v2 Overview for Developers That Already Know Ngsi-v...
Orion Context Broker NGSI-v2 Overview for Developers That Already Know Ngsi-v...Orion Context Broker NGSI-v2 Overview for Developers That Already Know Ngsi-v...
Orion Context Broker NGSI-v2 Overview for Developers That Already Know Ngsi-v...Fermin Galan
 
Null Bachaav - May 07 Attack Monitoring workshop.
Null Bachaav - May 07 Attack Monitoring workshop.Null Bachaav - May 07 Attack Monitoring workshop.
Null Bachaav - May 07 Attack Monitoring workshop.Prajal Kulkarni
 
Orion contextbroker ngs-iv2-overview-for-developers-that-already-know-ngsiv1-...
Orion contextbroker ngs-iv2-overview-for-developers-that-already-know-ngsiv1-...Orion contextbroker ngs-iv2-overview-for-developers-that-already-know-ngsiv1-...
Orion contextbroker ngs-iv2-overview-for-developers-that-already-know-ngsiv1-...Fermin Galan
 
ngsiv2-overview-for-developers-that-already-know-ngsiv1-20190214
ngsiv2-overview-for-developers-that-already-know-ngsiv1-20190214ngsiv2-overview-for-developers-that-already-know-ngsiv1-20190214
ngsiv2-overview-for-developers-that-already-know-ngsiv1-20190214Fermin Galan
 
NGSIv2 Overview for Developers That Already Know NGSIv1 20180928
NGSIv2 Overview for Developers That Already Know NGSIv1 20180928NGSIv2 Overview for Developers That Already Know NGSIv1 20180928
NGSIv2 Overview for Developers That Already Know NGSIv1 20180928Fermin Galan
 
Orion Context Broker NGSI-v2 Overview for Developers That Already Know Ngsi-v...
Orion Context Broker NGSI-v2 Overview for Developers That Already Know Ngsi-v...Orion Context Broker NGSI-v2 Overview for Developers That Already Know Ngsi-v...
Orion Context Broker NGSI-v2 Overview for Developers That Already Know Ngsi-v...Fermin Galan
 
NGSIv2 Overview for Developers That Already Know NGSIv1 20181218
NGSIv2 Overview for Developers That Already Know NGSIv1 20181218NGSIv2 Overview for Developers That Already Know NGSIv1 20181218
NGSIv2 Overview for Developers That Already Know NGSIv1 20181218Fermin Galan
 
Orion Context Broker NGSI-v2 Overview for Developers That Already Know NGSI-v...
Orion Context Broker NGSI-v2 Overview for Developers That Already Know NGSI-v...Orion Context Broker NGSI-v2 Overview for Developers That Already Know NGSI-v...
Orion Context Broker NGSI-v2 Overview for Developers That Already Know NGSI-v...Fermin Galan
 
Philipp Krenn "Elasticsearch (R)Evolution — You Know, for Search…"
Philipp Krenn "Elasticsearch (R)Evolution — You Know, for Search…"Philipp Krenn "Elasticsearch (R)Evolution — You Know, for Search…"
Philipp Krenn "Elasticsearch (R)Evolution — You Know, for Search…"Fwdays
 
NGSI-LD Introduction
NGSI-LD IntroductionNGSI-LD Introduction
NGSI-LD IntroductionFIWARE
 
Anwendungsfaelle für Elasticsearch
Anwendungsfaelle für ElasticsearchAnwendungsfaelle für Elasticsearch
Anwendungsfaelle für ElasticsearchFlorian Hopf
 
FIWARE Training: NGSI-LD Concise Payloads and Merge-Patch Operations
FIWARE Training: NGSI-LD Concise Payloads and Merge-Patch OperationsFIWARE Training: NGSI-LD Concise Payloads and Merge-Patch Operations
FIWARE Training: NGSI-LD Concise Payloads and Merge-Patch OperationsFIWARE
 
NGSI-LD Concise Payloads and Merge-Patch Operations
NGSI-LD Concise Payloads and Merge-Patch OperationsNGSI-LD Concise Payloads and Merge-Patch Operations
NGSI-LD Concise Payloads and Merge-Patch OperationsFIWARE
 
Events Processing and Data Analysis with Lucidworks Fusion: Presented by Kira...
Events Processing and Data Analysis with Lucidworks Fusion: Presented by Kira...Events Processing and Data Analysis with Lucidworks Fusion: Presented by Kira...
Events Processing and Data Analysis with Lucidworks Fusion: Presented by Kira...Lucidworks
 
Agile Testing Days 2018 - API Fundamentals - postman collection
Agile Testing Days 2018 - API Fundamentals - postman collectionAgile Testing Days 2018 - API Fundamentals - postman collection
Agile Testing Days 2018 - API Fundamentals - postman collectionJoEllen Carter
 

Ähnlich wie Session 5 - NGSI-LD Advanced Operations | Train the Trainers Program (20)

NGSI-LD Advanced Operations
NGSI-LD Advanced OperationsNGSI-LD Advanced Operations
NGSI-LD Advanced Operations
 
Orion Context Broker NGSIv2 Overview for Developers That Already Know NGSIv1 ...
Orion Context Broker NGSIv2 Overview for Developers That Already Know NGSIv1 ...Orion Context Broker NGSIv2 Overview for Developers That Already Know NGSIv1 ...
Orion Context Broker NGSIv2 Overview for Developers That Already Know NGSIv1 ...
 
Orion Context Broker NGSIv2 Overview for Developers That Already Know NGSIv1 ...
Orion Context Broker NGSIv2 Overview for Developers That Already Know NGSIv1 ...Orion Context Broker NGSIv2 Overview for Developers That Already Know NGSIv1 ...
Orion Context Broker NGSIv2 Overview for Developers That Already Know NGSIv1 ...
 
Orion Context Broker NGSI-v2 Overview for Developers That Already Know Ngsi-v...
Orion Context Broker NGSI-v2 Overview for Developers That Already Know Ngsi-v...Orion Context Broker NGSI-v2 Overview for Developers That Already Know Ngsi-v...
Orion Context Broker NGSI-v2 Overview for Developers That Already Know Ngsi-v...
 
Null Bachaav - May 07 Attack Monitoring workshop.
Null Bachaav - May 07 Attack Monitoring workshop.Null Bachaav - May 07 Attack Monitoring workshop.
Null Bachaav - May 07 Attack Monitoring workshop.
 
Orion contextbroker ngs-iv2-overview-for-developers-that-already-know-ngsiv1-...
Orion contextbroker ngs-iv2-overview-for-developers-that-already-know-ngsiv1-...Orion contextbroker ngs-iv2-overview-for-developers-that-already-know-ngsiv1-...
Orion contextbroker ngs-iv2-overview-for-developers-that-already-know-ngsiv1-...
 
ngsiv2-overview-for-developers-that-already-know-ngsiv1-20190214
ngsiv2-overview-for-developers-that-already-know-ngsiv1-20190214ngsiv2-overview-for-developers-that-already-know-ngsiv1-20190214
ngsiv2-overview-for-developers-that-already-know-ngsiv1-20190214
 
NGSIv2 Overview for Developers That Already Know NGSIv1 20180928
NGSIv2 Overview for Developers That Already Know NGSIv1 20180928NGSIv2 Overview for Developers That Already Know NGSIv1 20180928
NGSIv2 Overview for Developers That Already Know NGSIv1 20180928
 
Orion Context Broker NGSI-v2 Overview for Developers That Already Know Ngsi-v...
Orion Context Broker NGSI-v2 Overview for Developers That Already Know Ngsi-v...Orion Context Broker NGSI-v2 Overview for Developers That Already Know Ngsi-v...
Orion Context Broker NGSI-v2 Overview for Developers That Already Know Ngsi-v...
 
NGSIv2 Overview for Developers That Already Know NGSIv1 20181218
NGSIv2 Overview for Developers That Already Know NGSIv1 20181218NGSIv2 Overview for Developers That Already Know NGSIv1 20181218
NGSIv2 Overview for Developers That Already Know NGSIv1 20181218
 
Orion Context Broker NGSI-v2 Overview for Developers That Already Know NGSI-v...
Orion Context Broker NGSI-v2 Overview for Developers That Already Know NGSI-v...Orion Context Broker NGSI-v2 Overview for Developers That Already Know NGSI-v...
Orion Context Broker NGSI-v2 Overview for Developers That Already Know NGSI-v...
 
Philipp Krenn "Elasticsearch (R)Evolution — You Know, for Search…"
Philipp Krenn "Elasticsearch (R)Evolution — You Know, for Search…"Philipp Krenn "Elasticsearch (R)Evolution — You Know, for Search…"
Philipp Krenn "Elasticsearch (R)Evolution — You Know, for Search…"
 
NGSI-LD Introduction
NGSI-LD IntroductionNGSI-LD Introduction
NGSI-LD Introduction
 
Anwendungsfaelle für Elasticsearch
Anwendungsfaelle für ElasticsearchAnwendungsfaelle für Elasticsearch
Anwendungsfaelle für Elasticsearch
 
FIWARE Training: NGSI-LD Concise Payloads and Merge-Patch Operations
FIWARE Training: NGSI-LD Concise Payloads and Merge-Patch OperationsFIWARE Training: NGSI-LD Concise Payloads and Merge-Patch Operations
FIWARE Training: NGSI-LD Concise Payloads and Merge-Patch Operations
 
NGSI-LD Concise Payloads and Merge-Patch Operations
NGSI-LD Concise Payloads and Merge-Patch OperationsNGSI-LD Concise Payloads and Merge-Patch Operations
NGSI-LD Concise Payloads and Merge-Patch Operations
 
Events Processing and Data Analysis with Lucidworks Fusion: Presented by Kira...
Events Processing and Data Analysis with Lucidworks Fusion: Presented by Kira...Events Processing and Data Analysis with Lucidworks Fusion: Presented by Kira...
Events Processing and Data Analysis with Lucidworks Fusion: Presented by Kira...
 
WebXR if X = how?
WebXR if X = how?WebXR if X = how?
WebXR if X = how?
 
Agile Testing Days 2018 - API Fundamentals - postman collection
Agile Testing Days 2018 - API Fundamentals - postman collectionAgile Testing Days 2018 - API Fundamentals - postman collection
Agile Testing Days 2018 - API Fundamentals - postman collection
 
Elastic Search
Elastic SearchElastic Search
Elastic Search
 

Mehr von FIWARE

Behm_Herne_NeMo_akt.pptx
Behm_Herne_NeMo_akt.pptxBehm_Herne_NeMo_akt.pptx
Behm_Herne_NeMo_akt.pptxFIWARE
 
Katharina Hogrebe Herne Digital Days.pdf
 Katharina Hogrebe Herne Digital Days.pdf Katharina Hogrebe Herne Digital Days.pdf
Katharina Hogrebe Herne Digital Days.pdfFIWARE
 
Christoph Mertens_IDSA_Introduction to Data Spaces.pptx
Christoph Mertens_IDSA_Introduction to Data Spaces.pptxChristoph Mertens_IDSA_Introduction to Data Spaces.pptx
Christoph Mertens_IDSA_Introduction to Data Spaces.pptxFIWARE
 
Behm_Herne_NeMo.pptx
Behm_Herne_NeMo.pptxBehm_Herne_NeMo.pptx
Behm_Herne_NeMo.pptxFIWARE
 
Evangelists + iHubs Promo Slides.pptx
Evangelists + iHubs Promo Slides.pptxEvangelists + iHubs Promo Slides.pptx
Evangelists + iHubs Promo Slides.pptxFIWARE
 
Lukas Künzel Smart City Operating System.pptx
Lukas Künzel Smart City Operating System.pptxLukas Künzel Smart City Operating System.pptx
Lukas Künzel Smart City Operating System.pptxFIWARE
 
Pierre Golz Der Transformationsprozess im Konzern Stadt.pptx
Pierre Golz Der Transformationsprozess im Konzern Stadt.pptxPierre Golz Der Transformationsprozess im Konzern Stadt.pptx
Pierre Golz Der Transformationsprozess im Konzern Stadt.pptxFIWARE
 
Dennis Wendland_The i4Trust Collaboration Programme.pptx
Dennis Wendland_The i4Trust Collaboration Programme.pptxDennis Wendland_The i4Trust Collaboration Programme.pptx
Dennis Wendland_The i4Trust Collaboration Programme.pptxFIWARE
 
Ulrich Ahle_FIWARE.pptx
Ulrich Ahle_FIWARE.pptxUlrich Ahle_FIWARE.pptx
Ulrich Ahle_FIWARE.pptxFIWARE
 
Aleksandar Vrglevski _FIWARE DACH_OSIH.pptx
Aleksandar Vrglevski _FIWARE DACH_OSIH.pptxAleksandar Vrglevski _FIWARE DACH_OSIH.pptx
Aleksandar Vrglevski _FIWARE DACH_OSIH.pptxFIWARE
 
Water Quality - Lukas Kuenzel.pdf
Water Quality - Lukas Kuenzel.pdfWater Quality - Lukas Kuenzel.pdf
Water Quality - Lukas Kuenzel.pdfFIWARE
 
Cameron Brooks_FGS23_FIWARE Summit_Keynote_Cameron.pptx
Cameron Brooks_FGS23_FIWARE Summit_Keynote_Cameron.pptxCameron Brooks_FGS23_FIWARE Summit_Keynote_Cameron.pptx
Cameron Brooks_FGS23_FIWARE Summit_Keynote_Cameron.pptxFIWARE
 
FiWareSummit.msGIS-Data-to-Value.2023.06.12.pptx
FiWareSummit.msGIS-Data-to-Value.2023.06.12.pptxFiWareSummit.msGIS-Data-to-Value.2023.06.12.pptx
FiWareSummit.msGIS-Data-to-Value.2023.06.12.pptxFIWARE
 
Boris Otto_FGS2023_Opening- EU Innovations from Data_PUB_V1_BOt.pptx
Boris Otto_FGS2023_Opening- EU Innovations from Data_PUB_V1_BOt.pptxBoris Otto_FGS2023_Opening- EU Innovations from Data_PUB_V1_BOt.pptx
Boris Otto_FGS2023_Opening- EU Innovations from Data_PUB_V1_BOt.pptxFIWARE
 
Bjoern de Vidts_FGS23_Opening_athumi - bjord de vidts - personal data spaces....
Bjoern de Vidts_FGS23_Opening_athumi - bjord de vidts - personal data spaces....Bjoern de Vidts_FGS23_Opening_athumi - bjord de vidts - personal data spaces....
Bjoern de Vidts_FGS23_Opening_athumi - bjord de vidts - personal data spaces....FIWARE
 
Abdulrahman Ibrahim_FGS23 Opening - Abdulrahman Ibrahim.pdf
Abdulrahman Ibrahim_FGS23 Opening - Abdulrahman Ibrahim.pdfAbdulrahman Ibrahim_FGS23 Opening - Abdulrahman Ibrahim.pdf
Abdulrahman Ibrahim_FGS23 Opening - Abdulrahman Ibrahim.pdfFIWARE
 
FGS2023_Opening_Red Hat Keynote Andrea Battaglia.pdf
FGS2023_Opening_Red Hat Keynote Andrea Battaglia.pdfFGS2023_Opening_Red Hat Keynote Andrea Battaglia.pdf
FGS2023_Opening_Red Hat Keynote Andrea Battaglia.pdfFIWARE
 
HTAG_Skalierung_Plattform_lokal_final_versand.pptx
HTAG_Skalierung_Plattform_lokal_final_versand.pptxHTAG_Skalierung_Plattform_lokal_final_versand.pptx
HTAG_Skalierung_Plattform_lokal_final_versand.pptxFIWARE
 
WE_LoRaWAN _ IoT.pptx
WE_LoRaWAN  _ IoT.pptxWE_LoRaWAN  _ IoT.pptx
WE_LoRaWAN _ IoT.pptxFIWARE
 
EU Opp_Clara Pezuela - German chapter.pptx
EU Opp_Clara Pezuela - German chapter.pptxEU Opp_Clara Pezuela - German chapter.pptx
EU Opp_Clara Pezuela - German chapter.pptxFIWARE
 

Mehr von FIWARE (20)

Behm_Herne_NeMo_akt.pptx
Behm_Herne_NeMo_akt.pptxBehm_Herne_NeMo_akt.pptx
Behm_Herne_NeMo_akt.pptx
 
Katharina Hogrebe Herne Digital Days.pdf
 Katharina Hogrebe Herne Digital Days.pdf Katharina Hogrebe Herne Digital Days.pdf
Katharina Hogrebe Herne Digital Days.pdf
 
Christoph Mertens_IDSA_Introduction to Data Spaces.pptx
Christoph Mertens_IDSA_Introduction to Data Spaces.pptxChristoph Mertens_IDSA_Introduction to Data Spaces.pptx
Christoph Mertens_IDSA_Introduction to Data Spaces.pptx
 
Behm_Herne_NeMo.pptx
Behm_Herne_NeMo.pptxBehm_Herne_NeMo.pptx
Behm_Herne_NeMo.pptx
 
Evangelists + iHubs Promo Slides.pptx
Evangelists + iHubs Promo Slides.pptxEvangelists + iHubs Promo Slides.pptx
Evangelists + iHubs Promo Slides.pptx
 
Lukas Künzel Smart City Operating System.pptx
Lukas Künzel Smart City Operating System.pptxLukas Künzel Smart City Operating System.pptx
Lukas Künzel Smart City Operating System.pptx
 
Pierre Golz Der Transformationsprozess im Konzern Stadt.pptx
Pierre Golz Der Transformationsprozess im Konzern Stadt.pptxPierre Golz Der Transformationsprozess im Konzern Stadt.pptx
Pierre Golz Der Transformationsprozess im Konzern Stadt.pptx
 
Dennis Wendland_The i4Trust Collaboration Programme.pptx
Dennis Wendland_The i4Trust Collaboration Programme.pptxDennis Wendland_The i4Trust Collaboration Programme.pptx
Dennis Wendland_The i4Trust Collaboration Programme.pptx
 
Ulrich Ahle_FIWARE.pptx
Ulrich Ahle_FIWARE.pptxUlrich Ahle_FIWARE.pptx
Ulrich Ahle_FIWARE.pptx
 
Aleksandar Vrglevski _FIWARE DACH_OSIH.pptx
Aleksandar Vrglevski _FIWARE DACH_OSIH.pptxAleksandar Vrglevski _FIWARE DACH_OSIH.pptx
Aleksandar Vrglevski _FIWARE DACH_OSIH.pptx
 
Water Quality - Lukas Kuenzel.pdf
Water Quality - Lukas Kuenzel.pdfWater Quality - Lukas Kuenzel.pdf
Water Quality - Lukas Kuenzel.pdf
 
Cameron Brooks_FGS23_FIWARE Summit_Keynote_Cameron.pptx
Cameron Brooks_FGS23_FIWARE Summit_Keynote_Cameron.pptxCameron Brooks_FGS23_FIWARE Summit_Keynote_Cameron.pptx
Cameron Brooks_FGS23_FIWARE Summit_Keynote_Cameron.pptx
 
FiWareSummit.msGIS-Data-to-Value.2023.06.12.pptx
FiWareSummit.msGIS-Data-to-Value.2023.06.12.pptxFiWareSummit.msGIS-Data-to-Value.2023.06.12.pptx
FiWareSummit.msGIS-Data-to-Value.2023.06.12.pptx
 
Boris Otto_FGS2023_Opening- EU Innovations from Data_PUB_V1_BOt.pptx
Boris Otto_FGS2023_Opening- EU Innovations from Data_PUB_V1_BOt.pptxBoris Otto_FGS2023_Opening- EU Innovations from Data_PUB_V1_BOt.pptx
Boris Otto_FGS2023_Opening- EU Innovations from Data_PUB_V1_BOt.pptx
 
Bjoern de Vidts_FGS23_Opening_athumi - bjord de vidts - personal data spaces....
Bjoern de Vidts_FGS23_Opening_athumi - bjord de vidts - personal data spaces....Bjoern de Vidts_FGS23_Opening_athumi - bjord de vidts - personal data spaces....
Bjoern de Vidts_FGS23_Opening_athumi - bjord de vidts - personal data spaces....
 
Abdulrahman Ibrahim_FGS23 Opening - Abdulrahman Ibrahim.pdf
Abdulrahman Ibrahim_FGS23 Opening - Abdulrahman Ibrahim.pdfAbdulrahman Ibrahim_FGS23 Opening - Abdulrahman Ibrahim.pdf
Abdulrahman Ibrahim_FGS23 Opening - Abdulrahman Ibrahim.pdf
 
FGS2023_Opening_Red Hat Keynote Andrea Battaglia.pdf
FGS2023_Opening_Red Hat Keynote Andrea Battaglia.pdfFGS2023_Opening_Red Hat Keynote Andrea Battaglia.pdf
FGS2023_Opening_Red Hat Keynote Andrea Battaglia.pdf
 
HTAG_Skalierung_Plattform_lokal_final_versand.pptx
HTAG_Skalierung_Plattform_lokal_final_versand.pptxHTAG_Skalierung_Plattform_lokal_final_versand.pptx
HTAG_Skalierung_Plattform_lokal_final_versand.pptx
 
WE_LoRaWAN _ IoT.pptx
WE_LoRaWAN  _ IoT.pptxWE_LoRaWAN  _ IoT.pptx
WE_LoRaWAN _ IoT.pptx
 
EU Opp_Clara Pezuela - German chapter.pptx
EU Opp_Clara Pezuela - German chapter.pptxEU Opp_Clara Pezuela - German chapter.pptx
EU Opp_Clara Pezuela - German chapter.pptx
 

Kürzlich hochgeladen

presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MIND CTI
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...apidays
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...apidays
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAndrey Devyatkin
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...DianaGray10
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdfSandro Moreira
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024The Digital Insurer
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesrafiqahmad00786416
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...apidays
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfOrbitshub
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Victor Rentea
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfOverkill Security
 

Kürzlich hochgeladen (20)

presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 

Session 5 - NGSI-LD Advanced Operations | Train the Trainers Program

  • 2. Useful links Latest NGSI-LD specification: https://www.etsi.org/deliver/etsi_gs/CIM/001_099/009/01.04.01_60/gs_cim009v010401p.pdf NGSI-LD Tutorials: https://ngsi-ld-tutorials.readthedocs.io/ Swagger Specification https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/spec/updated/generated/full_api.json Guidelines for Creating NGSI-LD Models: https://github.com/smart-data-models/data-models/blob/master/guidelines.md Semantic Modelling with NGSI-LD Whitepaper: https://www.etsi.org/images/files/ETSIWhitePapers/etsi_wp_42_NGSI_LD.pdf 1
  • 3. NGSI-LD Specific Headers NGSI-v2 headers ▪ fiware-service ▪ fiware-servicepath NGSI-LD headers ▪ NGSILD-Tenant - equivalent to fiware-service ▪ NGSILD-Scope ??? - not defined in the NGSI-LD specification Context brokers are implicitly multi-tenant. The default NGSILD-Tenant is blank. Data from separate tenants is held in separate databases for legal reasons. 2
  • 4. Content-Type Header Supported Content-Types ▪ application/json ▪ application/ld+json Default is application/json, in which case the @context must be supplied in a Link header see: https://developer.mozilla.org/en-US/ docs/Web/HTTP/Headers/Link Link Header is to be preferred as it reduces the size of the payloads Follow JSON-LD best practices. see https://w3c.github.io/json-ld-bp 3 { "@context": [ "https://fiware.github.io/data-models/context.jsonld", "https://uri.etsi.org/ngsi-ld/v1/ngsi-ld-core-context.jsonld" ], "id": "http://dbpedia.org/resource/John_Lennon", "type": "Person", "name": {"type": "Property", "value": "John Lennon"}, "born": {"type": "Property", "value": "1940-10-09"}, "spouse": {" type": "Relationship", "object": "http://dbpedia.org/resource/Cynthia_Lennon" } } { "id": "http://dbpedia.org/resource/John_Lennon", "type": "Person", "name": {"type": "Property", "value": "John Lennon"}, "born": {"type": "Property", "value": "1940-10-09"}, "spouse": {" "type": "Relationship", "object": "http://dbpedia.org/resource/Cynthia_Lennon" } } 'Link: <http://.../path-to-my-public-server/ngsi-context.jsonld>; rel="http://www.w3.org/ns/json-ld#context"; type="application/ld+json"'
  • 5. Accept Header for GET /entities and Subscription payloads Supported Accept Types ▪ application/json - @context is returned in a Link header ▪ application/ld+json - @context is returned in the payload body ▪ application/geo+json - GeoJSON response for GET /entities and subscriptions see https://tools.ietf.org/html/rfc7946 The fallback for error messages is application/json Common NGSI-LD Formats ▪ options=normalized ▪ options=keyValues Custom Formats may be supported by selected context brokers: ▪ options=x-ngsiv2-normalized ▪ options=x-ngsiv2-keyValues ▪ options=x-ngsiv2-keyValues-compacted Custom NGSI-LD Formats should be used connection to microservices only Do not use them for data exchange 4
  • 6. GeoJSON request example Give me all Animal entities which are pigs inCalf to be found within 2km of 13.364°N 52.52°E … and return the data as key-value pairs in GeoJSON format without an @context attribute 5 curl -G 'http://localhost:1026/ngsi-ld/v1/entities/' -d 'georel=near;maxDistance==2000' -d 'geometry=Point' -d 'coordinates=%5B13.364,52.52%5D' -d 'q=species==%22pig%22;reproductiveCondition==%22inCalf%22' -d 'type=Animal' -d 'options=keyValues' -H 'NGSILD-Tenant: openiot' -H 'Accept: application/geo+json' -H 'Prefer: body=json' -H 'Link: <http://.../path-to-my-public-server/ngsi-context.jsonld>; rel="http://www.w3.org/ns/json-ld#context"; type="application/ld+json' Use Prefer=ld+json to return in GeoJSON-LD format see https://geojson.org/geojson-ld/
  • 7. GeoJSON response example ▪ Since entities typically have a location they can be plotted onto a map. ▪ GeoJSON is used as an output format only. ▪ Any GeoJSON Feature and/or FeatureCollection can be easily digested by any GIS system. 6 { "type": "FeatureCollection", "features": [ { "id": "urn:ngsi-ld:Animal:pig016", "type": "Feature", "properties": { "type": "Animal", "heartRate": 62, "phenologicalCondition": "femaleAdult", "reproductiveCondition": "inCalf", "name": "Tango", "legalID": "F-sow016-Tango", "sex": "female", "species": "pig", "location": { "type": "Point", "coordinates": [13.355, 52.523] } }, "geometry": { "type": "Point", "coordinates": [ 13.355, 52.523] } }, ...etc ] }
  • 8. NGSI-LD Temporal interface Give me the last 5 readings about a single entity and return in default (normalized) format: 7 curl -G -X GET 'http://localhost:8080/temporal/entities/urn:ngsi-ld:Animal:cow001’ -d 'lastN=5' -H 'NGSILD-Tenant: openiot' -H 'Link: <http://.../path-to-my-public-server/ngsi-context.jsonld>; rel="http://www.w3.org/ns/json-ld#context"; type="application/ld+json"' ▪ Temporal endpoints are found under /temporal/entities ▪ Temporal endpoints are optional - not supported by all context brokers ▪ Gives a context broker a “memory” at the cost of data storage and maintenance. ▪ Expect a performance hit - don’t run as DEBUG Sample docker-compose: https://github.com/FIWARE/tutorials.Short-Term-History/blob/NGSI-LD/docker-compose/orion-ld.yml
  • 9. Normalized Temporal request - 1.4 kB 8 { "id": "urn:ngsi-ld:Animal:cow001", "type": "Animal", "legalID": [ { "type": "Property", "value": "M-bull001-Beany", "instanceId": "urn:ngsi-ld:attribute:instance:ec12e7fc-a45d-11eb-a739-0242ac120106" }, … etc ], "name": [ { "type": "Property", "value": "Beany", "instanceId": "urn:ngsi-ld:attribute:instance:ec1284c4-a45d-11eb-a739-0242ac120106" }, … etc ], "sex": [ { "type": "Property", "value": "male", "instanceId": "urn:ngsi-ld:attribute:instance:ec12aad0-a45d-11eb-a739-0242ac120106" }, … etc ], ...etc ], "location": [ { "type": "GeoProperty", "value": { "type": "Point", "coordinates": [13.409,52.471,0] }, "observedAt": "2021-04-26T09:35:16.814Z", "instanceId": "urn:ngsi-ld:attribute:...", "providedBy": { "object": "urn:ngsi-ld:Device:cowcollar001", "type": "Relationship", "instanceId": "urn:ngsi-ld:attribute:...", } }, … etc ], "heartRate": [ { "type": "Property", "value": 52, "observedAt": "2021-04-26T09:35:16.814Z", "instanceId": "urn:ngsi-ld:attribute:..", "unitCode": "5K", "providedBy": { "object": "urn:ngsi-ld:Device:cowcollar001", "type": "Relationship", "instanceId": "urn:ngsi-ld:attribute:...", } }, ...etc ] } The following are mandated by the core @context ▪ value ▪ unitCode ▪ observedAt Unlimited Temporal Responses get very long very quickly
  • 10. Temporal Queries on attributes without observedAt Give me the last 5 readings about all female Animals, and return them 2 at a time 9 curl -G -X GET 'http://localhost:8080/temporal/entities' -d 'type=Animal' -d 'pageSize=2' -d 'lastN=5' -d 'q=sex==%22female%22' -d 'timeproperty=modifiedAt' -d 'options=count' -H 'NGSILD-Tenant: openiot' -H 'Link: <http://.../path-to-my-public-server/ngsi-context.jsonld>; rel="http://www.w3.org/ns/json-ld#context"; type="application/ld+json" ▪ Default temporal attribute is observedAt. ▪ static attributes are usually not observed - cannot be queried in the q parameter directly ▪ Use timeproperty=modifiedAt to query static properties
  • 11. Temporal Response including modifiedAt 10 { "id": "urn:ngsi-ld:Animal:cow003", "type": "Animal", "heartRate": [ { "type": "Property", "value": 51.0, "observedAt": "2021-04-26T09:36:36.577Z", "modifiedAt": "2021-04-26T09:38:09.579Z", "instanceId": "urn:ngsi-ld:attribute:instance:627f4202-a673-11eb-89a1-0242ac120106", "unitCode": "5K", "providedBy": { "object": "urn:ngsi-ld:Device:cowcollar003", "type": "Relationship", "modifiedAt": "2021-04-26T09:38:09.579Z", "instanceId": "urn:ngsi-ld:attribute:instance:62816672-a673-11eb-89a1-0242ac120106" } } … etc ▪ modifiedAt is returned in the response. ▪ There may be a significant lag between observedAt and modifiedAt ▪ modifiedAt identifies the last confirmed value, not necessarily the last change of value
  • 12. Pagination options Query Parameters ▪ lastN - limits the number of returned Attributes ▪ pageSize - limits the number of returned Entities ▪ pageAnchor - id of the first returned Entity ▪ options=count - includes the number of entities as a header in the response Relevant Headers in response ▪ Content-Range - date-time 2021-04-26T09:41:15.752-2021-04-26T09:29:10.834/5 ▪ NGSILD-Results-Count - 174 ▪ Page-Size - 2 ▪ Next-Page - urn:ngsi-ld:Animal:cow004 11 curl -G -X GET 'http://localhost:8080/temporal/entities' -d 'type=Animal' -d 'pageSize=2' -d 'lastN=5' -d 'q=sex==%22female%22' -d 'timeproperty=modifiedAt' -d 'options=count' -d pageAnchor=urn:ngsi-ld:Animal:cow004 ...etc
  • 13. Time limiting and Geofencing Temporal Queries Give me the heartRate, location and controlledAsset attributes of all Device entities, found within 800m of 13.364°N 52.52°E and return all readings taken since 8:30 a.m on 22nd April, returning them 2 devices at a time and in temporal values format 12 curl -L -g -X GET 'http://localhost:8080/temporal/entities' -d 'type=Device' -d 'attrs=location,controlledAsset' -d 'options=temporalValues' -d 'georel=near%3BmaxDistance==800' -d 'geometry=Point' -d 'coordinates=[13.364,52.52]' -d 'timerel=after' -d 'timeAt=2021-04-22T08:33:51.255Z' -d 'pageSize=2' -H 'NGSILD-Tenant: openiot' -H 'Link: <http://.../path-to-my-public-server/ngsi-context.jsonld>; rel="http://www.w3.org/ns/json-ld#context"; type="application/ld+json"' -H 'Accept: application/json'
  • 14. Temporal Values Response 13 [ { "id": "urn:ngsi-ld:Device:pigcollar001", "type": "Device", "heartRate": { "type": "Property", "values": [ [ 61.0, "2021-04-26T08:55:56.100Z"] ...etc ] }, "location": { "type": "GeoProperty", "values": [ [{"type": "Point", "coordinates": [13.355, 52.516, 0.0]},"2021-04-26T08:55:56.100Z"], ...etc ] }, "controlledAsset": { "type": "Relationship", "objects": [ ["urn:ngsi-ld:Animal:pig001", "2021-04-26T08:55:56.100Z"], ... etc ] } }, … etc ] ● The response holds an array of attribute value-time stamp pairs for each observed reading. ● Properties are held in values arrays, Relationships use objects
  • 15. NGSI-LD Language Maps 14 { "id": "urn:ngsi-ld:Vehicle:A4567", "type": "Vehicle", "brandName": { "type": "Property", "value": "Mercedes" }, "street": { "type": "LanguageProperty", "languageMap": { "fr": "Grand Place", "nl": "Grote Markt" } }, "isParked": { "type": "Relationship", "object": "urn:ngsi-ld:OffStreetParking:Downtown1", "observedAt": "2017-07-29T12:00:04Z", "providedBy": { "type": "Relationship", "object": "urn:ngsi-ld:Person:Bob" } } } NGSI-LD inherits concepts from JSON-LD ▪ NGSI-LD Entity id and Relationship object is defined as a JSON-LD @id @id is used to uniquely identify node objects that are being described in the JSON-LD document ▪ NGSI-LD Entity type is defined as a JSON-LD @type @type is used to set the type of a node or the datatype of a typed value ▪ NGSI-LD value is defined as an JSON-LD @value @value is used to specify the data that is associated with a particular property in the graph JSON-LD also defines @language- used to specify the language for a particular string value ▪ Each Property languageMap is defined as a JSON-LD @language used for multi-language support of simple string values Park a car on the Street known as Grand Place in French and Grote Markt in Dutch
  • 16. lang follows the same rules as the Accept-Language Header ▪ lang="en" - English only ▪ lang="fr-CH,fr" - Either Swiss French or French ▪ lang="*" - Wildcard ▪ lang="fr-CH,fr;q=0.9,en;q=0.8,*;q=0.5"- Quality value ranking Swiss French or French with no ranked preference, fallback to English as a second choice and finally fallback to any other supported language. Which street is urn:ngsi-ld:Vehicle:A4567 parked on? - return the name in French Language Maps attributes can be retrieved as a value in a single language using the lang parameter 15 curl -L -g -X GET 'http://localhost:1026/ngsi-ld/v1/entities/urn:ngsi-ld:Vehicle:A4567' -d 'attrs=street' -d 'lang=fr' -H 'Link: <http://.../path-to-my-public-server/ngsi-context.jsonld>; rel="http://www.w3.org/ns/json-ld#context"; type="application/ld+json"' -H 'Accept: application/json' { "id": "urn:ngsi-ld:Vehicle:A4567", "type": "Vehicle", "street": { "type": "Property", "value": "Grand Place", "lang": "fr", } }
  • 17. Language Maps are limited to simple stings 16 { "id": "urn:ngsi-ld:Event:bonjourLeMonde", "type": "Event", "name": {"type": "Property", "value": "Bonjour le Monde" }, "description": { "type": "Property", "value": "«Bonjour le monde» sont les mots traditionnellement écrits par un programme informatique simple" }, "inLanguage": {"type": "Property", "value": "fr"}, "sameAs": [ { "type": "Relationship", "datasetId": "urn:ngsi-ld:Relationship:1", "object": "urn:ngsi-ld:Event:helloWorld", "inLanguage": {"type": "Property", "value": "en"} }, { "type": "Relationship", "datasetId": "urn:ngsi-ld:Relationship:2", "object": "urn:ngsi-ld:Event:halloWelt", "inLanguage": {"type": "Property","value": "de"} } ] } Well-defined properties, which already have semantic meaning can be used to internationalize complex entities ▪ schema.org/inLanguage ▪ schema.org/sameAs This helps to keep the underlying data models simple and facilitates reuse, since not all data model users will need internationalization
  • 18. Expansion and Compaction 17 function translateRequest(req, res) { const headers = req.headers; headers.Accept = 'application/json'; const options = { url: BASE_PATH + req.path, method: req.method, headers, qs: req.query, json: true }; request(options) .then(async function (cbResponse) { cbResponse['@context'] = coreContext; const expanded = await jsonld.expand(cbResponse); const compacted = await jsonld.compact(expanded, alternate); delete compacted['@context']; return res.send(compacted); }) .catch(function (err) { return res.send(err); }); } Since NGSI-LD is an extended subset of JSON-LD, you can use standard JSON-LD libraries to perform expansion and compaction operations. Expansion and compaction can operate on normalized or key-values payloads This could be used to support @vocab elements as properties Be careful, the resultant payload is usually not valid NGSI-LD
  • 19. NGSI-LD vs JSON-LD representations 18 { "id": "urn:ngsi-ld:Building:store005", "type": "Building", "address": { "type": "Property", "value": { "streetAddress": "Eisenacher Straße 98", "addressRegion": "Berlin", "addressLocality": "Marzahn", "postalCode": "12685" } }, "location": { "type": "GeoProperty", "value": { "type": "Point", "coordinates": [13.5646, 52.5435] } }, "name": { "type": "Property", "value": "Yuusui-en" }, "category": { "type": "Property", "value": "commercial" } } { "識別子": "urn:ngsi-ld:Building:store005", "タイプ": "ビル", "住所": { "タイプ": "プロパティ", "値": { "addressLocality": "Marzahn", "addressRegion": "Berlin", "postalCode": "12685", "streetAddress": "Eisenacher Straße 98" } }, "場所": { "タイプ": "ジオプロパティ", "値": { "タイプ": "Point", "座標": [13.5646, 52.5435] } }, "名前": { "タイプ": "プロパティ", "値": "Yuusui-en" }, "カテゴリー": { "タイプ": "プロパティ", "値": "コマーシャル" }, }
  • 20. Context data is data for exchange. To facilitate data interchange, strings are always Unicode Strings, Dates are always ISO 8601 dates etc. Data models shouldn’t hold additional formats unnecessarily. The context provider and/or the receiver should be able to manipulate the payload themselves if necessary. ● Display opening and closing hours in French ● Sort street names in an accentless fashion in Spanish ● Accept alternate spellings (e.g. “ö” = “oe”) in German If absolutely necessary use metadata properties-of-properties to describe and query the context data new Intl.DateTimeFormat('new Intl.DateTimeFormat('fr-FR', { dateStyle: 'full', timeStyle: 'long' }).format(date) fr-FR', { dateStyle: 'full', timeStyle: 'long' }).format(date) Natural Language Collation Support 19 str.normalize("NFD").replace(/[u0300-u036f]/g, "").toLower() or what context-brokers don’t do directly new Intl.DateTimeFormat('fr-FR', { dateStyle: 'full', timeStyle: 'long' }).format(date) /ngsi-ld/v1/entities/?type=Building&q=name.collate==%22schoene%20gruesse%22 str.toLower().replace('ö','oe').replace('ä','ae').replace('ü','ue').replace('ß','ss')
  • 21. Context Entities hold a snapshot of the state of an entity representing a thing in the real world: So how to: ● Store Images when there is no BLOB type ● Create short term predictions ● Create medium term predictions Answer: don’t use a context broker for this. Use links to data storage, databases, actuations of external services or chron-jobs where relevant. The real work is done by other microservices. Remember : Context data is just data. More context broker anti-patterns 20 or what context-brokers don’t do at all
  • 22. When navigating the knowledge graph, only retrieve what you really need: ● type - see also /types endpoint ● attrs - should be identifiable from the data model ● id - only guaranteed within a broker federation - consider using an externally defined legalId Property (or equivalent in use in your domain) Each of these parameters can take a comma separated list. The short names for type and attrs are defined using the @context ● Use simple JSON keyValues to minimize payloads internally ● Use full NGSI-LD normalized when initiating data exchange between clients Filtering entity queries 21 let productsList = await ngsiLD.listEntities( { type: 'Shelf', options: 'keyValues', attrs: 'stocks,numberOfItems', id: furniture.join(',') }, headers );
  • 23. ● equal - == ● unequal - != ● greater - > ● greaterEq - >= ● less - < ● lessEq - <= ● regex pattern - ~= ● not regex Pattern - !~= ● dots (range) - .. ● andOp - ; ● orOp - | Filtering using the q parameter 22 ?q=((speed>50|rpm>3000);brandName=="Mercedes") ?q=(temperature>=20;temperature<=25)|capacity<=10 ?q=(temperature==20..25)|capacity<=10 ?q=address[city]!="D%C3%BCsseldorf" ?q=temperature.observedAt>=2017-12-24T12:00:00Z ?q=category=="barn","farm_auxiliary"
  • 24. ● geometry - any supported GeoJSON type ● coordinates ● georel ○ near;maxDistance ○ near;minDistance ○ within ○ contains ○ intersects ○ equals ○ disjoint ○ overlaps ● geoproperty - Optional default is location The geoQ parameters 23 ?georel=near;maxDistance==2000 &geometry=Point &coordinates=[8,40] &geoproperty=observationSpace ?georel=within& geometry=Polygon& coordinates=[[[100.0,0.0],[101.0,0.0], [101.0,1.0],[100.0,1.0],[100.0,0.0]]]& geoproperty=location
  • 25. ● timeAt - any DateTime ● endTimeAt - any DateTime ● timerel ○ before ○ after ○ between ● timeproperty - Optional default is observedAt The temporalQ parameters 24 ?timerel=before& timeAt=2020-04-13T14:20:00Z& timeproperty=modifiedAt ?timerel=between& timeAt=2021-04-26T09:00:00Z& endTimeAt=2021-05-21T14:40:00Z& timeproperty=observedAt
  • 26. Imagine the following scenario: ● A farm has Pigs and Cows tracked with Animal Collars ● The veterinary practice holds status records for the same Pigs and Cows ● A weather service can provide detailed weather conditions for locations on the farm Who are the data providers? What data does the farmer own/purchase? Which common data models should be used? How to ensure data from other sources refers to the correct entity? Connecting Data Providers 25
  • 27. ● Animal Data Model https://github.com/smart-data-models/dataModel.Agrifood/tree/master/Animal ● Field Data Model https://github.com/smart-data-models/dataModel.Agrifood/tree/master/AgriParcel ● Animal Collar Data Model https://github.com/smart-data-models/dataModel.Device/tree/master/Device ● Weather Observed Data Model https://github.com/smart-data-models/dataModel.Weather/tree/master/WeatherObserved Farmer and Vet share Animal, WeatherObserved is used by the WeatherService Data Models 26
  • 28. 27 { "@context": "https://..path-to-context/ngsi-context.jsonld", "id": "urn:ngsi-ld:Animal:cow006", "type": "Animal", "species": {"type": "Property", "value": "dairy cattle"}, "name": {"type": "Property", "value": "Twilight" }, "sex": {"type": "Property", "value": "female"}, "phenologicalCondition": {"type": "Property", "value": "femaleAdult"}, "reproductiveCondition": {"type": "Property", "value": "active"}, "legalID": {"type": "Property", "value": "F-cow006-Twilight" }, "heartRate": { "type": "Property", "value": 52, "unitCode": "5K", "observedAt": "2021-05-03T09:06:51.051Z", "providedBy": { "type": "Relationship", "object": "urn:ngsi-ld:Device:cowCollar006" } }, "locatedAt": {"type": "Relationship", "object": "urn:ngsi-ld:AgriParcel:field001", "weatherConditions": { "weatherType": "Raining", "temperature": 25, ... etc } }, "location": { "type": "GeoProperty", "value": {"type": "Point", "coordinates": [13.41, 52.47]}, "observedAt": "2021-05-03T09:06:51.051Z", "providedBy": { "type": "Relationship", "object": "urn:ngsi-ld:Device:cowCollar006" } } } Following the standard Animal model: id":"urn:ngsi-ld:Animal:cow006" is unique to the Farmer’s system, but not a globally shared identifier. ● legalId is a globally shared between Farmer and Vet ● phenologicalCondition and reproductiveCondition are provided by Vet ● weatherConditions is a property-of-a relationship copied here for convenience. The AgriParcel entity must hold sufficient information to be able to request the weather conditions.
  • 29. 28 curl -L -X POST 'http://localhost:1026/ngsi-ld/v1/subscriptions/' -H 'Content-Type: application/ld+json' -H 'NGSILD-Tenant: openiot' --data-raw '{ "description": "Notify me of Veterinary Requests", "type": "Subscription", "entities": [{"type": "Animal"}], "watchedAttributes": ["filling"], "notification": { "attributes": ["legalId", "refreshVetData"], "format": "keyValues", "endpoint": { "uri": "http://i4trust-app/veterinary-practice", "accept": "application/json" } }, "@context": "https://..path-to-context/ngsi-context.jsonld" }' Subscribe to changes on an attribute to trigger a refresh of data. Ensure all relevant data is passed to the subscription then make a GET request to the Vet’s context broker. Additional Business logic to manipulate response (e.g. expansion/compaction) and upsert the result back into the Farmer’s context broker. Option 1 - Provide a common agreed identifier such as legalId curl -L -X PATCH 'http://localhost:1026/ngsi-ld/v1/entities/urn:ngsi-ld:Animal:cow006/attrs/refreshVetData' -H 'NGSILD-Tenant: openiot' -H 'Content-Type: application/json' -H 'Link: <https://..path-to-context/ngsi-context.jsonld>; rel="http://www.w3.org/ns/json-ld#context"; type="application/ld+json"' -d '{ "type": "Property", "value": "phenologicalCondition, reproductiveCondition"}'
  • 30. 29 { "@context": "https://..path-to-context/ngsi-context.jsonld", "id": "urn:ngsi-ld:AgriParcel:field001", "type": "AgriParcel", "location": { "type": "GeoProperty", "value": { "type": "Polygon", "coordinates": [[[100, 0], [101, 0], [101, 1], [100, 1], [100, 0]]] } }, "area": { "type": "Property", "value": 200}, "description": { "type": "Property", "value": "Pasture”}, "category": { "type": "Property", "value": "grassland"}, "relatedSource": { "type": "Property", "value": [ { "application": "urn:ngsi-ld:AgriApp:weather001", "applicationEntityId": "app:ExternalWeatherStation" } ] }, "weatherConditions": { "type": "Property", "value": { "weatherType": "Raining", "temperature": 25, ... etc } "observedAt": "2021-05-03T09:06:51.051Z", "providedBy": { "type": "Relationship", "object": "urn:ngsi-ld:AgriApp:weather001" } } } Following the standard AgriParcel model: id":"urn:ngsi-ld:AgriParcel:field001" is unique to the Farmer’s system, but not a globally shared identifier. The relatedSource attribute holds the Weather Station identifier within the external System Additional weatherConditions attribute within AgriParcel. This is able to hold additional information which is not required on each of the Animal entities. Option 2 - use relatedSource for linking to External Applications
  • 31. 30 curl -L -X PATCH 'http://localhost:4041/ngsi-ld/v1/entities/urn:ngsi-ld:AgriApp:weather001/attrs/update' -H 'NGSILD-Tenant: openiot' -H 'Content-Type: application/json' -H 'Link: <https://..path-to-context/ngsi-context.jsonld>; rel="http://www.w3.org/ns/json-ld#context"; type="application/ld+json"' -d '{ "type": "Property", "value": " " }' Subscribe to changes on an attribute to trigger a refresh of data. Ensure all relevant data is passed to the subscription then make a GET request to the Weather provider’s context broker. Additional Business logic to cascade batch upsert the result back into the Farmer’s context broker AgriParcel and Animal entities Connecting to External Data Providers curl -L -X POST 'http://localhost:1026/ngsi-ld/v1/subscriptions/' -H 'Content-Type: application/ld+json' -H 'NGSILD-Tenant: openiot' --data-raw '{ "description": "Notify me of Weather Requests", "type": "Subscription", "entities": [{"type": "Weather"}], "watchedAttributes": ["update"], "notification": { "format": "keyValues", "endpoint": { "uri": "http://i4trust-app/weather-provider", "accept": "application/json" } }, "@context": "https://..path-to-context/ngsi-context.jsonld" }'
  • 32. Strictly speaking, Animal shouldn’t have weatherConditions at all. You can navigate the knowledge graph based on the locatedAt relationship But what if you want to determine do cows lie down in the rain? ● Each cow can be moved to a separate field at different times. ● Each field could experience different weather conditions. The data may be duplicated for ease of calculations but: ● More data storage required ● Potential reduction in interoperability - reuse common attribute names. Usable or Ontologically Correct? 31
  • 33. ● A Push Model is typically used by Devices connected IoT Agents POST /ngsi-ld/v1/entityOperations/upsert/ ● Registration may be used for either federated environments or actuations but not both ● Subscriptions can also be used for actuation Note that true federation implies a greater degree of trust than i4Trust Upsert, Registration or Subscription 32
  • 34. Thank you! i4Trust has received funding from the European Union’s Horizon 2020 research and innovation programme under the Grant Agreement no 951975. 18