# Tasks endpoints (Client API: game servers)

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

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

Defined in [`backend/app/routes/user/server/tasks.php`](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/routes/user/server/tasks.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}/schedules/{scheduleId}/tasks`

- Auth: Server access
- Default rate limit: 30 / minute (`user-server-tasks`)
- Route name: `session-server-tasks`
- Controller: [`TaskController::getTasks`](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/Controllers/User/Server/TaskController.php)
- [route source](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/routes/user/server/tasks.php#L27)

**Get schedule tasks** Retrieve all tasks for a specific schedule that the user owns or has subuser access to.

| Parameter | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `uuidShort` | path | string | yes | Server short UUID |
| `scheduleId` | path | integer | yes | Schedule ID |
| `page` | query | integer | no | Page number for pagination |
| `per_page` | query | integer | no | Number of records per page |
| `search` | query | string | no | Search term to filter tasks by action or payload |

| Response `data` field | Type | Description |
| --- | --- | --- |
| `data` | Task\[\] |  |
| `pagination` | TaskPagination |  |

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

Responses: `200` Schedule tasks retrieved successfully · `400` Bad request - Missing or invalid parameters · `401` Unauthorized - User not authenticated · `403` Forbidden - Access denied to server · `404` Not found - Server or schedule not found · `500` Internal server error - Failed to retrieve tasks

### POST `/api/user/servers/{uuidShort}/schedules/{scheduleId}/tasks`

- Auth: Server access
- Route name: `session-server-create-task`
- Controller: [`TaskController::createTask`](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/Controllers/User/Server/TaskController.php)
- [route source](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/routes/user/server/tasks.php#L51)

**Create task** Create a new task for a schedule with action validation and automatic sequence ordering.

| Parameter | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `uuidShort` | path | string | yes | Server short UUID |
| `scheduleId` | path | integer | yes | Schedule ID |

Request body: [`TaskCreateRequest`](https://featherpanel.com/docs/api/schemas/#schema-taskcreaterequest) (application/json) · Response data: [`TaskCreateResponse`](https://featherpanel.com/docs/api/schemas/#schema-taskcreateresponse)

| Body field | Type | Required | Description |
| --- | --- | --- | --- |
| `action` | string | yes | Task action type |
| `payload` | string | no | Task payload data |
| `time_offset` | integer | no | Time offset in seconds |
| `continue_on_failure` | boolean | no | Whether to continue on failure |

| Response `data` field | Type | Description |
| --- | --- | --- |
| `id` | integer | Created task ID |
| `action` | string | Task action type |
| `sequence_id` | integer | Task sequence order |

```bash
curl -X POST "$PANEL_URL/api/user/servers/$UUID_SHORT/schedules/$SCHEDULE_ID/tasks" \
  -H "Authorization: Bearer $FEATHERPANEL_API_KEY" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{"action":"","payload":"","time_offset":0,"continue_on_failure":false}'
```

Plugin events: [`featherpanel:user:server:task:created`](https://featherpanel.com/docs/plugins/events/server/#server-task-created)

Responses: `201` Task created successfully · `400` Bad request - Missing required fields, invalid action, or invalid request body · `401` Unauthorized - User not authenticated · `403` Forbidden - Access denied to server · `404` Not found - Server or schedule not found · `500` Internal server error - Failed to create task

### GET `/api/user/servers/{uuidShort}/schedules/{scheduleId}/tasks/{taskId}`

- Auth: Server access
- Default rate limit: 30 / minute (`user-server-tasks`)
- Route name: `session-server-get-task`
- Controller: [`TaskController::getTask`](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/Controllers/User/Server/TaskController.php)
- [route source](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/routes/user/server/tasks.php#L73)

**Get specific task** Retrieve details of a specific task for a schedule that the user owns or has subuser access to.

| Parameter | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `uuidShort` | path | string | yes | Server short UUID |
| `scheduleId` | path | integer | yes | Schedule ID |
| `taskId` | path | integer | yes | Task ID |

Response data: [`Task`](https://featherpanel.com/docs/api/schemas/#schema-task)

| Response `data` field | Type | Description |
| --- | --- | --- |
| `id` | integer | Task ID |
| `schedule_id` | integer | Schedule ID |
| `sequence_id` | integer | Task sequence order |
| `action` | string | Task action type |
| `payload` | string | Task payload data |
| `time_offset` | integer | Time offset in seconds |
| `is_queued` | boolean | Whether task is queued |
| `continue_on_failure` | boolean | Whether to continue on failure |
| `created_at` | string (date-time) | Creation timestamp |
| `updated_at` | string (date-time) | Last update timestamp |

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

Responses: `200` Task details retrieved successfully · `400` Bad request - Missing or invalid parameters · `401` Unauthorized - User not authenticated · `403` Forbidden - Access denied to server · `404` Not found - Server, schedule, or task not found · `500` Internal server error - Failed to retrieve task

### PUT `/api/user/servers/{uuidShort}/schedules/{scheduleId}/tasks/{taskId}`

- Auth: Server access
- Default rate limit: 10 / minute (`user-server-tasks`)
- Route name: `session-server-update-task`
- Controller: [`TaskController::updateTask`](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/Controllers/User/Server/TaskController.php)
- [route source](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/routes/user/server/tasks.php#L98)

**Update task** Update an existing task with new action validation and field updates.

| Parameter | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `uuidShort` | path | string | yes | Server short UUID |
| `scheduleId` | path | integer | yes | Schedule ID |
| `taskId` | path | integer | yes | Task ID |

Request body: [`TaskUpdateRequest`](https://featherpanel.com/docs/api/schemas/#schema-taskupdaterequest) (application/json)

| Body field | Type | Required | Description |
| --- | --- | --- | --- |
| `action` | string | no | Task action type |
| `payload` | string | no | Task payload data |
| `time_offset` | integer | no | Time offset in seconds |
| `continue_on_failure` | boolean | no | Whether to continue on failure |

| Response `data` field | Type | Description |
| --- | --- | --- |
| `message` | string | Success message |

```bash
curl -X PUT "$PANEL_URL/api/user/servers/$UUID_SHORT/schedules/$SCHEDULE_ID/tasks/$TASK_ID" \
  -H "Authorization: Bearer $FEATHERPANEL_API_KEY" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{"action":"","payload":"","time_offset":0,"continue_on_failure":false}'
```

Plugin events: [`featherpanel:user:server:task:updated`](https://featherpanel.com/docs/plugins/events/server/#server-task-updated)

Responses: `200` Task updated successfully · `400` Bad request - Invalid action or invalid request body · `401` Unauthorized - User not authenticated · `403` Forbidden - Access denied to server · `404` Not found - Server, schedule, or task not found · `500` Internal server error - Failed to update task

### DELETE `/api/user/servers/{uuidShort}/schedules/{scheduleId}/tasks/{taskId}`

- Auth: Server access
- Route name: `session-server-delete-task`
- Controller: [`TaskController::deleteTask`](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/Controllers/User/Server/TaskController.php)
- [route source](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/routes/user/server/tasks.php#L123)

**Delete task** Delete a task from a schedule. Cannot delete queued tasks.

| Parameter | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `uuidShort` | path | string | yes | Server short UUID |
| `scheduleId` | path | integer | yes | Schedule ID |
| `taskId` | path | integer | yes | Task ID |

| Response `data` field | Type | Description |
| --- | --- | --- |
| `message` | string | Success message |

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

Plugin events: [`featherpanel:user:server:task:deleted`](https://featherpanel.com/docs/plugins/events/server/#server-task-deleted)

Responses: `200` Task deleted successfully · `400` Bad request - Missing parameters or task is queued · `401` Unauthorized - User not authenticated · `403` Forbidden - Access denied to server · `404` Not found - Server, schedule, or task not found · `500` Internal server error - Failed to delete task

### PUT `/api/user/servers/{uuidShort}/schedules/{scheduleId}/tasks/{taskId}/sequence`

- Auth: Server access
- Default rate limit: 10 / minute (`user-server-tasks`)
- Route name: `session-server-update-task-sequence`
- Controller: [`TaskController::updateTaskSequence`](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/Controllers/User/Server/TaskController.php)
- [route source](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/routes/user/server/tasks.php#L146)

**Update task sequence** Update the sequence order of a task within a schedule.

| Parameter | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `uuidShort` | path | string | yes | Server short UUID |
| `scheduleId` | path | integer | yes | Schedule ID |
| `taskId` | path | integer | yes | Task ID |

Request body: [`TaskSequenceUpdateRequest`](https://featherpanel.com/docs/api/schemas/#schema-tasksequenceupdaterequest) (application/json)

| Body field | Type | Required | Description |
| --- | --- | --- | --- |
| `sequence_id` | integer | yes | New sequence order for the task |

| Response `data` field | Type | Description |
| --- | --- | --- |
| `message` | string | Success message |

```bash
curl -X PUT "$PANEL_URL/api/user/servers/$UUID_SHORT/schedules/$SCHEDULE_ID/tasks/$TASK_ID/sequence" \
  -H "Authorization: Bearer $FEATHERPANEL_API_KEY" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{"sequence_id":0}'
```

Plugin events: [`featherpanel:user:server:task:sequence:updated`](https://featherpanel.com/docs/plugins/events/server/#server-task-sequence-updated)

Responses: `200` Task sequence updated successfully · `400` Bad request - Missing sequence\_id or invalid sequence\_id · `401` Unauthorized - User not authenticated · `403` Forbidden - Access denied to server · `404` Not found - Server, schedule, or task not found · `500` Internal server error - Failed to update task sequence

### PUT `/api/user/servers/{uuidShort}/schedules/{scheduleId}/tasks/{taskId}/queue`

- Auth: Server access
- Default rate limit: 10 / minute (`user-server-tasks`)
- Route name: `session-server-toggle-task-queued`
- Controller: [`TaskController::toggleTaskQueuedStatus`](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/Controllers/User/Server/TaskController.php)
- [route source](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/routes/user/server/tasks.php#L171)

**Toggle task queued status** Toggle the queued status of a task (queue/unqueue).

| Parameter | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `uuidShort` | path | string | yes | Server short UUID |
| `scheduleId` | path | integer | yes | Schedule ID |
| `taskId` | path | integer | yes | Task ID |

Response data: [`TaskStatusToggleResponse`](https://featherpanel.com/docs/api/schemas/#schema-taskstatustoggleresponse)

| Response `data` field | Type | Description |
| --- | --- | --- |
| `is_queued` | integer | New queued status |
| `status` | string | Status description |

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

Plugin events: [`featherpanel:server:task:status:toggle`](https://featherpanel.com/docs/plugins/events/server/#server-task-status-toggled)

Responses: `200` Task queued status toggled successfully · `400` Bad request - Missing or invalid parameters · `401` Unauthorized - User not authenticated · `403` Forbidden - Access denied to server · `404` Not found - Server, schedule, or task not found · `500` Internal server error - Failed to toggle task status

### GET `/api/user/servers/{uuidShort}/schedules/{scheduleId}/tasks/with-schedule`

- Auth: Server access
- Default rate limit: 30 / minute (`user-server-tasks`)
- Route name: `session-server-tasks-with-schedule`
- Controller: [`TaskController::getTasksWithSchedule`](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/Controllers/User/Server/TaskController.php)
- [route source](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/routes/user/server/tasks.php#L196)

**Get tasks with schedule** Retrieve all tasks for a schedule with schedule information included.

| Parameter | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `uuidShort` | path | string | yes | Server short UUID |
| `scheduleId` | path | integer | yes | Schedule ID |

| Response `data` field | Type | Description |
| --- | --- | --- |
| `data` | Task\[\] |  |

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

Responses: `200` Tasks with schedule information retrieved successfully · `400` Bad request - Missing or invalid parameters · `401` Unauthorized - User not authenticated · `403` Forbidden - Access denied to server · `404` Not found - Server or schedule not found · `500` Internal server error - Failed to retrieve tasks

### GET `/api/user/servers/{uuidShort}/tasks/queued`

- Auth: Server access
- Default rate limit: 30 / minute (`user-server-tasks`)
- Route name: `session-server-queued-tasks`
- Controller: [`TaskController::getQueuedTasks`](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/Controllers/User/Server/TaskController.php)
- [route source](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/routes/user/server/tasks.php#L220)

**Get queued tasks** Retrieve all queued tasks for a server across all schedules.

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

| Response `data` field | Type | Description |
| --- | --- | --- |
| `data` | Task\[\] |  |

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

Responses: `200` Queued tasks retrieved successfully · `400` Bad request - Missing or invalid UUID short · `401` Unauthorized - User not authenticated · `403` Forbidden - Access denied to server · `404` Not found - Server not found · `500` Internal server error - Failed to retrieve queued tasks

### GET `/api/user/servers/{uuidShort}/tasks/ready`

- Auth: Server access
- Default rate limit: 30 / minute (`user-server-tasks`)
- Route name: `session-server-ready-tasks`
- Controller: [`TaskController::getReadyTasks`](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/Controllers/User/Server/TaskController.php)
- [route source](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/routes/user/server/tasks.php#L243)

**Get ready tasks** Retrieve all ready tasks for a server across all schedules.

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

| Response `data` field | Type | Description |
| --- | --- | --- |
| `data` | Task\[\] |  |

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

Responses: `200` Ready tasks retrieved successfully · `400` Bad request - Missing or invalid UUID short · `401` Unauthorized - User not authenticated · `403` Forbidden - Access denied to server · `404` Not found - Server not found · `500` Internal server error - Failed to retrieve ready tasks
