Information model
JSON-LD
The information model is based on JSON-LD.
Stellio expects an @context describing the provided data.
If you do not provide one, Stellio uses the NGSI-LD default context.
Using an @context enables semantic interoperability. You can find out more in this tutorial.
The different ways to specify the @context are described in §6.3.5
You can also request a specific data format (JSON or JSON-LD) has described in §6.3.6
Tenant
Tenants allow defining isolated instances inside an NGSI-LD broker (see §4.14).
If your stellio instance has multiple tenants, you can specify the tenant by adding the header NGSILD-TENANT: {tenant_name}
Model
Entity
Data is stored as entities. An entity is identified by an id and a type.
Minimal entity:
{
"id":"urn:ngsi-ld:BeeHive:01",
"type":"BeeHive"
}
Attribute
You describe information about an entity with attributes.
An attribute is either a Property or a Relationship.
Property
A property is any piece of information that has a value.
There are several property types:
Property: a string, number, date, time, datetime, or booleanJsonProperty: valid JSON dataGeoProperty: a GeoJSON geometry (uselocationto represent the entity’s location)LanguageProperty: text in multiple languages
Example with different attributes:
{
"id": "urn:ngsi-ld:BeeHive:01",
"type": "BeeHive",
"hornetDetected": {
"type": "Property",
"value": true
},
"temperature": {
"type": "Property",
"value": 22.2,
"unitCode": "CEL",
"observedAt": "2025-10-26T21:32:52.98601Z"
},
"location": {
"type": "GeoProperty",
"value": {
"type": "Point",
"coordinates": [
24.30623,
60.07966
]
}
},
"json": {
"type": "JsonProperty",
"value": {
"include": "any json"
}
},
"name": {
"type": "LanguageProperty",
"languageMap": {"en": "Beehive", "fr": "ruche"}
},
"@context": [
"https://easy-global-market.github.io/ngsild-api-data-models/apic/jsonld-contexts/apic-compound.jsonld"
]
}
Properties can include:
- a
unitCode(it should follow the UNECE/CEFACT Common Code list for units of measurement). - an
observedAttimestamp in UTC (ISO 8601 extended format)
Relationship
A relationship represents a link to another entity in Stellio.
Example of a relationship:
{
"id": "urn:ngsi-ld:BeeHive:01",
"type": "BeeHive",
"managedBy": {
"type": "Relationship",
"object": "urn:ngsi-ld:Beekeeper:01"
},
"@context": [
"https://easy-global-market.github.io/ngsild-api-data-models/apic/jsonld-contexts/apic-compound.jsonld"
]
}
Sub-attribute
Attributes can have sub-attributes. For example:
{
"id": "urn:ngsi-ld:BeeHive:01",
"type": "BeeHive",
"temperature": {
"type": "Property",
"value": 22.2,
"unitCode": "CEL",
"observedAt": "2025-10-26T21:32:52.98601Z",
"observedBy": {
"type": "Relationship",
"object": "urn:ngsi-ld:Sensor:01"
}
},
"@context": [
"https://easy-global-market.github.io/ngsild-api-data-models/apic/jsonld-contexts/apic-compound.jsonld"
]
}
Multi-attribute
You can assign multiple values to the same attribute by using datasetIds:
{
"id": "urn:ngsi-ld:BeeHive:01",
"type": "BeeHive",
"managedBy": [
{
"type": "Relationship",
"object": "urn:ngsi-ld:Beekeeper:01"
},{
"type": "Relationship",
"object": "urn:ngsi-ld:Beekeeper:02",
"datasetId": "urn:ngsi-ld:second"
}
],
"temperature": [
{
"type": "Property",
"value": 22.2,
"datasetId": "urn:ngsi-ld:Sensor:1"
},
{
"type": "Property",
"value": 21.7,
"datasetId": "urn:ngsi-ld:Sensor:2"
}
],
"@context": [
"https://easy-global-market.github.io/ngsild-api-data-models/apic/jsonld-contexts/apic-compound.jsonld"
]
}
Going further
For a practical walkthrough, see the API walkthrough.