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

# Get a stored task, its versions and one version's content



## OpenAPI

````yaml https://api.primeintellect.ai/openapi.json get /api/v1/hub/tasks/{owner}/{name}
openapi: 3.1.0
info:
  title: PI API
  version: 0.1.0
servers:
  - url: https://api.primeintellect.ai
security: []
paths:
  /api/v1/hub/tasks/{owner}/{name}:
    get:
      tags:
        - Hub
      summary: Get a stored task, its versions and one version's content
      operationId: hub_get_task
      parameters:
        - name: owner
          in: path
          required: true
          schema:
            type: string
            maxLength: 255
            minLength: 1
            title: Owner
            description: Owning user or team slug
          description: Owning user or team slug
        - name: name
          in: path
          required: true
          schema:
            type: string
            maxLength: 400
            pattern: ^[A-Za-z0-9][A-Za-z0-9_.-]*(/[A-Za-z0-9][A-Za-z0-9_.-]*)*$
            description: The task's name; it may hold `/`
            title: Name
          description: The task's name; it may hold `/`
        - name: version
          in: query
          required: false
          schema:
            anyOf:
              - type: integer
                minimum: 1
              - type: 'null'
            description: The version to read; the latest when omitted
            title: Version
          description: The version to read; the latest when omitted
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TaskDetail'
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
          description: Bad Request
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
          description: Conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
          description: Unprocessable Entity
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
          description: Too Many Requests
      security:
        - HTTPBearer: []
components:
  schemas:
    TaskDetail:
      properties:
        id:
          type: string
          title: Id
        owner:
          type: string
          title: Owner
        name:
          type: string
          title: Name
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
        labels:
          items:
            type: string
          type: array
          title: Labels
        task_type:
          type: string
          title: Task Type
        latest_version:
          type: integer
          title: Latest Version
        archived_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Archived At
          description: 'Set while the task is archived: it takes no new versions'
        created_at:
          type: string
          format: date-time
          title: Created At
        updated_at:
          type: string
          format: date-time
          title: Updated At
        version:
          $ref: '#/components/schemas/TaskVersionDetail'
          description: The version asked for
        versions:
          items:
            $ref: '#/components/schemas/TaskVersion'
          type: array
          title: Versions
          description: Newest first, at most 100
        version_count:
          type: integer
          title: Version Count
      type: object
      required:
        - id
        - owner
        - name
        - description
        - labels
        - task_type
        - latest_version
        - archived_at
        - created_at
        - updated_at
        - version
        - versions
        - version_count
      title: TaskDetail
    ErrorEnvelope:
      properties:
        error:
          $ref: '#/components/schemas/ErrorBody'
      type: object
      required:
        - error
      title: ErrorEnvelope
    TaskVersionDetail:
      properties:
        id:
          type: string
          title: Id
        owner:
          type: string
          title: Owner
        name:
          type: string
          title: Name
        version:
          type: integer
          title: Version
          description: Numbered from 1 by the Hub, per task
        task_type:
          type: string
          title: Task Type
        content_hash:
          type: string
          title: Content Hash
        archive_sha256:
          type: string
          title: Archive Sha256
        archive_size:
          type: integer
          title: Archive Size
        created_at:
          type: string
          format: date-time
          title: Created At
        data:
          type: object
          title: Data
          description: The parsed `task.toml`
        files:
          $ref: '#/components/schemas/TaskManifest'
      type: object
      required:
        - id
        - owner
        - name
        - version
        - task_type
        - content_hash
        - archive_sha256
        - archive_size
        - created_at
        - data
        - files
      title: TaskVersionDetail
    TaskVersion:
      properties:
        id:
          type: string
          title: Id
        owner:
          type: string
          title: Owner
        name:
          type: string
          title: Name
        version:
          type: integer
          title: Version
          description: Numbered from 1 by the Hub, per task
        task_type:
          type: string
          title: Task Type
        content_hash:
          type: string
          title: Content Hash
        archive_sha256:
          type: string
          title: Archive Sha256
        archive_size:
          type: integer
          title: Archive Size
        created_at:
          type: string
          format: date-time
          title: Created At
      type: object
      required:
        - id
        - owner
        - name
        - version
        - task_type
        - content_hash
        - archive_sha256
        - archive_size
        - created_at
      title: TaskVersion
    ErrorBody:
      properties:
        code:
          type: string
          title: Code
          description: Stable, machine-readable error code
        message:
          type: string
          title: Message
        details:
          type: object
          title: Details
      type: object
      required:
        - code
        - message
      title: ErrorBody
    TaskManifest:
      properties:
        schema:
          type: string
          title: Schema
        directories:
          items:
            type: string
          type: array
          title: Directories
        files:
          items:
            $ref: '#/components/schemas/ManifestFile'
          type: array
          title: Files
        links:
          items:
            $ref: '#/components/schemas/ManifestLink'
          type: array
          title: Links
          description: Symbolic links
      type: object
      required:
        - schema
        - directories
        - files
      title: TaskManifest
      description: |-
        What the archive unpacks to. `content_hash` is the sha256 of this as
        canonical JSON, with `links` left out when there are none.
    ManifestFile:
      properties:
        path:
          type: string
          title: Path
        sha256:
          type: string
          title: Sha256
        size:
          type: integer
          title: Size
        mode:
          type: integer
          title: Mode
          description: 420 (0o644), or 493 (0o755) for an executable
      type: object
      required:
        - path
        - sha256
        - size
        - mode
      title: ManifestFile
    ManifestLink:
      properties:
        path:
          type: string
          title: Path
        target:
          type: string
          title: Target
        kind:
          type: string
          title: Kind
      type: object
      required:
        - path
        - target
        - kind
      title: ManifestLink
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````