Scan for WordPress sites
GET /api/v2/shared-hosting/{accountId}/wordpress/actions/scan
Looks through the web hosting account for WordPress sites that were not installed through Hostup, for example a site you uploaded yourself. Every site it finds is added to WordPress management. The sites then appear in GET /api/v2/shared-hosting/{accountId}/wordpress and work with the other WordPress endpoints.
The account must be active. results lists the sites found. It is empty when the account is not on cPanel or is suspended in cPanel.
Authentication: An API key with the scopes read:hosting and console:services. About keys and scopes
Request
Path parameters
accountIdstringrequiredThe web hosting account ID (
acct_…).Example
curl "https://cloud.hostup.se/api/v2/shared-hosting/acct_01hxa3b4c5d6e7f8g9h0j1k2m3/wordpress/actions/scan" \ -H "Authorization: Bearer $HOSTUP_API_KEY"Responses
200 The WordPress sites found.
{ "results": [ { "path": "/home/abcde/public_html", "url": "https://example.com", "domain": "example.com", "version": "6.5.5", "database": "abcde_wp_example", "installationKey": "public_html" } ]}Response fields
resultsarray of objectpathstringFolder of the site on the account.
urlstringAddress of the site.
domainstringDomain the site runs on.
versionstringWordPress version.
databasestringName of the site’s database.
installationKeystringKey for the site in
POST /api/v2/shared-hosting/{accountId}/wordpress/import.Errors
Errors are Problem Details with a stable code. Branch on the code, not on the text.
| 400 | Invalid request. The response body is an RFC 7807 Problem Details document. |
| 401 | Unauthorized. Authentication is required. |
| 403 | Forbidden. The caller lacks a required scope or does not own the resource. |
| 404 | Not found. The resource does not exist or is not owned by the caller. |
| 409 | Conflict. code is account_suspended. |
| 429 | Rate limited. Retry after the limit resets. 429 responses include Retry-After seconds plus X-RateLimit-* headers. |
| 500 | Internal error. Retry later or contact support if the issue persists. |