Hi All,
I am currently running an API call to pull back a load of call logs from my VOIP provider - but when I run the call, I get over 100 results in JSON - is there any way to loop though these and display these in a listed format in HomeAssistant?
Here is an example of the JSON I get back…
{
“items”: [
{
“id”: “111111111111”,
“source”: “+1234567890”,
“target”: “+9876543210”,
“sourceAlias”: “”,
“targetAlias”: “”,
“type”: “CALL”,
“created”: “2019-05-21T06:56:20Z”,
“lastModified”: “2019-05-21T06:57:12Z”,
“direction”: “INCOMING”,
“incoming”: true,
“status”: “PICKUP”,
“connectionIds”: [
“p0”
],
“read”: false,
“archived”: false,
“note”: null,
“endpoints”: [
{
“type”: “ROUTED”,
“endpoint”: {
“extension”: “p0”,
“type”: “PHONELINE”
}
}
],
“starred”: false,
“labels”: ,
“callId”: “”,
“recordingUrl”: “”,
“recordings”: ,
“duration”: 0,
“responder”: “”,
“responderAlias”: “”
},
{
“id”: “22222222222”,
“source”: “+1234567890”,
“target”: “+9876543210”,
“sourceAlias”: “”,
“targetAlias”: “”,
“type”: “CALL”,
“created”: “2019-05-20T13:07:03Z”,
“lastModified”: “2019-05-20T13:13:06Z”,
“direction”: “INCOMING”,
“incoming”: true,
“status”: “PICKUP”,
“connectionIds”: [
“p0”
],
“read”: false,
“archived”: false,
“note”: null,
“endpoints”: [
{
“type”: “ROUTED”,
“endpoint”: {
“extension”: “p0”,
“type”: “PHONELINE”
}
}
],
“starred”: false,
“labels”: ,
“callId”: “”,
“recordingUrl”: “”,
“recordings”: ,
“duration”: 0,
“responder”: “”,
“responderAlias”: “”
}
],
“totalCount”: 6
}
I would be looking at pulling out the ‘Source’,‘Target’ and ‘Status’ fields to show in Home Assistant.
Is this possible?
Thanks