
NGSI-LD is a powerful technology that's being used in various real-world applications. It's an open standard for data sharing and interoperability, which means it can connect different systems and devices seamlessly.
One of the key use cases for NGSI-LD is in the field of smart cities, where it's being used to create more efficient and sustainable urban environments. For example, in the city of Santander, NGSI-LD is being used to manage and optimize traffic flow.
NGSI-LD is also being used in the field of IoT, where it's helping to create more connected and intelligent devices. For instance, in the city of Barcelona, NGSI-LD is being used to manage and monitor the city's smart parking system.
By using NGSI-LD, cities and organizations can gain valuable insights and make data-driven decisions, leading to improved efficiency and effectiveness.
Expand your knowledge: Social Data Analysis
Design and Architecture
NGSI-LD's design is built on top of JSON-LD, which provides a standardized way to express Linked Data.
NGSI-LD's architecture is based on a client-server model, where the NGSI-LD server acts as a data broker and provides a unified interface for querying and subscribing to data.
The NGSI-LD server is responsible for managing the lifecycle of subscriptions, including creating, updating, and deleting them.
Subscriptions in NGSI-LD are represented as a set of rules that define what data to retrieve and how often to retrieve it.
For another approach, see: Santee Cooper Lake Data
API and Data Model
The NGSI-LD API is designed to be agnostic to the architecture, allowing applications to produce and consume information without being tailored to the specifics of the system that distributes or brokers context information.
The API provides close to real-time access to information from multiple sources, including IoT data sources, and enables the publication of that information through interoperable data publication platforms.
API operations comprise Context Information operations, concerned with Provision, Consumption, and Subscription, as well as Context Sources operations, concerned with Registration and Discovery.
- Context Information operations include creating, updating, and querying NGSI-LD Entities, as well as subscribing to specific information under specified constraints.
- Context Sources operations include registering new sources of context information and querying the system about registered context sources.
The NGSI-LD data model is an extension of the RDF standards, designed to capture high-level relations between entities and properties.
Data Model
The data model is a crucial part of the NGSI-LD ecosystem. It's an extension of the RDF standards, designed to capture high-level relations between entities and properties.
The NGSI-LD data model is an ontology that supports data management by its implemented APIs. This model is a work item of the Industry Specification Group for Cross-cutting Context Information Management (ISG CIM).
The data model includes entities such as infection case, disease, disease transmission, region, and visited place. These entities are related to each other through relationships like "infectionBy", "visitedAt", "transmissionInfo", "diseaseCode", and "region".
Here are some key entities and their relationships in the NGSI-LD data model:
The NGSI-LD data model is designed to be flexible and adaptable to different use cases. For example, the "Infection Domain NGSI-LD Model" includes entities and relationships specific to disease transmission and management.
Model and API
The NGSI-LD Context Information Management API is designed to be agnostic to the architecture, so applications can produce and consume information without being tailored to the specifics of the system that distributes or brokers context information.
The API provides close to real-time access to information from multiple sources, including IoT data sources, and enables users to provide, consume, and subscribe to context information in various scenarios.
NGSI-LD Context Model and API are part of the Industry Specification Group for Cross-cutting Context Information Management (ISG CIM), formed in ETSI in 2017 to improve interoperability and reduce deployment problems for smart city services.
The NGSI-LD API relies on the data model presented in the previous section, providing a set of operations on entities covering entity creation, update, deletion, retrieval, and subscription.
The API includes registry, batch, and temporal operations, but the current version does not exploit the URIs of attributes defined in the @context field, focusing more on the syntactic side of entity attributes.
API operations comprise two main categories: Context Information operations and Context Sources operations, concerned with Provision, Consumption, Subscription, Registration, and Discovery.
Here are the main API operations:
- Context Information operations: Provision (creating NGSI-LD Entities, and updating their Attributes), Consumption (querying NGSI-LD Entities) and Subscription (subscribing to specific information, under specified constraints)
- Context Sources operations: Registration (making a new source of context information available) and Discovery (querying the system about what context sources have registered)
Entity Creation and Retrieval
When creating an entity, if no Link header is provided, the entity members will be mapped to the default @context, which implies they will be under the dummy example.org/ngsi-ld namespace.
This means that the entity will have long URIs as member keys, not the short names used when creating the entity. The default @context maps every JSON member to the http://example.org/ngsi-ld dummy namespace.
On the other hand, when retrieving an entity, if a Link header is not provided, the resulting JSON object will contain the entity members with short names that were used when creating the entity. This is because the @context provided in this case allows for short names.
Entity Creation (Application/LD+Json)
Entity Creation (Application/LD+Json) is a specific approach that requires attention to detail. The request MIME type is set to application/ld+json.
The @context in this type of request contains two parts: the ETSI Core @context and the FIWARE Data Models @context. The ETSI core @context part is always implicit and cannot be overwritten.
Only one Link header pointing to the JSON-LD @context is allowed, so the payload should not contain any @context member. The FIWARE Data Models URI @context is provided as the target of a Link header.
Explore further: Core Dashboard
Entity Creation (Application/Json)
When working with Entity Creation in JSON format, it's essential to note that if no Link header is provided, Entity members will be mapped to the Default @context, which implies they'll be under the dummy example.org/ngsi-ld namespace.
Entity members will be automatically mapped to this default context, so if you don't specify a custom @context, this is what will happen.
The default context is a dummy namespace that serves as a fallback, ensuring that your Entity members are still properly structured, even without a custom context.
In practical terms, this means that if you don't provide a custom @context, your Entity members will be nested under the example.org/ngsi-ld namespace, which can be useful for default or fallback scenarios.
Entity Retrieval (Application/LD+Json)
Entity Retrieval (Application/LD+Json) is a crucial part of working with entities.
If a Link header isn't provided, the resulting JSON object will contain long URIs as member keys, not the short names used when creating the Entity.
The default @context will be used if no Link header is provided, mapping every JSON member to the http://example.org/ngsi-ld dummy namespace.
In this case, the response will not include any Link header because it's indeed application/ld+json, and the @context is already a payload member.
This means you can omit the Link header from the request, and the @context will still be conveyed correctly.
Entity Retrieval (Application/Json)
Entity Retrieval (Application/Json) works a bit differently than Entity Retrieval with other MIME types.
If you make a GET request for Entity Retrieval with application/json, it's essential to include a Link header pointing to the corresponding @context. This informs the Broker about the @context of the query or retrieval operation.
If you don't provide a Link header, the resulting JSON object will contain long URIs as member keys, rather than the short names used when creating the Entity. This can make it harder to work with the data.
The response will include the Link header, as it's an application/json response, and the @context won't appear as a member of the JSON payload.
Recommended read: SMART Information Retrieval System
Querying Entities
Querying Entities is a crucial aspect of NGSI-LD, and it's essential to understand how it works. When sending a Query Entities request, make sure to include a Link header to the corresponding @context, as this informs the Broker of what @context to use for the query operation.
If you don't provide a Link header, the Broker will default to the default @context, which maps every JSON member to the http://example.org/ngsi-ld dummy namespace. This can lead to incorrect query results, as observed in Example 1.
In some cases, like when using application/ld+json, the Link header is not required, as the @context is already included in the payload. However, if you don't provide a Link header in these cases, there will be no query results, as seen in Example 2.
For application/json requests, the Link header is still necessary to avoid mapping all query terms to the default @context. If you don't provide a Link header, there won't be any query results, as demonstrated in Example 3.
Discover more: Web Query Classification
Migration and Example

Migration to NGSI-LD is a straightforward process that involves several steps. You'll need to convert NGSI v2 entity id attributes to URIs using the NGSI-LD URN.
To get started, you'll need to identify the entity id attributes in your NGSI v2 representation. These attributes need to be converted to JSON-LD nodes of type Property. Regular entity attributes also need to be converted to JSON-LD nodes of type Property.
To handle references to other entities, you'll need to convert the ref attributes to JSON-LD nodes of type Relationship. This will help create a clear link between entities.
Here are the steps to migrate to NGSI-LD in a concise list:
- Convert NGSI v2 entity id attributes to URIs using the NGSI-LD URN
- Convert regular entity attributes to JSON-LD nodes of type Property
- Convert ref attributes to JSON-LD nodes of type Relationship
- Map the timestamp metadata item to the observedAt member of a Property node
- Map the unitCode metadata item to the unitCode member of a Property node
- Properly encode the NGSI v2 DateTime type as per the JSON-LD rules
- Rename the NGSI v2 geo:json type to GeoProperty
JSON-LD Migration Steps
JSON-LD Migration Steps can be broken down into several key tasks.
To begin, NGSI v2 entity id attributes need to be converted to URIs, preferably using the NGSI-LD URN. This is a crucial step in the migration process.
Regular entity attributes must be converted to JSON-LD nodes of type Property. This involves mapping the entity attributes to the correct JSON-LD format.

ref attributes, which point to other entities, need to be converted to JSON-LD nodes of type Relationship. This will help maintain the relationships between entities.
The timestamp metadata item must be mapped to the observedAt member of a Property node. This ensures that the timestamp information is accurately represented in the JSON-LD format.
The unitCode metadata item must be mapped to the unitCode member of a Property node. This helps maintain the unit of measurement for the property.
NGSI v2 DateTime type needs to be properly encoded as per the JSON-LD rules. This is essential for accurate date and time representation.
NGSI v2 geo:json type must be renamed to GeoProperty. This change will help maintain the geographical information in the correct format.
Here's a summary of the migration steps:
- Convert NGSI v2 entity id attributes to URIs using NGSI-LD URN
- Convert regular entity attributes to JSON-LD nodes of type Property
- Convert ref attributes to JSON-LD nodes of type Relationship
- Map timestamp metadata to observedAt member of Property node
- Map unitCode metadata to unitCode member of Property node
- Properly encode NGSI v2 DateTime type
- Rename NGSI v2 geo:json type to GeoProperty
Example of Using Context Broker Data
The Context Broker is a powerful tool that combines different data streams into a standardized format, making it easily accessible for organizations to use.
This format is NGSI-LD, which is a specific type of data format that the Context Broker uses to provide the data.
Organizations can then use this data to build their own applications, such as visual tools to make the data more understandable.
One example of such a tool is Slim Naar Antwerpen, which displays traffic information from the Context Broker in a user-friendly and visually clear application.
The data is automatically updated in the application via the Context Broker, so users always have an up-to-date overview of the traffic in the city.
Use Cases and Applications
NGSI-LD has been adopted by various organizations and projects, including the Connecting Europe Facility, which recommends using the FIWARE context broker with NGSI-LD. It's also referenced by the Open & Agile Smart Cities & Communities organization as part of their Minimal Interoperability Mechanisms.
The GSMA's IoT Big Data Framework Architecture is based on NGSI-LD, and it's used as a neutral data format for translating between various IoT data representations in the Fed4IoT EU project. The Thing'in graph-based digital twin platform from Orange uses NGSI-LD as its core information model.
Here are some examples of NGSI-LD-based applications:
- Orion-LD from the FIWARE Foundation
- Scorpio from NEC
- Stellio from EGM
- Cassiopeia from Geonet
- City Data Hub Data Core Module from KETI
Our Offerings

We offer a range of services to help you get started with NGSI-LD, including installing the NGSI-LD Context Broker on your Azure environment for free*.
The NGSI-LD Context Broker is available for free download from the Azure Marketplace, making it easy to get started with NGSI-LD.
If you need help setting up the NGSI-LD Context Broker, we also offer expert consultancy services to do this for you.
Here are some of the products that use NGSI-LD:
- Orion-LD from the FIWARE Foundation
- Scorpio from NEC
- Stellio from EGM
- Cassiopeia from Geonet
- City Data Hub Data Core Module from KETI
These products demonstrate the versatility and widespread adoption of NGSI-LD in various industries and applications.
Use Cases
Use Cases are all about real-world applications of a technology or system. Let's take a look at some examples.
Organizations can use data from the Context Broker to build applications that visualize this data. For instance, the tool Slim Naar Antwerpen displays traffic information from the shared mobility in Antwerp City.
The Context Broker provides a standardized format for data, making it easily accessible for organizations to use. This data can be used to create user-friendly and visually clear applications, like Slim Naar Antwerpen.
Two real use-case examples are presented in the article: the Infection Domain Use Case Application and the Water Domain Use Case Application. These examples follow recommendations from [8].
The Infection Domain Use Case Application involves modeling the COVID-19 infection situation in South Korea. The data model includes entities for infection cases, diseases, disease transmission, regions, and visited places.
The Water Domain Use Case Application involves measuring water parameters in a city water network. The parameters include chlorine and water levels in a tank.
Here are some key entities and properties from the Water Domain Use Case Application:
These use cases demonstrate the potential applications of the Context Broker and NGSI-LD data model. By providing a standardized format for data, organizations can create innovative applications that benefit society.
RDF Graphs and Validation
NGSI-LD entities can be mapped to RDF graphs using a triple store, which exploits entity URIs in semantic reasoning.
Semantic integration over NGSI-LD context broker enhances the integration of semantic data validation processes through consistency checking over RDF schemes.
RDF graphs can be used to enrich and annotate existing data through graph-traversing and matching queries across instances, hyper-structural constructs, types, and ontologies.
Semantic inference and reasoning mechanisms can be exploited to improve data validation processes.
Here are some key benefits of using RDF graphs for validation:
- SHACL validation can be used to validate data against a schema
- Graph-traversing and matching queries can be used to enrich and annotate existing data
- Semantic inference and reasoning mechanisms can be used to improve data validation processes
The use of RDF graphs for validation has been demonstrated in various applications, including a water use case where a tank ontology was imported into Neo4j.
Named Property Graph Approach
The Named Property Graph Approach is a key component of NGSI-LD, which allows for the creation of a graph that represents entities and their relationships. This approach enables the creation of a flexible and extensible data model.
Each entity in the graph has a unique identifier, which is a URI, and is described by a set of properties. These properties are defined by a set of triples, with the subject being the entity, the predicate being the property name, and the object being the value of the property.
Take a look at this: Google Knowledge Graph
The Named Property Graph Approach supports the use of schema.org vocabulary, which provides a set of standardized property names and values for common entities and relationships. This allows for a high degree of interoperability and consistency across different systems and applications.
The use of a graph data structure also enables the efficient querying and retrieval of data, using techniques such as SPARQL queries. This allows for the creation of complex queries that can retrieve specific data from the graph.
The Named Property Graph Approach is designed to be scalable and flexible, allowing for the easy addition of new entities and relationships as needed. This makes it well-suited for use in large-scale IoT applications, where the data model is constantly evolving.
Frequently Asked Questions
What is Orion LD?
Orion LD is a Context Broker that manages context data, supporting two key APIs: NGSI-LD and NGSI-v2. It's a crucial building block for handling and sharing data across various applications and systems.
Featured Images: pexels.com

