stats_summary

The stats_summary method displays summary statistics for a user, domain, or company.

Syntax

{
    <credentials object>
    "type": company | domain | user,
    "object": <name of the company, domain or user>, 
    "by": day | week | month
}

Request fields for stats_summary

The following fields can be used in the stats_summary method:

Field nameObligationDefinition/Value
byOptionalThe interval that you want displayed in the response for the statistics summary. Allowed values are day, week, and month.

day—Display information for each of the most recent 30 days.

week—Display information for each of the most recent 52 weeks;; each week begins on a Monday.

* month—Display information for the most recent 48 months.
objectOptionalThe name of the company, domain, or user for which you want to view statistics.
typeOptionalThe type of object. Allowed values are company, domain, or user.

Response fields for stats_summary

The following fields may be returned in response to the stats_summary
method:

Field nameObligationDescription/Value
errorReturned if success = falseA text string that explains the error.
error_numberReturned if success = falseA number that represents the error.
successAlways returnedIndicates whether the request was successful or not. Allowed values are true and false.
summaryReturned if success = trueLists the statistics for the periods specified in the by field in the request: day, week, or month.

For more information, see the "Summary fields" table below.

Summary fields

The following fields may be returned within the summary array.

Field nameObligationDescription/Value
deleted_usersReturned if success = trueLists information about deleted accounts.

storage_items_stored—The aggregate number of messages held in these deleted accounts.

storage_current_size—The aggregate size (in bytes) of messages held in these deleted accounts.
loginsReturned if success = trueLists information about logins during the specified period.

imap4—The number of logins via IMAP4 protocol during the period.

pop3—The number of logins via POP3 during the period.

* webmail—The number of logins via Webmail during the period.
messagesReturned if success = trueLists information about messages sent and received during the specified period.

autorespond_count—The number of auto-responses sent in the period.

denied—The number of inbound messages rejected in the period.

forward_count—The number of messages forwarded in the period.

in_ham—The number of messages received in the period that were not spam.

in_size—The number of bytes in messages received in the period, (not including spam).

in_spam—The number of spam messages received in the period.

out_msg_count—The number of messages sent in the period.

out_rcpt_count—The number of recipients to whom messages were sent in the period.

* out_size—The number of bytes in messages sent in the period.
servicesReturned if success = trueSpecifies the number of users for each service during the specified period.

smtprelay—The number of users with this service enabled in the period.

smtpin—The number of users with this service enabled in the period.

imap4—The number of users with this service enabled in the period.

pop3—The number of users with this service enabled in the period.

* webmail—The number of users with this service enabled in the period.
storageReturned if success = trueDisplays information about messages stored.

items_stored—The number of messages stored.

current_size—The total size (in bytes) of stored messages.
usersReturned if success = trueDisplays the number of users for each account type during the specified period.

filter—The number of filter only users.

forward—The number of forward only users.

deleted—The number of recoverable (soft-deleted) users.

mailbox—The number of regular mailboxes.

* alias—The number of aliases.

Examples for stats_summary

Example 1

Request

{
  "credentials": {
    "user": "[email protected]",
    "password": "sw0rdf1sh"
  },
  "object": "example.com",
  "type": "domain",
  "by": "day"
}

Response

{
  	"success": true,
  	"summary": {
    	"20111219": {
      	"messages": {
				"autorespond_count": 0, 
      	"in_size": 0, 
      	"out_msg_count": 0, 
      	"in_spam": 0, 
      	"out_size": 0, 
      	"forward_count": 0, 
      	"in_ham": 0, 
      	"out_rcpt_count": 0, 
      	"denied": 0
			},
    	"services": {
    		"smtprelay": 10,
    		"smtpin": 10,
    		"imap4": 10,
    		"pop3": 10,
    		"webmail": 10
  		},
  		"deleted_users": {
    		"storage_items_stored": 0,
    		"storage_current_size": 0
  		},
  		"users": {
    		"filter": 0,
    		"forward": 2,
    		"deleted": 1,
    		"mailbox": 7,
    		"alias": 1
  		},
  		"logins": {
    		"imap4": 0,
    		"pop3": 0,
    		"webmail": 0
  		},
  		"storage": {
    		"items_stored": 6,
    		"current_size": 141653
  		}
		},
		"20111228": {
			"messages": { 
    		"autorespond_count": 0,
    		"in_size": 0,
    		"out_msg_count": 0,
    		"in_spam": 0,
    		"out_size": 0,
      	"forward_count": 0,
    		"in_ham": 0,
    		"out_rcpt_count": 0,
    		"denied": 0
  		},
  		"services": {
    		"smtprelay": 10,
    		"smtpin": 10,
    		"imap4": 10,
    		"pop3": 10,
    		"webmail": 10
  		},
  		"deleted_users": {
    		"storage_items_stored": 0,
    		"storage_current_size": 0
  		},
  		"users": {
    		"filter": 0,
    		"forward": 2,
    		"deleted": 1,
    		"mailbox": 7,
    		"alias": 1
  		},
  		"logins": {
    		"imap4": 0,
    		"pop3": 0,
    		"webmail": 0
  		},
  		"storage": {
    		"items_stored": 6,
    		"current_size": 141653
  		}
		},
		"20120106": {
  		"messages": {
    		"autorespond_count": 0, 
      	"in_size": 0, 
      	"out_msg_count": 0, 
      	"in_spam": 0, 
      	"out_size": 0, 
      	"forward_count": 0, 
      	"in_ham": 0, 
      	"out_rcpt_count": 0, 
      	"denied": 0
			},
			"services": {
  			"smtprelay": 11,
  			"smtpin": 11,
  			"imap4": 11,
  			"pop3": 11,
  			"webmail": 11
			},
			"deleted_users": {
  			"storage_items_stored": 0,
  			"storage_current_size": 0
			},
			"users": {
  			"filter": 0,
  			"forward": 2,
  			"deleted": 1,
  			"mailbox": 8,
  			"alias": 0
			},
			"logins": {
  			"imap4": 0,
  			"pop3": 0,
  			"webmail": 0
			},
			"storage": {
  			"items_stored": 7,
      	"current_size": 142017
    	}
		},
		"20111215": {
			"messages": { 
    		"autorespond_count": 0,
    		"in_size": 0,
    		"out_msg_count": 0,
    		"in_spam": 0,
    		"out_size": 0,
    		"forward_count": 0,
    		"in_ham": 0,
    		"out_rcpt_count": 0,
    		"denied": 0
  		},
  		"services": {
    		"smtprelay": 10,
    		"smtpin": 10,
    		"imap4": 10,
    		"pop3": 10,
    		"webmail": 10
  		},
  		"deleted_users": {
    		"storage_items_stored": 0,
    		"storage_current_size": 0
  		},
  		"users": {
    		"filter": 0,
    		"forward": 2,
    		"deleted": 1,
    		"mailbox": 7,
    		"alias": 1
  		},
  		"logins": {
				"imap4": 0,
      	"pop3": 0,
  			"webmail": 0
			},
			"storage": {
  			"items_stored": 6,
  			"current_size": 141653
			}
    			"20111221": 
  	{
			"messages": {
				"autorespond_count": 0, 
      	"in_size": 0, 
      	"out_msg_count": 0, 
      	"in_spam": 0, 
      	"out_size": 0, 
      	"forward_count": 0, 
      	"in_ham": 0, 
      	"out_rcpt_count": 0, 
      	"denied": 0
			},
			"services": {
  			"smtprelay": 10,
  			"smtpin": 10,
  			"imap4": 10,
  			"pop3": 10,
  			"webmail": 10
			},
			"deleted_users": {
  			"storage_items_stored": 0,
  			"storage_current_size": 0
			},
			"users": {
  			"filter": 0,
  			"forward": 2,
  			"deleted": 1,
  			"mailbox": 7,
    		"alias": 1 
  		},
  		"logins": {
    		"imap4": 0,
    		"pop3": 0,
    		"webmail": 0
  		},
  		"storage": {
    		"items_stored": 6,
    		"current_size": 141653
  		}
		},
		 		 ...
		"20111229": {
  		"messages": {
				"autorespond_count": 0, 
  			"in_size": 0, 
  			"out_msg_count": 0, 
  			"in_spam": 0, 
  			"out_size": 0, 
  			"forward_count": 0, 
  			"in_ham": 0, 
  			"out_rcpt_count": 0, 
  			"denied": 0
  		},
  		"services": {
    		"smtprelay": 10,
    		"smtpin": 10,
    		"imap4": 10,
    		"pop3": 10,
    		"webmail": 10
  		},
  		"deleted_users": {
    		"storage_items_stored": 0,
    		"storage_current_size": 0
  		}, 
  		"users": {
  			"filter": 0,
  			"forward": 2,
  			"deleted": 1,
  			"mailbox": 7,
  			"alias": 1
			},
			"logins": {
  			"imap4": 0,
  			"pop3": 0,
  			"webmail": 0
			},
			"storage": {
  			"items_stored": 6,
  			"current_size": 141653
			}
 	 	} 
  }
}

Example 2

Displays daily summary statistics for user [email protected].

Request

"credentials": {
    "user": "[email protected]",
    "password": "sw0rdf1sh"
  },
  "object": "[email protected]",
  "type": "user",
  "by": "day"
}

Response

{
  "success":true,
  "summary":{
    "20120111":{
      "messages":{
        "in_size":"",
        "out_msg_count":"",
        "in_spam":"",
        "autorespond_count":"",
        "out_size":"",
        "forward_count":"",
        "in_ham":"",
        "out_rcpt_count":"",
        "denied":""},
      "services":{
        "smtprelay":"enabled",
        "smtpin":"enabled",
        "imap4":"enabled",
        "pop3":"enabled",
        "webmail":"enabled"},
      "delivery":{
        "autoresponder":"1",
        "fonly":"0"},
			"forward":"[email protected]",
			"createtime":"Thu Jul 21 17:46:22 2011 UTC", 
      "workgroup":"staff", 
      "account_type":"mailbox",
			"logins":{
				"last_imap4":"Fri Dec 9 01:16:12 2011 UTC", 
        "imap4":"",
				"auth_token":"",
				"webmail":"",
				"last_webmail":"Fri Jan 6 18:00:33 2012 UTC", 
        "auth_password":"",
        "pop3":"",
				"last_pop3":"Fri Dec 9 01:31:09 2011 UTC", 
        "last_smtprelay":"Thu Jun 9 16:50:46 2011 UTC", 
        "last_smtpin":"Mon Nov 21 19:54:05 2011 UTC"},
      "storage":{
        "items_stored":"31",
        "allowed_size":"6442450944",
        "current_size":"733839"},
      "deletetime":""
    },
	 ...  
	}
}