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 IN SCOPE
API exposed by the sample flow Get IMSI with no traffic in the last week
Method GET
IoT Accelerator APIs in scope

Search Subscription Details

Subscription signalling usages

Endpoint http://localhost:1880/get_aggregrated_traffic/last_week?customerNo=<CUSTOMERNO>
Headers
  • username
  • password
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.

Available resources

NodeRed® Flows

The described flow is available for download, ready to be imported and used in your NodeRed® client. If you want to know more about how to import flows in NodeRed, visit the dedicated instructions available here.

NOTE: The flow uses a node that is not included in the standard Node-RED palette, and it is required to make the flow working. The node is called loop from module node-red-contrib-loop. You can easily install it by using the Node-Red feature “manage palette”, selecting tab “Install” and then typing “node-red-contrib-loop” in the search box.

Download

Postman Flow

The described flow is available for download, ready to be imported and used in your Postman client. If you want to know more about how to import flows in Postman, visit the dedicated instructions available here.

Download