PostHog task-runs API

The task-runs API from PostHog — 17 operation(s) for task-runs.

OpenAPI Specification

posthog-task-runs-api-openapi.yml Raw ↑
openapi: 3.0.3
info:
  title: PostHog actions task-runs API
  version: 1.0.0
  description: ''
tags:
- name: task-runs
paths:
  /api/projects/{project_id}/tasks/{task_id}/runs/:
    get:
      operationId: tasks_runs_list
      description: Get a list of runs for a specific task.
      summary: List task runs
      parameters:
      - name: limit
        required: false
        in: query
        description: Number of results to return per page.
        schema:
          type: integer
      - name: offset
        required: false
        in: query
        description: The initial index from which to return the results.
        schema:
          type: integer
      - $ref: '#/components/parameters/ProjectIdPath'
      - in: path
        name: task_id
        schema:
          type: string
          format: uuid
        required: true
      tags:
      - task-runs
      security:
      - PersonalAPIKeyAuth:
        - task:read
      - PersonalAPIKeyAuth:
        - task:read
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedTaskRunDetailList'
          description: List of task runs
      x-explicit-tags:
      - task-runs
      - tasks
    post:
      operationId: tasks_runs_create
      description: Create a new run for a specific task without starting execution.
      summary: Create task run
      parameters:
      - $ref: '#/components/parameters/ProjectIdPath'
      - in: path
        name: task_id
        schema:
          type: string
          format: uuid
        required: true
      tags:
      - task-runs
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TaskRunBootstrapCreateRequest'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/TaskRunBootstrapCreateRequest'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/TaskRunBootstrapCreateRequest'
      security:
      - PersonalAPIKeyAuth:
        - task:write
      - PersonalAPIKeyAuth:
        - task:write
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TaskRunDetail'
          description: Created task run
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TaskRunErrorResponse'
          description: Invalid task run payload
      x-explicit-tags:
      - task-runs
      - tasks
  /api/projects/{project_id}/tasks/{task_id}/runs/{id}/:
    get:
      operationId: tasks_runs_retrieve
      description: API for managing task runs. Each run represents an execution of a task.
      parameters:
      - in: path
        name: id
        schema:
          type: string
          format: uuid
        description: A UUID string identifying this task run.
        required: true
      - $ref: '#/components/parameters/ProjectIdPath'
      - in: path
        name: task_id
        schema:
          type: string
          format: uuid
        required: true
      tags:
      - task-runs
      security:
      - PersonalAPIKeyAuth:
        - task:read
      - PersonalAPIKeyAuth:
        - task:read
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TaskRunDetail'
          description: ''
      x-explicit-tags:
      - task-runs
    patch:
      operationId: tasks_runs_partial_update
      description: API for managing task runs. Each run represents an execution of a task.
      summary: Update task run
      parameters:
      - in: path
        name: id
        schema:
          type: string
          format: uuid
        description: A UUID string identifying this task run.
        required: true
      - $ref: '#/components/parameters/ProjectIdPath'
      - in: path
        name: task_id
        schema:
          type: string
          format: uuid
        required: true
      tags:
      - task-runs
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PatchedTaskRunUpdate'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/PatchedTaskRunUpdate'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/PatchedTaskRunUpdate'
      security:
      - PersonalAPIKeyAuth:
        - task:write
      - PersonalAPIKeyAuth:
        - task:write
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TaskRunDetail'
          description: Updated task run
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Invalid update data
        '404':
          description: Task run not found
      x-explicit-tags:
      - task-runs
  /api/projects/{project_id}/tasks/{task_id}/runs/{id}/append_log/:
    post:
      operationId: tasks_runs_append_log_create
      description: Append one or more log entries to the task run log array
      summary: Append log entries
      parameters:
      - in: path
        name: id
        schema:
          type: string
          format: uuid
        description: A UUID string identifying this task run.
        required: true
      - $ref: '#/components/parameters/ProjectIdPath'
      - in: path
        name: task_id
        schema:
          type: string
          format: uuid
        required: true
      tags:
      - task-runs
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TaskRunAppendLogRequest'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/TaskRunAppendLogRequest'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/TaskRunAppendLogRequest'
        required: true
      security:
      - PersonalAPIKeyAuth:
        - task:write
      - PersonalAPIKeyAuth:
        - task:write
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TaskRunDetail'
          description: Run with updated log
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Invalid log entries
        '404':
          description: Run not found
      x-explicit-tags:
      - task-runs
  /api/projects/{project_id}/tasks/{task_id}/runs/{id}/artifacts/:
    post:
      operationId: tasks_runs_artifacts_create
      description: Persist task artifacts to S3 and attach them to the run manifest.
      summary: Upload artifacts for a task run
      parameters:
      - in: path
        name: id
        schema:
          type: string
          format: uuid
        description: A UUID string identifying this task run.
        required: true
      - $ref: '#/components/parameters/ProjectIdPath'
      - in: path
        name: task_id
        schema:
          type: string
          format: uuid
        required: true
      tags:
      - task-runs
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TaskRunArtifactsUploadRequest'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/TaskRunArtifactsUploadRequest'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/TaskRunArtifactsUploadRequest'
        required: true
      security:
      - PersonalAPIKeyAuth:
        - task:write
      - PersonalAPIKeyAuth:
        - task:write
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TaskRunArtifactsUploadResponse'
          description: Run with updated artifact manifest
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Invalid artifact payload
        '404':
          description: Run not found
      x-explicit-tags:
      - task-runs
  /api/projects/{project_id}/tasks/{task_id}/runs/{id}/artifacts/download/:
    post:
      operationId: tasks_runs_artifacts_download_create
      description: Streams artifact content for a task run artifact after validating that it belongs to the run.
      summary: Download an artifact through the backend
      parameters:
      - in: path
        name: id
        schema:
          type: string
          format: uuid
        description: A UUID string identifying this task run.
        required: true
      - $ref: '#/components/parameters/ProjectIdPath'
      - in: path
        name: task_id
        schema:
          type: string
          format: uuid
        required: true
      tags:
      - task-runs
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TaskRunArtifactPresignRequest'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/TaskRunArtifactPresignRequest'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/TaskRunArtifactPresignRequest'
        required: true
      security:
      - PersonalAPIKeyAuth:
        - task:read
      - PersonalAPIKeyAuth:
        - task:read
      responses:
        '200':
          description: Artifact content
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Invalid request
        '404':
          description: Artifact not found
      x-explicit-tags:
      - task-runs
  /api/projects/{project_id}/tasks/{task_id}/runs/{id}/artifacts/finalize_upload/:
    post:
      operationId: tasks_runs_artifacts_finalize_upload_create
      description: Verify directly uploaded S3 objects and attach them to the run artifact manifest.
      summary: Finalize direct uploads for task run artifacts
      parameters:
      - in: path
        name: id
        schema:
          type: string
          format: uuid
        description: A UUID string identifying this task run.
        required: true
      - $ref: '#/components/parameters/ProjectIdPath'
      - in: path
        name: task_id
        schema:
          type: string
          format: uuid
        required: true
      tags:
      - task-runs
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TaskRunArtifactsFinalizeUploadRequest'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/TaskRunArtifactsFinalizeUploadRequest'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/TaskRunArtifactsFinalizeUploadRequest'
        required: true
      security:
      - PersonalAPIKeyAuth:
        - task:write
      - PersonalAPIKeyAuth:
        - task:write
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TaskRunArtifactsFinalizeUploadResponse'
          description: Run with updated artifact manifest
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Invalid artifact payload
        '404':
          description: Run not found
      x-explicit-tags:
      - task-runs
  /api/projects/{project_id}/tasks/{task_id}/runs/{id}/artifacts/prepare_upload/:
    post:
      operationId: tasks_runs_artifacts_prepare_upload_create
      description: Reserve S3 object keys for task artifacts and return presigned POST forms for direct uploads.
      summary: Prepare direct uploads for task run artifacts
      parameters:
      - in: path
        name: id
        schema:
          type: string
          format: uuid
        description: A UUID string identifying this task run.
        required: true
      - $ref: '#/components/parameters/ProjectIdPath'
      - in: path
        name: task_id
        schema:
          type: string
          format: uuid
        required: true
      tags:
      - task-runs
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TaskRunArtifactsPrepareUploadRequest'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/TaskRunArtifactsPrepareUploadRequest'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/TaskRunArtifactsPrepareUploadRequest'
        required: true
      security:
      - PersonalAPIKeyAuth:
        - task:write
      - PersonalAPIKeyAuth:
        - task:write
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TaskRunArtifactsPrepareUploadResponse'
          description: Prepared uploads for the requested artifacts
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Invalid artifact payload
        '404':
          description: Run not found
      x-explicit-tags:
      - task-runs
  /api/projects/{project_id}/tasks/{task_id}/runs/{id}/artifacts/presign/:
    post:
      operationId: tasks_runs_artifacts_presign_create
      description: Returns a temporary, signed URL that can be used to download a specific artifact.
      summary: Generate presigned URL for an artifact
      parameters:
      - in: path
        name: id
        schema:
          type: string
          format: uuid
        description: A UUID string identifying this task run.
        required: true
      - $ref: '#/components/parameters/ProjectIdPath'
      - in: path
        name: task_id
        schema:
          type: string
          format: uuid
        required: true
      tags:
      - task-runs
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TaskRunArtifactPresignRequest'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/TaskRunArtifactPresignRequest'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/TaskRunArtifactPresignRequest'
        required: true
      security:
      - PersonalAPIKeyAuth:
        - task:read
      - PersonalAPIKeyAuth:
        - task:read
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TaskRunArtifactPresignResponse'
          description: Presigned URL for the requested artifact
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Invalid request
        '404':
          description: Artifact not found
      x-explicit-tags:
      - task-runs
  /api/projects/{project_id}/tasks/{task_id}/runs/{id}/command/:
    post:
      operationId: tasks_runs_command_create
      description: Forward a JSON-RPC command to the agent server running in the sandbox. Supports user_message, cancel, close, permission_response, and set_config_option commands.
      summary: Send command to agent server
      parameters:
      - in: path
        name: id
        schema:
          type: string
          format: uuid
        description: A UUID string identifying this task run.
        required: true
      - $ref: '#/components/parameters/ProjectIdPath'
      - in: path
        name: task_id
        schema:
          type: string
          format: uuid
        required: true
      tags:
      - task-runs
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TaskRunCommandRequest'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/TaskRunCommandRequest'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/TaskRunCommandRequest'
        required: true
      security:
      - PersonalAPIKeyAuth:
        - task:write
      - PersonalAPIKeyAuth:
        - task:write
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TaskRunCommandResponse'
          description: Agent server response
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Invalid command or no active sandbox
        '404':
          description: Task run not found
        '502':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Agent server unreachable
      x-explicit-tags:
      - task-runs
  /api/projects/{project_id}/tasks/{task_id}/runs/{id}/connection_token/:
    get:
      operationId: tasks_runs_connection_token_retrieve
      description: Generate a JWT token for direct connection to the sandbox. Valid for 24 hours.
      summary: Get sandbox connection token
      parameters:
      - in: path
        name: id
        schema:
          type: string
          format: uuid
        description: A UUID string identifying this task run.
        required: true
      - $ref: '#/components/parameters/ProjectIdPath'
      - in: path
        name: task_id
        schema:
          type: string
          format: uuid
        required: true
      tags:
      - task-runs
      security:
      - PersonalAPIKeyAuth:
        - task:read
      - PersonalAPIKeyAuth:
        - task:read
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConnectionTokenResponse'
          description: Connection token for direct sandbox connection
        '404':
          description: Task run not found
      x-explicit-tags:
      - task-runs
  /api/projects/{project_id}/tasks/{task_id}/runs/{id}/logs/:
    get:
      operationId: tasks_runs_logs_retrieve
      description: Fetch the logs for a task run as JSONL. If the run resumes from another (state.resume_from_run_id), each ancestor's log is concatenated first (oldest ancestor → ... → this run) so resume consumers see a single continuous history and can find the most recent git_checkpoint event regardless of which run emitted it.
      summary: Get task run logs
      parameters:
      - in: path
        name: id
        schema:
          type: string
          format: uuid
        description: A UUID string identifying this task run.
        required: true
      - $ref: '#/components/parameters/ProjectIdPath'
      - in: path
        name: task_id
        schema:
          type: string
          format: uuid
        required: true
      tags:
      - task-runs
      security:
      - PersonalAPIKeyAuth:
        - task:read
      - PersonalAPIKeyAuth:
        - task:read
      responses:
        '200':
          description: Log content in JSONL format
        '404':
          description: Task run not found
      x-explicit-tags:
      - task-runs
  /api/projects/{project_id}/tasks/{task_id}/runs/{id}/relay_message/:
    post:
      operationId: tasks_runs_relay_message_create
      description: Queue a Slack relay workflow to post a run message into the mapped Slack thread.
      summary: Relay run message to Slack
      parameters:
      - in: path
        name: id
        schema:
          type: string
          format: uuid
        description: A UUID string identifying this task run.
        required: true
      - $ref: '#/components/parameters/ProjectIdPath'
      - in: path
        name: task_id
        schema:
          type: string
          format: uuid
        required: true
      tags:
      - task-runs
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TaskRunRelayMessageRequest'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/TaskRunRelayMessageRequest'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/TaskRunRelayMessageRequest'
        required: true
      security:
      - PersonalAPIKeyAuth:
        - task:write
      - PersonalAPIKeyAuth:
        - task:write
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TaskRunRelayMessageResponse'
          description: Relay accepted
        '404':
          description: Run not found
      x-explicit-tags:
      - task-runs
  /api/projects/{project_id}/tasks/{task_id}/runs/{id}/resume_in_cloud/:
    post:
      operationId: tasks_runs_resume_in_cloud_create
      description: Resume an existing task run in a cloud sandbox. Terminates any existing workflow and starts a new one.
      summary: Resume task run in cloud
      parameters:
      - in: path
        name: id
        schema:
          type: string
          format: uuid
        description: A UUID string identifying this task run.
        required: true
      - $ref: '#/components/parameters/ProjectIdPath'
      - in: path
        name: task_id
        schema:
          type: string
          format: uuid
        required: true
      tags:
      - task-runs
      security:
      - PersonalAPIKeyAuth:
        - task:write
      - PersonalAPIKeyAuth:
        - task:write
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TaskRunDetail'
          description: Run resumed in cloud
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Run already active or workflow failed
      x-explicit-tags:
      - task-runs
  /api/projects/{project_id}/tasks/{task_id}/runs/{id}/session_logs/:
    get:
      operationId: tasks_runs_session_logs_retrieve
      description: Fetch session log entries for a task run with optional filtering by timestamp, event type, and limit.
      summary: Get filtered task run session logs
      parameters:
      - in: query
        name: after
        schema:
          type: string
          format: date-time
        description: Only return events after this ISO8601 timestamp
      - in: query
        name: event_types
        schema:
          type: string
          minLength: 1
        description: Comma-separated list of event types to include
      - in: query
        name: exclude_types
        schema:
          type: string
          minLength: 1
        description: Comma-separated list of event types to exclude
      - in: path
        name: id
        schema:
          type: string
          format: uuid
        description: A UUID string identifying this task run.
        required: true
      - in: query
        name: limit
        schema:
          type: integer
          maximum: 5000
          minimum: 1
          default: 1000
        description: Maximum number of entries to return (default 1000, max 5000)
      - in: query
        name: offset
        schema:
          type: integer
          minimum: 0
          default: 0
        description: Zero-based offset into the filtered log entries
      - $ref: '#/components/parameters/ProjectIdPath'
      - in: path
        name: task_id
        schema:
          type: string
          format: uuid
        required: true
      tags:
      - task-runs
      security:
      - PersonalAPIKeyAuth:
        - task:read
      - PersonalAPIKeyAuth:
        - task:read
      responses:
        '200':
          description: Filtered log events as JSON array
        '404':
          description: Task run not found
      x-explicit-tags:
      - task-runs
  /api/projects/{project_id}/tasks/{task_id}/runs/{id}/set_output/:
    patch:
      operationId: tasks_runs_set_output_partial_update
      description: Update the output field for a task run (e.g., PR URL, commit SHA, etc.)
      summary: Set run output
      parameters:
      - in: path
        name: id
        schema:
          type: string
          format: uuid
        description: A UUID string identifying this task run.
        required: true
      - $ref: '#/components/parameters/ProjectIdPath'
      - in: path
        name: task_id
        schema:
          type: string
          format: uuid
        required: true
      tags:
      - task-runs
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PatchedTaskRunSetOutputRequest'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/PatchedTaskRunSetOutputRequest'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/PatchedTaskRunSetOutputRequest'
      security:
      - PersonalAPIKeyAuth:
        - task:write
      - PersonalAPIKeyAuth:
        - task:write
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TaskRunDetail'
          description: Run with updated output
        '404':
          description: Run not found
      x-explicit-tags:
      - task-runs
  /api/projects/{project_id}/tasks/{task_id}/runs/{id}/start/:
    post:
      operationId: tasks_runs_start_create
      description: Start an existing cloud run after any initial run-scoped attachments have been uploaded.
      summary: Start task run
      parameters:
      - in: path
        name: id
        schema:
          type: string
          format: uuid
        description: A UUID string identifying this task run.
        required: true
      - $ref: '#/components/parameters/ProjectIdPath'
      - in: path
        name: task_id
        schema:
          type: string
          format: uuid
        required: true
      tags:
      - task-runs
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TaskRunStartRequest'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/TaskRunStartRequest'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/TaskRunStartRequest'
      security:
      - PersonalAPIKeyAuth:
        - task:write
      - PersonalAPIKeyAuth:
        - task:write
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Task'
          description: Task with updated latest run
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Invalid start payload
        '404':
          description: Task run not found
      x-explicit-tags:
      - task-runs
  /api/projects/{project_id}/tasks/{task_id}/runs/{id}/stream/:
    get:
      operationId: tasks_runs_stream_retrieve
      description: API for managing task runs. Each run represents an execution of a task.
      parameters:
      - in: path
        name: id
        schema:
          type: string
          format: uuid
        description: A UUID string identifying this task run.
        required: true
      - $ref: '#/components/parameters/ProjectIdPath'
      - in: path
        name: task_id
        schema:
          type: string
          format: uuid
        required: true
      tags:
      - task-runs
      security:
      - PersonalAPIKeyAuth:
        - task:read
      - PersonalAPIKeyAuth:
        - task:read
      responses:
        '200':
          content:
            text/event-stream:
              schema:
                $ref: '#/components/schemas/TaskRunDetail'
          description: ''
      x-explicit-tags:
      - task-runs
components:
  schemas:
    TaskRunArtifactsUploadRequest:
      type: object
      properties:
        artifacts:
          type: array
          items:
            $ref: '#/components/schemas/TaskRunArtifactUpload'
          description: Array of artifacts to upload
      required:
      - artifacts
    TaskRunArtifactsFinalizeUploadRequest:
      type: object
      properties:
        artifacts:
          type: array
          items:
            $ref: '#/components/schemas/TaskRunArtifactFinalizeUpload'
          description: Array of uploaded artifacts to finalize
      required:
      - artifacts
    JsonrpcEnum:
      enum:
      - '2.0'
      type: string
      description: '* `2.0` - 2.0'
    Task:
      type: object
      properties:
        id:
          type: string
          format: uuid
          readOnly: true
        task_number:
          type: integer
          readOnly: true
          nullable: true
        slug:
          type: string
          readOnly: true
        title:
          type: string
          maxLength: 255
        title_manually_set:
          type: boolean
        description:
          type: string
        origin_product:
          $ref: '#/components/schemas/OriginProductEnum'
        repository:
          type: string
          nullable: true
          maxLength: 255
        github_integration:
          type: integer
          nullable: true
          description: GitHub integration for this task
        github_user_integration:
          type: string
          format: uuid
          nullable: true
          description: User-scoped GitHub integration to use for user-authored cloud runs.
        signal_report:
          type: string
          format: uuid
          nullable: true
        signal_report_task_relationship:
          allOf:
          - $ref: '#/components/schemas/SignalReportTaskRelationshipEnum'
          writeOnly: true
        json_schema:
          nullable: true
          description: JSON schema for the task. This is used to validate the output of the task.
        internal:
          type: boolean
          description: If true, this task is for internal use and should not be exposed to end users.
        latest_run:
          type: object
          additionalProperties: true
          nullable: true
          description: Latest run details for this task
          readOnly: true
        created_at:
          type: string
          format: date-time
          readOnly: true
        updated_at:
          type: string
          format: date-time
          readOnly: true
        created_by:
          allOf:
          - $ref: '#/components/schemas/UserBasic'
          readOnly: true
        ci_prompt:
          type: string
          nullable: true
          description: Custom prompt for CI fixes. If blank, a default prompt will be used.
      required:
      - created_at
      - created_by
      - id
      - latest_run
      - slug
      - task_number
      - updated_at
    TaskRunArtifactsPrepareUploadResponse:
      type: object
      properties:
        artifacts:
          type: array
          items:
            $ref: '#/components/schemas/TaskRunArtifactPrepareUploadResponse'
          description: Prepared uploads for the requested artifacts
      required:
      - artifacts
    TaskRunBootstrapCreateRequest:
      type: object
      description: Request body for creating a task run without starting execution yet.
      properties:
        environment:
          allOf:
          - $ref: '#/components/schemas/TaskRunBootstrapCreateRequestEnvironmentEnum'
          default: local
          description: 'Execution environment for the new run. Use ''cloud'' for remote sandbox runs and ''local'' for desktop sessions.


            * `local` - local

            * `cloud` - cloud'
        mode:
          allOf:
          - $ref: '#/components/schemas/TaskExecutionModeEnum'
      

# --- truncated at 32 KB (60 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/posthog/refs/heads/main/openapi/posthog-task-runs-api-openapi.yml