Ditto as
Digital Twin
"middleware"
{
"thingId": "io.foo:car1",
"policyId": "io.foo:car1",
"attributes": {
"manufacturer": "Foo",
"data": {
"serialNo": 4711
}
},
"features": {
"temp": {
"properties": {
"value": 23.42
}
}
}
}
JSON repr. of a Thing
GET/PUT/DELETE /api/2/things/io.foo:car1
/api/2/things/io.foo:car1/thingId
/api/2/things/io.foo:car1/policyId
/api/2/things/io.foo:car1/attributes
/api/2/things/io.foo:car1/attributes/manufacturer
/api/2/things/io.foo:car1/attributes/data
/api/2/things/io.foo:car1/attributes/data/serialNo
/api/2/things/io.foo:car1/features
/api/2/things/io.foo:car1/features/temp
/api/2/things/io.foo:car1/features/temp/properties
/api/2/things/io.foo:car1/features/temp/properties/value
HTTP API of the Thing
→ docs{
"thingId": "io.foo:lamp-1",
"policyId": "io.foo:lamp-1",
"definition": "https://some.domain/floor-lamp-1.0.0.tm.jsonld",
"attributes": {
"Manufacturer": "Foo corp",
"serialNo": "4711"
},
"features": {
"Spot1": {
"definition": [
"https://some.domain/dimmable-colored-lamp-1.0.0.tm.jsonld",
"https://some.domain/colored-lamp-1.0.0.tm.jsonld",
"https://some.domain/switchable-1.0.0.tm.jsonld"
],
"properties": {
"on": true,
"color": {...
}
}
}
}
}
→ docs
{
"policyId": "io.foo:car1-policy",
"entries": {
"owner": {
"subjects": {
"oidc:userid": {
"type": "OpenID connect extracted userid"
},
"oidc:/claim": {
"type": "OpenID connect extracted claim"
}
},
"resources": {
"thing:/": {
"grant": ["READ","WRITE"],
"revoke": []
},
"thing:/features/firmware": {
"grant": [],
"revoke": ["WRITE"]
},
"policy:/": {
"grant": ["READ","WRITE"],
"revoke": []
}
}
}
}
}
→ docs
GET /api/2/search/things
?filter=like(attributes/manufacturer,"Foo*")
GET /api/2/search/things
?filter=and(
eq(features/*/definition,"https://some.domain/switchable-1.0.0.tm.jsonld"),
like(attributes/manufacturer,"Foo*"),
not(gt(attributes/counter,42))
)
&fields=thingId,attributes/manufacturer,features/*/properties/on