Use Case: Get IMSI with no traffic in the last 7 days
This use case shows how to retrieve data and SMS traffic produced by a given enterprise within the last 7 days, also identifying those IMSI that did not perform any traffic in such time frame. The last info could be used for troubleshooting purpose.
The use case is realized by implementing a sample application flow in NodeRed® and Postman. The sample flows are available and downloadable from the "Available resources" section of this page.
The flow exposes a new API: "Get IMSI with no traffic", which includes some parameters of the native APIs of IoT Accelerator to facilitate their usage.
API exposed by the sample flow | Get IMSI with no traffic in the last week |
Method | GET |
IoT Accelerator APIs in scope | |
Endpoint | http://localhost:1880/get_aggregrated_traffic/last_week?customerNo=<CUSTOMERNO> |
Headers |
|
Parameters | customerNo - a string value that denotes the customer number |
REQUEST
GET /get_aggregrated_traffic/last_week?customerNo=xxxxxx HTTP/1.1
Host: localhost:1880
x-username: xxxx
x-password: xxx
Accept: */*
Cache-Control: no-cache
Host: localhost:1880
Accept-Encoding: gzip, deflate
Connection: keep-alive
cache-control: no-cache
RESPONSE
{
"Enterprise": "12345678",
"aggregatedTrafficPeriod": {
"from": "2022-09-11",
"to": "2022-09-18"
},
"aggregatedTrafficLast7days": {
"SMS":5,
"data":1219127
},
"noTrafficIMSILast7days": [
"xxxxxxxxxxxxxxx",
"yyyyyyyyyyyyyyy",
"zzzzzzzzzzzzzzz"
]
}
ERROR RESPONSES
It might happen during traffic peak period that the rate limit control of the API used in this use case errors could be reached.
In such a condition, the Node-RED flow will return an HTTP 500 status code, with the following message indicating for which API the limit was reached:
{"Generic Error. Bad response from API "}
No retry schema have been implemented in this sample use case.