Skip to content

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

accountIdstringrequired
The web hosting account ID (acct_…).

Example

GET /api/v2/shared-hosting/{accountId}/wordpress/actions/scan
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.

Response 200
{
"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 object
pathstring
Folder of the site on the account.
urlstring
Address of the site.
domainstring
Domain the site runs on.
versionstring
WordPress version.
databasestring
Name of the site’s database.
installationKeystring
Key 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.

400Invalid request. The response body is an RFC 7807 Problem Details document.
401Unauthorized. Authentication is required.
403Forbidden. The caller lacks a required scope or does not own the resource.
404Not found. The resource does not exist or is not owned by the caller.
409Conflict. code is account_suspended.
429Rate limited. Retry after the limit resets. 429 responses include Retry-After seconds plus X-RateLimit-* headers.
500Internal error. Retry later or contact support if the issue persists.