---
title: "Get a scheduled task by id."
method: GET
path: "/scheduled_tasks/{task_id}"
tags: ["Scheduled Tasks"]
---

# Get a scheduled task by id.

`GET /scheduled_tasks/{task_id}`

## Request

- Base URL: `https://h2ogpte.genai.h2o.ai/api/v1`
- URL: `https://h2ogpte.genai.h2o.ai/api/v1/scheduled_tasks/{task_id}`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/h2o/apis/h2ogpte-rest-api/docs/scheduled_tasks/:task_id/get.ts> (a function with typed inputs; its response is checked against the schema)

## Path parameters

- `task_id` string, required

## Response `200`

OK

- ScheduledTask
  - `id` string, uuid
  - `user_id` string, uuid
  - `username` string
  - `name` string
  - `description` string
  - `schedule_type` 'once' | 'recurring' | 'interval'
  - `schedule_expression` string
  - `task_type` 'chat_completion' | 'agent_task'
  - `task_config` object
  - `status` 'active' | 'paused' | 'completed' | 'expired'
  - `execution_status` string: Runtime execution state: idle or running.
  - `last_execution_at` string, date-time, nullable
  - `next_execution_at` string, date-time, nullable
  - `execution_count` integer
  - `max_executions` integer, nullable
  - `expires_at` string, date-time, nullable
  - `created_at` string, date-time
  - `updated_at` string, date-time
  - `is_owner` boolean
  - `notification_email` string

## Other responses

- `401`: Unauthorized - Invalid or missing API key
- `404`: Not found
- `default`: Unexpected error

---

[API](https://skmtc.dev/h2o/apis/h2ogpte-rest-api.md) - [All operations](https://skmtc.dev/h2o/apis/h2ogpte-rest-api/llms.txt) - [OpenAPI document](https://skmtc.dev/h2o/apis/h2ogpte-rest-api/revisions/a82a117320f4?raw)
