Hi all, I’m using a hosted c8y environment. Using the Notifications 2.0 API with Websockets.
Here is the response from: {{baseUrl}}/notification2/subscriptions?pageSize=50
{
"next": "https://XYZ.machines.cloud/notification2/subscriptions?pageSize=50¤tPage=2",
"subscriptions": [
{
"nonPersistent": false,
"context": "mo",
"self": "https://XYZ.machines.cloud/notification2/subscriptions/11111111111",
"subscription": "SubEvents",
"id": "11111111111",
"source": {
"self": "https://XYZ.machines.cloud/inventory/managedObjects/222222222",
"id": "222222222"
},
"filter": {
"apis": [
"events"
]
}
}
],
"self": "https://XYZ.machines.cloud/notification2/subscriptions?pageSize=50¤tPage=1",
"statistics": {
"pageSize": 50,
"currentPage": 1
}
,
As you can see from the subscriptions API responses, I’m only subscribed to “events” I’m getting messages sent from:
/XYZ/events/222222222
{"lastUpdated":"2024-11-20T12:08:36.446Z","creationTime":"2024-11-20T12:08:36.446Z","self":"https://XYZ.machines.cloud/event/events/11111111","id":"11111111","source":{"name":"NAME","self":"https://XYZ.machines.cloud/inventory/managedObjects/222222222","id":"222222222"},"text":"rgLocUpdate","time":"2024-11-20T12:08:29.000Z","type":"c8y_LocationUpdate","c8y_Position":{"lng":3.597217,"lat":51.445541,"heading":0,"rgOpState":0},"rgData":{"SOG":{"value":0,"unit":"knts"},"Eng Speed PT":{"value":0,"unit":"rpm"},"Eng Speed STB":{"value":0,"unit":"rpm"}}}
/XYZ/eventsWithChildren/222222222
{"lastUpdated":"2024-11-20T11:49:48.657Z","creationTime":"2024-11-20T11:49:48.657Z","self":"https://XYZ.machines.cloud/event/events/333333333","id":"333333333","text":"rgLocUpdate","source":{"name":"Asset 2","self":"https://XYZ.machines.cloud/inventory/managedObjects/222222222","id":"222222222"},"time":"2024-11-20T11:49:44.000Z","type":"c8y_LocationUpdate","c8y_Position":{"lng":-2.086799,"lat":55.874016,"heading":339,"rgOpState":0},"rgData":{"SOG":{"value":0,"unit":"knts"},"Eng Speed PT":{"value":0,"unit":"rpm"},"Eng Speed STB":{"value":0,"unit":"rpm"}}}
/XYZ/measurements/222222222
{"self":"https://XYZ.machines.cloud/measurement/measurements/44444444","time":"2024-11-20T11:49:10.835Z","id":"44444444","source":{"self":"https://XYZ.machines.cloud/inventory/managedObjects/222222222","id":"222222222"},"type":"DLValues","DLValues":{..}}
/XYZ/managedobjects/222222222
{
"additionParents":{
"references":[
],
"self":"https://XYZ.machines.cloud/inventory/managedObjects/222222222/additionParents"
},
"owner":"device_TCG4-203670701009",
"childDevices":{
"references":[
],
"self":"https://XYZ.machines.cloud/inventory/managedObjects/222222222/childDevices"
},
"childAssets":{
"references":[
],
"self":"https://XYZ.machines.cloud/inventory/managedObjects/222222222/childAssets"
},
"creationTime":"2020-09-18T12:39:49.238Z",
"type":"onboard unit",
"lastUpdated":"2024-11-20T11:58:31.948Z",
"childAdditions":{
"references":[
{
"managedObject":{
"self":"https://XYZ.machines.cloud/inventory/managedObjects/5555555555",
"id":"5555555555"
},
"self":"https://XYZ.machines.cloud/inventory/managedObjects/222222222/childAdditions/5555555555"
},
{
"managedObject":{
"self":"https://XYZ.machines.cloud/inventory/managedObjects/66666666666",
"id":"66666666666"
},
"self":"https://XYZ.machines.cloud/inventory/managedObjects/222222222/childAdditions/66666666666"
}
],
"self":"https://XYZ.machines.cloud/inventory/managedObjects/222222222/childAdditions"
},
"name":"NAME",
"assetParents":{
"references":[
],
"self":"https://XYZ.machines.cloud/inventory/managedObjects/222222222/assetParents"
},
"deviceParents":{
"references":[
],
"self":"https://XYZ.machines.cloud/inventory/managedObjects/222222222/deviceParents"
},
"self":"https://XYZ.machines.cloud/inventory/managedObjects/222222222",
"id":"222222222",
"c8y_Firmware":{
"name":"Last update: geofences",
"version":"79"
},
"c8y_Availability":{
"lastMessage":"2024-11-20T11:53:59.195Z",
"status":"AVAILABLE"
},
"com_cumulocity_model_Agent":{
},
"c8y_Connection":{
"status":"CONNECTED"
},
"c8y_RequiredAvailability":{
"responseInterval":6
},
"c8y_SupportedOperations":[
"c8y_Restart",
"c8y_Command",
"c8y_Firmware",
"c8y_CellInfo",
"c8y_SignalStrength",
"c8y_RequiredAvailability"
],
"c8y_Position":{
"...":""
},
"c8y_TrackerOn":true,
"c8y_Hardware":{
"...":""
},
"c8y_TrackerDuration":18,
"c8y_Software":{
"...":""
},
"c8y_Mobile":{
"...":""
},
"c8y_ActiveAlarmsStatus":{
"minor":0,
"major":0,
"critical":0,
"warning":0
},
"c8y_IsDevice":{
"...":""
},
"c8y_VpnInfo":{
"...":""
},
"c8y_Command":{
"...":""
},
"c8y_Restart":{
"...":""
},
"c8y_MotionTracking":{
"active":true
},
"c8y_DataPoint":{
"...":""
}
}
Is this normal?
Regards
Sharry