Аналитика
Каждая операция этой группы: что она принимает, что возвращает и какими ошибками может ответить.
Операции
The numbers behind the Analytics page of the app: how mail arrives in the mailbox, and what became of the mail the workspace sent.
GET/analytics/mailbox
Read how mail arrives
How mail arrives, as the Analytics page of the app shows it, for a window of 30 days up to now unless from and to say otherwise: conversations per day or per grain bucket and per hour of the day, the addresses they arrived at, the senders who wrote most, how many wait on a reply for 1, 3, 7 days or more, and the folders. A key or an app limited to particular addresses counts only the mail that arrived at them, and address narrows everything to one address.
Requires the threads:read scope.
Параметры запроса
fromstringThe start of the window, ISO 8601 with a zone. Defaults to 30 days before
to.Форматdate-timetostringThe end of the window. Defaults to now.
Форматdate-timeoffsetMinutesintegerMinutes east of UTC to cut days and hours in, from -840 to 840. Pass the reader’s offset so a day breaks where theirs does.
Не меньше -840Не больше 840По умолчанию0grainstringHow wide one bucket of
daysandseriesis.Одно из"minute""hour""day"По умолчанию"day"addressstringCount only the mail delivered to this address. One the key does not reach counts nothing.
От 3 до 320 символов
Возвращает
The numbers for the window.
Ошибки
Ошибки, которые может вернуть любая операция400401403404422500Каталог ошибок
Также доступно в
GET/analytics/sending
Read what became of sent mail
What the workspace sent inside a window and what became of it, as the Analytics page of the app shows it: delivered, failed, bounced and complained, per day or per grain bucket, with the statuses, the sources, the senders and the addresses suppressed. The window is days, 30 by default and at most 365, or minutes, which wins, and it starts at the beginning of its oldest bucket. A key or an app limited to particular addresses counts only the mail sent from them.
Requires the emails:read scope.
Параметры запроса
daysintegerWindow length in days.
Не меньше 1Не больше 365По умолчанию30minutesintegerWindow length in minutes, which wins over
days.Не меньше 1Не больше 525600grainstringHow wide one bucket of
daysis.Одно из"minute""hour""day"По умолчанию"day"offsetMinutesintegerMinutes east of UTC to cut the buckets in, from -840 to 840.
Не меньше -840Не больше 840По умолчанию0addressstringCount only the mail sent from this address. One the key does not reach counts nothing.
От 3 до 320 символов
Возвращает
The numbers for the window.
Ошибки
Ошибки, которые может вернуть любая операция400401403404422500Каталог ошибок
Также доступно в
Объекты
MailboxInsightsobject
objectstringОбязательно- Одно из
"mailbox_insights" fromstringОбязательно- Формат
date-time tostringОбязательно- Формат
date-time grainstringОбязательно- Одно из
"minute""hour""day"По умолчанию"day" offsetMinutesintegerОбязательноscannedintegerОбязательноConversations that arrived inside the window.
daysobject[]ОбязательноdaystringОбязательноThe bucket:
YYYY-MM-DD,YYYY-MM-DDTHHorYYYY-MM-DDTHH:MMbygrain.countintegerОбязательно
hoursobject[]ОбязательноhourintegerОбязательноThe hour of the day, 0 to 23, in
offsetMinutes.countintegerОбязательно
addressesobject[]ОбязательноaddressstringОбязательноThe address the mail arrived at.
countintegerОбязательно
sendersobject[]ОбязательноThe senders who wrote most, most first.
emailstringnamestring- Может быть null
countintegerlastAtstring- Формат
date-time
senderCountintegerОбязательноEveryone who wrote inside the window.
waitingobject[]ОбязательноConversations whose last message came from somebody else, by how many days it has waited.
bandintegerОбязательноAt least this many days.
countintegerОбязательно
unattributedintegerОбязательноMail that recorded no address it arrived at.
foldersobject[]Обязательноlabelstringcountintegerunreadinteger
seriesobject[]ОбязательноPer bucket counts for the top addresses and senders, so each can be charted.
kindstringkeystringdaystringcountinteger
SendingAnalyticsobject
objectstringОбязательно- Одно из
"sending_analytics" sincestringОбязательно- Формат
date-time untilstringОбязательно- Формат
date-time grainstringОбязательно- Одно из
"minute""hour""day"По умолчанию"day" offsetMinutesintegerОбязательноtotalsobjectОбязательноsendsintegertestSendsintegerrecipientsintegerdeliveredintegerfailedintegerbouncedintegercomplainedintegeruncertainintegerpendinginteger
daysobject[]Обязательноdaystringsentintegerdeliveredintegerfailedintegerbouncedintegercomplainedinteger
statusesobject[]ОбязательноSends by status.
labelstringОбязательноWhat is counted.
countintegerОбязательно
sourcesobject[]ОбязательноSends by where they came from: the app, the API, a broadcast and the rest.
labelstringОбязательноWhat is counted.
countintegerОбязательно
sendersobject[]ОбязательноSends by the address they went out as.
labelstringОбязательноWhat is counted.
countintegerОбязательно
suppressedobject[]ОбязательноAddresses that were suppressed, by reason.
labelstringОбязательноWhat is counted.
countintegerОбязательно