Check the account's Redis socket
GET /api/v2/shared-hosting/{accountId}/diagnostics/redis
Check whether the web hosting account’s Redis socket file exists. The call also reads whether the PHP Redis extension is on in the account’s PHP settings. Nothing connects to Redis. connectionTested is always false and ping is always null. A socket that exists does not prove that Redis answers. The call cannot start or stop Redis and cannot read cached values. The account must be active and on 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_…).Query parameters
domainstringA domain on this account. Default: the account’s main domain. The result is the same for every domain on the account.
Example
curl "https://cloud.hostup.se/api/v2/shared-hosting/acct_01hxa3b4c5d6e7f8g9h0j1k2m3/diagnostics/redis" \ -H "Authorization: Bearer $HOSTUP_API_KEY"Responses
200 What is known about the account’s Redis socket.
{ "domain": "example.com", "socketPath": "/home/abcde/.redis/redis.sock", "transport": "unix", "tcpPort": null, "status": "socket_missing", "ping": null, "phpSelectorVersion": "8.2", "phpSelectorRedisExtensionEnabled": false, "phpEvidence": "Account PHP Selector configuration only, read through cPanel. Website runtime and Redis connection are not tested.", "connectionTested": false}Response fields
domainstringThe domain used to find the account’s home folder.
socketPathstringPath of the account’s Redis socket.
transportstringAlways
unix. One of unix.tcpPortnullAlways null.
statusstringsocket_present_unverified: the socket file exists. socket_missing: it does not. access_denied: it could not be checked. unknown: the check failed. One of socket_present_unverified, socket_missing, access_denied, unknown.pingnullAlways null. Redis is not contacted.
phpSelectorVersionstring or nullThe PHP version selected for the account, for example
8.2. Null when unknown.phpSelectorRedisExtensionEnabledboolean or nullTrue when the Redis extension is on for that PHP version. Null when the setting could not be read.
phpEvidencestringWhat the PHP fields are based on.
connectionTestedbooleanAlways false. One of
false.Errors
Errors are Problem Details with a stable code. Branch on the code, not on the text.
| 400 | Unknown or repeated query parameter. |
| 401 | Authentication required. |
| 403 | Missing scope. Domain not on this account (domain_not_owned). The account’s home folder could not be verified (protected_path). |
| 404 | The account was not found. |
| 409 | The account is not on cPanel (account_not_eligible_cpanel). |
| 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. |
| 502 | The check could not finish. The Redis state is unknown. |