# Crash endpoints (Client API: game servers)

> 3 FeatherPanel Client API: game servers endpoints from user/server/crash.php: methods, paths, auth, permissions, rate limits, parameters and responses.

Source: https://featherpanel.com/docs/api/reference/user/server/crash/

Defined in [`backend/app/routes/user/server/crash.php`](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/routes/user/server/crash.php). Authentication used here: **Server access**. Read [Authentication](https://featherpanel.com/docs/api/authentication/) for how to send credentials and [Rate limits and errors](https://featherpanel.com/docs/api/rate-limits-and-errors/) for the response envelope.

Paths, methods, permissions and rate limits come from the route file. Summaries, parameters and response codes come from the OpenAPI annotations on the controllers; endpoints without annotations show only what the route file declares.

## Endpoints

### GET `/api/user/servers/{uuidShort}/crash`

- Auth: Server access
- Default rate limit: 30 / minute (`user-server-crash`)
- Route name: `user-server-crash`
- [route source](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/routes/user/server/crash.php#L24)

**Last crash and auto restart setting**

| Parameter | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `uuidShort` | path | string | yes |  |

```bash
curl -X GET "$PANEL_URL/api/user/servers/$UUID_SHORT/crash" \
  -H "Authorization: Bearer $FEATHERPANEL_API_KEY" \
  -H "Accept: application/json"
```

Responses: `200` Crash info

### DELETE `/api/user/servers/{uuidShort}/crash`

- Auth: Server access
- Default rate limit: 30 / minute (`user-server-crash`)
- Route name: `user-server-crash`
- [route source](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/routes/user/server/crash.php#L24)

**Last crash and auto restart setting**

| Parameter | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `uuidShort` | path | string | yes |  |

```bash
curl -X DELETE "$PANEL_URL/api/user/servers/$UUID_SHORT/crash" \
  -H "Authorization: Bearer $FEATHERPANEL_API_KEY" \
  -H "Accept: application/json"
```

Responses: `200` Crash info

### PUT `/api/user/servers/{uuidShort}/crash/auto-restart`

- Auth: Server access
- Default rate limit: 10 / minute (`user-server-crash-auto-restart`)
- Route name: `user-server-crash-auto-restart`
- Controller: [`ServerCrashController::setAutoRestart`](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/Controllers/User/Server/ServerCrashController.php)
- [route source](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/routes/user/server/crash.php#L40)

**Turn automatic restart after a crash on or off**

| Parameter | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `uuidShort` | path | string | yes |  |

| Body field | Type | Required | Description |
| --- | --- | --- | --- |
| `enabled` | boolean | no |  |

```bash
curl -X PUT "$PANEL_URL/api/user/servers/$UUID_SHORT/crash/auto-restart" \
  -H "Authorization: Bearer $FEATHERPANEL_API_KEY" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{"enabled":false}'
```

Responses: `200` Updated
