stats_snapshot

The stats_snapshot method generates a URL from which a stats snapshot can be downloaded.

๐Ÿ“˜

Note:

URLs are valid for only 15 minutes after generation.

Syntax

{
    <credentials object>
    "type": company | domain,
    "object": <name of the company or domain>, 
    "date": <stats period from stats_list>
}

Request fields for stats_snapshot

The following fields can be used in the stats_snapshot method:

Field nameObligationDefinition/Value
dateRequiredThe date for which you want to see statistics, in the format YYYY-MM. Available periods can be retrieved by using the stats_list method.
objectRequiredThe name of the company or domain
typeRequiredThe type of entity for which you want to see statistics.

Allowed values are company or domain.

Response fields for stats_snapshot

The following fields can be used in the stats_snapshotmethod:

Field nameObligationDescription/Value
errorReturned if success = falseA text string that explains the error.
error_numberReturned if success = falseA number that represents the error.
snapshotReturned if success = trueThe URL from which you can download the stats for the specified period.
successAlways returnedIndicates whether the request was successful or not. Allowed values are true and false.

Examples for stats_snapshot

Request

{
  "credentials": {
  "user": "[email protected]",
    "password": "sw0rdf1sh"
  },
  "object": "example.com",
  "type": "domain",
  "date": "2010-11"
}

Response

{
	"success": true,
	"snapshot":
"https://admin.a.hostedemail.com/api/oma_file/get?type=snapshot&id=exam ple.com%3Adomain%3A2010- 11&user=marlin%40example.adm&token=07202b1a7af002692018b60a22d82afa"
}