Skip to content

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

accountIdstringrequired
The web hosting account ID (acct_…).

Query parameters

domainstring
A domain on this account. Default: the account’s main domain. The result is the same for every domain on the account.

Example

GET /api/v2/shared-hosting/{accountId}/diagnostics/redis
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.

Response 200
{
"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
domainstring
The domain used to find the account’s home folder.
socketPathstring
Path of the account’s Redis socket.
transportstring
Always unix. One of unix.
tcpPortnull
Always null.
statusstring
socket_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.
pingnull
Always null. Redis is not contacted.
phpSelectorVersionstring or null
The PHP version selected for the account, for example 8.2. Null when unknown.
phpSelectorRedisExtensionEnabledboolean or null
True when the Redis extension is on for that PHP version. Null when the setting could not be read.
phpEvidencestring
What the PHP fields are based on.
connectionTestedboolean
Always false. One of false.

Errors

Errors are Problem Details with a stable code. Branch on the code, not on the text.

400Unknown or repeated query parameter.
401Authentication required.
403Missing scope. Domain not on this account (domain_not_owned). The account’s home folder could not be verified (protected_path).
404The account was not found.
409The account is not on cPanel (account_not_eligible_cpanel).
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.
502The check could not finish. The Redis state is unknown.