get_metrics
URL: https://api.postageapp.com/v.1.0/get_metrics.json
To get data on aggregate delivery and open status for a project, broken down by current hour, current day, current week, current month with the previous of each as a comparable.
This endpoint requires just the API key for the project:
{
"api_key" : "PROJECT_API_KEY"
}
On success, the following data is returned:
{
"response": {
"status": "ok",
"uid": null,
"message": "metrics"
},
"data": {
"metrics": {
"hour": {
"delivered": {
"current_percent": 97,
"previous_percent": 99,
"diff_percent": -2,
"current_value": 4219,
"previous_value": 4522
},
"opened": {
SAME_FORMAT_AS_DELIVERED
},
"failed": {
SAME_FORMAT_AS_DELIVERED
},
"rejected": {
SAME_FORMAT_AS_DELIVERED
},
"created": {
SAME_FORMAT_AS_DELIVERED
},
"queued": {
SAME_FORMAT_AS_DELIVERED
}
},
"date": {
SAME_FORMAT_AS_HOUR
},
"week": {
SAME_FORMAT_AS_HOUR
},
"month": {
SAME_FORMAT_AS_HOUR
}
}
}
}