> ## Documentation Index
> Fetch the complete documentation index at: https://docs.apigene.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Task List

> Endpoint to list all tasks accessible to the current user.
Filters tasks based on state and visibility:
- Only includes tasks that are `enabled`.
- Includes tasks that are either `public` or created by the current user.

Args:

Returns:
    List[Task]: A list of `Task` objects visible to the current user.

Raises:
    HTTPException 500: If a runtime error occurs during task retrieval.



## OpenAPI

````yaml get /api/task
openapi: 3.1.0
info:
  title: Apigene
  description: Apigene API
  version: 1.0.0
  contact:
    name: Apigene Support
    url: https://app.apigene.ai
    email: support@apigene.ai
servers:
  - url: https://app.apigene.ai
security:
  - BearerAuth: []
paths:
  /api/task:
    get:
      tags:
        - Task
      summary: Task List
      description: >-
        Endpoint to list all tasks accessible to the current user.

        Filters tasks based on state and visibility:

        - Only includes tasks that are `enabled`.

        - Includes tasks that are either `public` or created by the current
        user.


        Args:


        Returns:
            List[Task]: A list of `Task` objects visible to the current user.

        Raises:
            HTTPException 500: If a runtime error occurs during task retrieval.
      operationId: task_list
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                items:
                  $ref: '#/components/schemas/Task'
                type: array
                title: Response Task List
      security:
        - BearerAuth: []
components:
  schemas:
    Task:
      properties:
        id:
          type: string
          title: Id
          description: Unique identifier for the task
        name:
          type: string
          title: Name
          description: The Task name.
        actions:
          items:
            $ref: '#/components/schemas/TaskAction'
          type: array
          title: Actions
        created_by:
          type: string
          title: Created By
          description: User who created the task
        visibility:
          $ref: '#/components/schemas/Visibility'
          description: 'Task visibility: ''private'' (default) or ''public'''
          default: private
        initial_input:
          type: string
          title: Initial Input
          description: The initial user input for the task, default is None
        schedule:
          $ref: '#/components/schemas/Schedule'
          description: Optional schedule information for the task
          default:
            frequency: manual
            hour: '00:00'
            day: Monday
        state:
          $ref: '#/components/schemas/TaskState'
          description: 'Task state: ''enabled'' (default) or ''disabled'''
          default: enabled
        category:
          type: string
          title: Category
          description: Task category
          default: Other
        next_run:
          type: string
          format: date-time
          title: Next Run
          description: Next scheduled execution time (UTC)
          default_: '1970-01-01T00:00:00'
      type: object
      required:
        - name
        - actions
        - created_by
        - next_run
      title: Task
    TaskAction:
      properties:
        api_name:
          type: string
          title: Api Name
          description: Name of the API.
        domain_url:
          type: string
          title: Domain Url
          description: API domain URL.
          default: ''
        user_input:
          type: string
          title: User Input
          description: User input data.
      type: object
      required:
        - api_name
        - user_input
      title: TaskAction
    Visibility:
      type: string
      enum:
        - private
        - public
      title: Visibility
    Schedule:
      properties:
        frequency:
          $ref: '#/components/schemas/ScheduleFrequency'
          description: 'Schedule frequency: ''daily'' or ''weekly'''
        hour:
          type: string
          title: Hour
          description: Hour of the day in 4 digit format to run the task
          default: '00:00'
        day:
          type: string
          title: Day
          description: Day of the week to run the task
          default: Monday
      type: object
      required:
        - frequency
      title: Schedule
    TaskState:
      type: string
      enum:
        - disabled
        - enabled
      title: TaskState
    ScheduleFrequency:
      type: string
      enum:
        - manual
        - daily
        - weekly
      title: ScheduleFrequency
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        JWT Authorization header using the Bearer scheme. Example:
        'Authorization: Bearer {token}'

````