Monitoring Stats
GET Method
Description
The Monitoring Stats API is used to monitor the performance of different instances in the WhatsApp Business API Client. The WhatsApp instance monitoring solution allows the users to measure the performance of their query with current queue callback size and number of pending messages.
Note:
The Monitoring Stats service is exposed only to the whitelisted IPs. Please contact [email protected] if you want to access stats for your WhatsApp Business Numbers.
Base URL
https://api-webhook-monitor-whatsapp.api.kaleyra.io/
To monitor the stats information on WhatsApp, follow the below steps:
- Sign in to Kaleyra.io and create your API key.
Refer to the Create an API Key page for steps to create your API key. To view the API Key and the SID, see View API Key and SID.
Note:
After you sign up, your account will be on the trial version. You need to complete the KYC to access all the features of Kalyera.io.
API Command to monitor stats information
Request Format
curl --request GET 'https://api-webhook-monitor-whatsapp.api.kaleyra.io/v1/wamonitor/stats/<FROM_NUMBER>'
Note:
Replace the placeholders above with relevant values as mentioned below.
Parameters and Variables
The below table displays the parameter and variable used:
Parameter | Variable | Description | Example | Mandatory |
---|---|---|---|---|
FROM_NUMBER | Integer | The WhatsApp business number registered with Kaleyra.io from which the message is to be sent. Ensure the number is prefixed with the country code. (E164 format). | +1202XXXXXXX | True |
Response Format
This section provides you the successful JSON response format.
Success Response
"RESPONSE":{
"code":"WS201",
"message":"Requested processed successfully",
"error":{
},
"data":{
"stats":{
"app":{
"callback_queue_size":{
"data":[
{
"value":0
}
],
"help":"Current callback queue size",
"type":"gauge"
},
"callback_requests_duration_ms_count":{
"data":[
{
"labels":{
"result":"success",
"type":"inbound_message"
},
"value":4353
},
{
"labels":{
"result":"99",
"type":"status_change"
},
"value":359
},
{
"labels":{
"result":"success",
"type":"status_change"
},
"value":545780
},
Failure Response
{
"code": "WS406",
"message": "The accept header mismatches the supported server response!",
"error": {},
"data": []
}
{
"code": "WS500",
"message": "somthing went wrong !!!",
"error": {},
"data": []
}
Error Codes
The following table provides information about the error codes you would receive when executing the WhatsApp Monitoring Stats API.
Error Code | Description |
---|---|
ws406 | The accept header mismatches the supported server response. |
ws500 | Invalid or in-correct input of the From number. |
Facebook Documentation
Updated 11 months ago