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 name

Obligation

Definition/Value

date

Required

The date for which you want to see statistics, in the format YYYY-MM. Available periods can be retrieved by using the stats_list method.

object

Required

The name of the company or domain

type

Required

The 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 name

Obligation

Description/Value

error

Returned if success = false

A text string that explains the error.

error_number

Returned if success = false

A number that represents the error.

snapshot

Returned if success = true

The URL from which you can download the stats for the specified period.

success

Always returned

Indicates 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"
}