MagicWP Docs
WordPress

Table sizes, overhead and cleanup counts

GET
/v1/sites/{site_id}/wp/database/stats

Permission: site.view

Authorization

apiToken
headerAuthorizationBearer <token>

An API token (mwp_…) from Settings → API tokens. Only accepted on this host.

Path Parameters

site_id*Site Id
Formatuuid

Response Body

Successful Response

application/json
  1. response
success*boolean
data*

Table sizes, overhead and cleanup counts, largest table first.

message*string
status_code*integer
timestamp*string
Formatdate-time
meta?|null
curl -X GET "https://example.com/v1/sites/497f6eca-6276-4993-bfeb-53cbbbba6f08/wp/database/stats"
{  "message": "string",  "status_code": 0,  "timestamp": "2019-08-24T14:15:22Z",  "meta": {},  "success": true,  "data": {    "tables": [      {        "name": null,        "rows": 0,        "size": 0,        "overhead": 0      }    ],    "total_size": 0,    "total_overhead": 0,    "cleanup": {      "revisions": 0,      "auto_drafts": 0,      "trash": 0,      "spam_comments": 0,      "expired_transients": 0    }  }}