## GET /api/v2/shared-hosting/{accountId}/diagnostics/redis

**Check the account's Redis socket**

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.

### Related Endpoints

- `GET /api/v2/shared-hosting/{accountId}/diagnostics/files`: Inspect website files
- `GET /api/v2/shared-hosting/{accountId}`: Get a web hosting account
- `PATCH /api/v2/shared-hosting/{accountId}`: Rename a web hosting account

### Headers

- `Authorization`: Bearer $HOSTUP_API_KEY
- Scopes: `read:hosting`, `console:services`

### Parameters

- `accountId` (path, string, required): The web hosting account ID (`acct_…`). Example: `acct_01hxa3b4c5d6e7f8g9h0j1k2m3`
- `domain` (query, string): A domain on this account. Default: the account's main domain. The result is the same for every domain on the account. Example: `example.com`

### Request Example

```bash
curl "https://cloud.hostup.se/api/v2/shared-hosting/acct_01hxa3b4c5d6e7f8g9h0j1k2m3/diagnostics/redis" \
  -H "Authorization: Bearer $HOSTUP_API_KEY"
```

### Response Schema

- `domain` (string, required): The domain used to find the account's home folder.
- `socketPath` (string, required): Path of the account's Redis socket.
- `transport` (string, required): Always `unix`.
  Allowed values: unix
- `tcpPort` (null, required): Always null.
- `status` (string, required): `socket_present_unverified`: the socket file exists. `socket_missing`: it does not. `access_denied`: it could not be checked. `unknown`: the check failed.
  Allowed values: socket_present_unverified, socket_missing, access_denied, unknown
- `ping` (null, required): Always null. Redis is not contacted.
- `phpSelectorVersion` (string, required, nullable): The PHP version selected for the account, for example `8.2`. Null when unknown.
- `phpSelectorRedisExtensionEnabled` (boolean, required, nullable): True when the Redis extension is on for that PHP version. Null when the setting could not be read.
- `phpEvidence` (string, required): What the PHP fields are based on.
- `connectionTested` (boolean, required): Always false.
  Allowed values: false

### Responses

#### 200 - What is known about the account's Redis socket.
```json
{
  "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
}
```

#### 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.
```json
{
  "type": "https://developer.hostup.se/errors/rate_limit_exceeded",
  "title": "Too many requests",
  "status": 429,
  "detail": "Rate limit exceeded. Please try again later.",
  "code": "rate_limit_exceeded",
  "instance": "/api/v2/resource",
  "requestId": "req_01hxa3b4c5d6e7f8g9h0j1k2m3",
  "timestamp": "2026-04-27T12:34:56.000Z"
}
```

#### 500 - Internal error. Retry later or contact support if the issue persists.
```json
{
  "type": "https://developer.hostup.se/errors/internal_error",
  "title": "Internal server error",
  "status": 500,
  "detail": "An unexpected error occurred. Retry later or contact support if the issue persists.",
  "code": "internal_error",
  "instance": "/api/v2/resource",
  "requestId": "req_01hxa3b4c5d6e7f8g9h0j1k2m3",
  "timestamp": "2026-04-27T12:34:56.000Z"
}
```

#### 502 - The check could not finish. The Redis state is unknown.
