Get quota usage stats

Fetch quota usage statistics for accounts administered by MasterAdmin and DomainAdmin.

The results are sorted by highest usage percentage.

  • HTTP Method: GET
  • URL: https://example.domain.tld/api/v1/stats/quota/
  • Require authentication: Yes
  • Permission level required: MasterAdmin / DomainAdmin

Query parameters

Parameter Type Description Required
limit int Number of records (max 50) Optional
start int Record offset Optional
search str Search term Optional
perm_level str Permission level Optional
  • For MasterAdmin, valid perm_level parameters are: DomainAdmin or MailUser.
  • For DomainAdmin, valid perm_level parameter is MailUser.

Response parameters

Parameter Type Description
storagequota_total int Total storage quota (MB)
storagequota_used int Storage quota used (MB)
use_percent int Usage percentage (%)
username str Account username

Example request (Python)

import requests
import json
from pprint import pprint

url = "https://example.domain.tld/api/v1/stats/quota/?search=@vonmail.com&perm_level=MailUser&limit=3&start=0"
r = requests.get(url, auth=("admin","long-auth_token-here"))
try:
    pprint(r.json())
except:
    print(r.text)

Example response (JSON)

[{'storagequota_total': 500,
  'storagequota_used': 403,
  'use_percent': 80,
  'username': 't3@vonmail.com'},
 {'storagequota_total': 500,
  'storagequota_used': 389,
  'use_percent': 77,
  'username': 't7@vonmail.com'},
 {'storagequota_total': 100,
  'storagequota_used': 35,
  'use_percent': 35,
  'username': 't5@vonmail.com'}]