{
"thingId": "namespace:car-1",
"acl": { ... },
"attributes": {
"manufacturer": "ACME corp",
"productionData": {
"serialNo": 4711
}
},
"features": {
"headlights": {
"properties": {
"on": false
}
}
}
}
GET/PUT/DELETE /api/1/things/namespace:car-1
/api/1/things/namespace:car-1/thingId
/api/1/things/namespace:car-1/acl
/api/1/things/namespace:car-1/attributes
/api/1/things/namespace:car-1/attributes/manufacturer
/api/1/things/namespace:car-1/attributes/productionData
/api/1/things/namespace:car-1/attributes/productionData/serialNo
/api/1/things/namespace:car-1/features
/api/1/things/namespace:car-1/features/headlights
/api/1/things/namespace:car-1/features/headlights/properties
/api/1/things/namespace:car-1/features/headlights/properties/on
→ docs
{
"topic": "namespace/car-1/things/twin/events/modified",
"headers": { ... },
"path": "/features/headlights/properties",
"value": {
"on": true
},
"revision": 42
}
→ docs
"acl": {
"ditto": {
"READ": true,
"WRITE": false,
"ADMINISTRATE": false
},
"adam": {
"READ": true,
"WRITE": true,
"ADMINISTRATE": true
}
}
{
"policyId": "namespace:car-1-policy",
"entries": {
"owner": {
"subjects": {
"nginx:admin": {
"type": "nginx basic auth user"
}
},
"resources": {
"thing:/": {
"grant": ["READ","WRITE"],
"revoke": []
},
"thing:/features/firmware": {
"grant": [],
"revoke": ["WRITE"]
},
"policy:/": {
"grant": ["READ","WRITE"],
"revoke": []
}
}
}
}
}
→ docs
var ws = new WebSocket(
"ws://u:p@ditto.eclipseprojects.io/ws/1");
ws.onopen = function(w) {
w.send('START-SEND-EVENTS');
};
ws.onmessage = function(msg) {
console.log('received: ' + msg.data);
};
var source = new EventSource(
"/api/1/things?ids=namespace:car-1");
source.onmessage = function(msg) {
console.log('received: ' + msg.data);
};
GET /api/1/search/things
?filter=like(attributes/manufacturer,"ACME*")
GET /api/1/search/things
?filter=and(
exists(attributes/manufacturer),
eq(features/headlights/properties/on,true)
)
&namespaces=org.eclipse.ditto
&option=sort(-attributes/manufacturer)
&fields=thingId,attributes/manufacturer,_modified