SAP Cloud Platform Integration – Number of messages
With the simplification of the pricing of our Integration Suite (see details here) – now based on messages- some customers start asking themselves how many messages actually flow through their Integration service tenant per month.
Indeed, until now the Integration service (aka. CPI) was based on number of connections and bandwidth. If you move to the Integration Suite, it’s good to have an idea of the number of messages flowing through there. Note that not all messages are counted though, for instance not the ones exchanged between 2 SAP applications.
Anyway: in order to do get an overview of the amount of messages, you can use the configurable dashboards or the Integration APIs.
Using the dashboards
This one is really simple…: log into your CPI sub-account and navigate to the “Monitoring” section.
Then click on the tile with a “+” and select the right conditions:
Click on “OK” and that’s it:
Through REST APIs
As you certainly know, all integration artefacts are accessible over REST APIs.
You can use that API in WebIDE, Excel or any other tool that can talk to REST APIs – or you can use Postman. In our case, we’ll use Postman and its scripting capability.
1- Open your Postman client and create a new GET request. The URL should look something like this:
If you are not sure, you can log into the API Business Hub and define your own environment. When testing, you can extract the URL from the CURL command.
2- Now you need to add the right parameters:
$filter=LogEnd ge datetime’<start date>‘ and LogStart le datetime'<end date>’
Eventually, the full URL looks like this:
https://<yourID>-tmn.hci.eu1.hana.ondemand.com/itspaces/odata/api/v1/MessageProcessingLogs?$inlinecount=allpages&$format=json&$orderby=LogEnd desc&$top=50&$filter=LogEnd ge datetime’<start date>‘ and LogStart le datetime’<end date>‘
The start date and end date must have the following format:
var moment = require('moment') logStart = moment().toISOString(); logStart = logStart.slice(0,-5); pm.globals.set("logStart", logStart); logEnd = moment().subtract(1, 'month').toISOString(); logEnd = logEnd.slice(0,-5); pm.globals.set("logEnd", logEnd);
This will create variables that you can now use in the parameters.