# Schedules endpoints (Client API: web hosting)

> 8 FeatherPanel Client API: web hosting endpoints from user/webspaces/schedules.php: methods, paths, auth, permissions, rate limits, parameters and responses.

Source: https://featherpanel.com/docs/api/reference/user/webspaces/schedules/

Defined in [`backend/app/routes/user/webspaces/schedules.php`](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/routes/user/webspaces/schedules.php). Authentication used here: **Signed-in user**. 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/webspaces/{uuidShort}/schedules`

- Auth: Signed-in user
- Default rate limit: 30 / minute (`user-webspaces`)
- Route name: `user-webspaces-schedules`
- Controller: [`WebSpaceScheduleController::index`](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/Controllers/User/WebSpaces/WebSpaceScheduleController.php)
- [route source](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/routes/user/webspaces/schedules.php#L26)

**List WebSpace schedules**

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

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

### POST `/api/user/webspaces/{uuidShort}/schedules`

- Auth: Signed-in user
- Default rate limit: 10 / minute (`user-webspaces`)
- Route name: `user-webspaces-schedules-create`
- Controller: [`WebSpaceScheduleController::create`](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/Controllers/User/WebSpaces/WebSpaceScheduleController.php)
- [route source](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/routes/user/webspaces/schedules.php#L43)

**Create WebSpace schedule**

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

```bash
curl -X POST "$PANEL_URL/api/user/webspaces/$UUID_SHORT/schedules" \
  -H "Authorization: Bearer $FEATHERPANEL_API_KEY" \
  -H "Accept: application/json"
```

Plugin events: [`featherpanel:webspace:schedule:create`](https://featherpanel.com/docs/plugins/events/web-space/#web-space-schedule-created)

### POST `/api/user/webspaces/{uuidShort}/schedules/abort`

- Auth: Signed-in user
- Default rate limit: 10 / minute (`user-webspaces`)
- Route name: `user-webspaces-schedules-abort`
- Controller: [`WebSpaceScheduleController::abort`](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/Controllers/User/WebSpaces/WebSpaceScheduleController.php)
- [route source](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/routes/user/webspaces/schedules.php#L60)

**Abort WebSpace schedule run**

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

```bash
curl -X POST "$PANEL_URL/api/user/webspaces/$UUID_SHORT/schedules/abort" \
  -H "Authorization: Bearer $FEATHERPANEL_API_KEY" \
  -H "Accept: application/json"
```

### GET `/api/user/webspaces/{uuidShort}/schedules/{scheduleId}`

- Auth: Signed-in user
- Default rate limit: 30 / minute (`user-webspaces`)
- Route name: `user-webspaces-schedules-show`
- Controller: [`WebSpaceScheduleController::show`](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/Controllers/User/WebSpaces/WebSpaceScheduleController.php)
- [route source](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/routes/user/webspaces/schedules.php#L77)

**Get WebSpace schedule**

| Parameter | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `uuidShort` | path | \- | yes |  |
| `scheduleId` | path | \- | yes |  |

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

### PUT `/api/user/webspaces/{uuidShort}/schedules/{scheduleId}`

- Auth: Signed-in user
- Default rate limit: 10 / minute (`user-webspaces`)
- Route name: `user-webspaces-schedules-update`
- Controller: [`WebSpaceScheduleController::update`](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/Controllers/User/WebSpaces/WebSpaceScheduleController.php)
- [route source](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/routes/user/webspaces/schedules.php#L95)

**Update WebSpace schedule**

| Parameter | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `uuidShort` | path | \- | yes |  |
| `scheduleId` | path | \- | yes |  |

```bash
curl -X PUT "$PANEL_URL/api/user/webspaces/$UUID_SHORT/schedules/$SCHEDULE_ID" \
  -H "Authorization: Bearer $FEATHERPANEL_API_KEY" \
  -H "Accept: application/json"
```

Plugin events: [`featherpanel:webspace:schedule:update`](https://featherpanel.com/docs/plugins/events/web-space/#web-space-schedule-updated)

### DELETE `/api/user/webspaces/{uuidShort}/schedules/{scheduleId}`

- Auth: Signed-in user
- Default rate limit: 10 / minute (`user-webspaces`)
- Route name: `user-webspaces-schedules-delete`
- Controller: [`WebSpaceScheduleController::delete`](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/Controllers/User/WebSpaces/WebSpaceScheduleController.php)
- [route source](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/routes/user/webspaces/schedules.php#L113)

**Delete WebSpace schedule**

| Parameter | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `uuidShort` | path | \- | yes |  |
| `scheduleId` | path | \- | yes |  |

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

Plugin events: [`featherpanel:webspace:schedule:delete`](https://featherpanel.com/docs/plugins/events/web-space/#web-space-schedule-deleted)

### POST `/api/user/webspaces/{uuidShort}/schedules/{scheduleId}/toggle`

- Auth: Signed-in user
- Default rate limit: 10 / minute (`user-webspaces`)
- Route name: `user-webspaces-schedules-toggle`
- Controller: [`WebSpaceScheduleController::toggle`](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/Controllers/User/WebSpaces/WebSpaceScheduleController.php)
- [route source](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/routes/user/webspaces/schedules.php#L131)

**Toggle WebSpace schedule**

| Parameter | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `uuidShort` | path | \- | yes |  |
| `scheduleId` | path | \- | yes |  |

```bash
curl -X POST "$PANEL_URL/api/user/webspaces/$UUID_SHORT/schedules/$SCHEDULE_ID/toggle" \
  -H "Authorization: Bearer $FEATHERPANEL_API_KEY" \
  -H "Accept: application/json"
```

### POST `/api/user/webspaces/{uuidShort}/schedules/{scheduleId}/execute`

- Auth: Signed-in user
- Default rate limit: 10 / minute (`user-webspaces`)
- Route name: `user-webspaces-schedules-execute`
- Controller: [`WebSpaceScheduleController::execute`](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/Controllers/User/WebSpaces/WebSpaceScheduleController.php)
- [route source](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/routes/user/webspaces/schedules.php#L149)

**Execute WebSpace schedule**

| Parameter | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `uuidShort` | path | \- | yes |  |
| `scheduleId` | path | \- | yes |  |

```bash
curl -X POST "$PANEL_URL/api/user/webspaces/$UUID_SHORT/schedules/$SCHEDULE_ID/execute" \
  -H "Authorization: Bearer $FEATHERPANEL_API_KEY" \
  -H "Accept: application/json"
```
