> ## 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 Get

> Endpoint to retrieve a specific task by its unique ID.

Args:
    task_id (str): The unique identifier of the task to retrieve.

Returns:
    Task: A `Task` object matching the provided ID.

Raises:
    HTTPException 404: If no task is found with the specified ID.



## OpenAPI

````yaml get /api/task/{task_id}
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/{task_id}:
    get:
      tags:
        - Task
      summary: Task Get
      description: |-
        Endpoint to retrieve a specific task by its unique ID.

        Args:
            task_id (str): The unique identifier of the task to retrieve.

        Returns:
            Task: A `Task` object matching the provided ID.

        Raises:
            HTTPException 404: If no task is found with the specified ID.
      operationId: task_get
      parameters:
        - name: task_id
          in: path
          required: true
          schema:
            type: string
            title: Task Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Task'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      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
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    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
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    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}'

````