PostHog · Capability

PostHog API — tasks

PostHog API — tasks. 41 operations. Lead operation: List tasks. Self-contained Naftiko capability covering one Posthog business surface.

Run with Naftiko Posthogtasks

What You Can Do

GET
Taskslist — List tasks
/v1/api/projects/{project-id}/tasks
GET
Taskslist — List tasks
/v1/api/projects/{project-id}/tasks
POST
Taskscreate — API for managing tasks within a project. Tasks represent units of work to be performed by an agent.
/v1/api/projects/{project-id}/tasks
POST
Taskscreate — API for managing tasks within a project. Tasks represent units of work to be performed by an agent.
/v1/api/projects/{project-id}/tasks
GET
Tasksrepositoriesretrieve — List distinct task repositories
/v1/api/projects/{project-id}/tasks/repositories
GET
Tasksrepositoriesretrieve — List distinct task repositories
/v1/api/projects/{project-id}/tasks/repositories
GET
Tasksrepositoryreadinessretrieve — Get repository readiness
/v1/api/projects/{project-id}/tasks/repository-readiness
GET
Tasksrepositoryreadinessretrieve — Get repository readiness
/v1/api/projects/{project-id}/tasks/repository-readiness
GET
Tasksretrieve — API for managing tasks within a project. Tasks represent units of work to be performed by an agent.
/v1/api/projects/{project-id}/tasks/{id}
GET
Tasksretrieve — API for managing tasks within a project. Tasks represent units of work to be performed by an agent.
/v1/api/projects/{project-id}/tasks/{id}
PUT
Tasksupdate — API for managing tasks within a project. Tasks represent units of work to be performed by an agent.
/v1/api/projects/{project-id}/tasks/{id}
PUT
Tasksupdate — API for managing tasks within a project. Tasks represent units of work to be performed by an agent.
/v1/api/projects/{project-id}/tasks/{id}
PATCH
Taskspartialupdate — API for managing tasks within a project. Tasks represent units of work to be performed by an agent.
/v1/api/projects/{project-id}/tasks/{id}
PATCH
Taskspartialupdate — API for managing tasks within a project. Tasks represent units of work to be performed by an agent.
/v1/api/projects/{project-id}/tasks/{id}
DELETE
Tasksdestroy — API for managing tasks within a project. Tasks represent units of work to be performed by an agent.
/v1/api/projects/{project-id}/tasks/{id}
DELETE
Tasksdestroy — API for managing tasks within a project. Tasks represent units of work to be performed by an agent.
/v1/api/projects/{project-id}/tasks/{id}
POST
Tasksruncreate — Run task
/v1/api/projects/{project-id}/tasks/{id}/run
POST
Tasksruncreate — Run task
/v1/api/projects/{project-id}/tasks/{id}/run
POST
Tasksstagedartifactsfinalizeuploadcreate — Finalize staged direct uploads for task attachments
/v1/api/projects/{project-id}/tasks/{id}/staged-artifacts/finalize-upload
POST
Tasksstagedartifactsfinalizeuploadcreate — Finalize staged direct uploads for task attachments
/v1/api/projects/{project-id}/tasks/{id}/staged-artifacts/finalize-upload
POST
Tasksstagedartifactsprepareuploadcreate — Prepare staged direct uploads for task attachments
/v1/api/projects/{project-id}/tasks/{id}/staged-artifacts/prepare-upload
POST
Tasksstagedartifactsprepareuploadcreate — Prepare staged direct uploads for task attachments
/v1/api/projects/{project-id}/tasks/{id}/staged-artifacts/prepare-upload
GET
Tasksrunslist — List task runs
/v1/api/projects/{project-id}/tasks/{task-id}/runs
POST
Tasksrunscreate — Create task run
/v1/api/projects/{project-id}/tasks/{task-id}/runs
GET
Tasksrunsretrieve — API for managing task runs. Each run represents an execution of a task.
/v1/api/projects/{project-id}/tasks/{task-id}/runs/{id}
PATCH
Tasksrunspartialupdate — Update task run
/v1/api/projects/{project-id}/tasks/{task-id}/runs/{id}
POST
Tasksrunsappendlogcreate — Append log entries
/v1/api/projects/{project-id}/tasks/{task-id}/runs/{id}/append-log
POST
Tasksrunsartifactscreate — Upload artifacts for a task run
/v1/api/projects/{project-id}/tasks/{task-id}/runs/{id}/artifacts
POST
Tasksrunsartifactsdownloadcreate — Download an artifact through the backend
/v1/api/projects/{project-id}/tasks/{task-id}/runs/{id}/artifacts/download
POST
Tasksrunsartifactsfinalizeuploadcreate — Finalize direct uploads for task run artifacts
/v1/api/projects/{project-id}/tasks/{task-id}/runs/{id}/artifacts/finalize-upload
POST
Tasksrunsartifactsprepareuploadcreate — Prepare direct uploads for task run artifacts
/v1/api/projects/{project-id}/tasks/{task-id}/runs/{id}/artifacts/prepare-upload
POST
Tasksrunsartifactspresigncreate — Generate presigned URL for an artifact
/v1/api/projects/{project-id}/tasks/{task-id}/runs/{id}/artifacts/presign
POST
Tasksrunscommandcreate — Send command to agent server
/v1/api/projects/{project-id}/tasks/{task-id}/runs/{id}/command
GET
Tasksrunsconnectiontokenretrieve — Get sandbox connection token
/v1/api/projects/{project-id}/tasks/{task-id}/runs/{id}/connection-token
GET
Tasksrunslogsretrieve — Get task run logs
/v1/api/projects/{project-id}/tasks/{task-id}/runs/{id}/logs
POST
Tasksrunsrelaymessagecreate — Relay run message to Slack
/v1/api/projects/{project-id}/tasks/{task-id}/runs/{id}/relay-message
POST
Tasksrunsresumeincloudcreate — Resume task run in cloud
/v1/api/projects/{project-id}/tasks/{task-id}/runs/{id}/resume-in-cloud
GET
Tasksrunssessionlogsretrieve — Get filtered task run session logs
/v1/api/projects/{project-id}/tasks/{task-id}/runs/{id}/session-logs
PATCH
Tasksrunssetoutputpartialupdate — Set run output
/v1/api/projects/{project-id}/tasks/{task-id}/runs/{id}/set-output
POST
Tasksrunsstartcreate — Start task run
/v1/api/projects/{project-id}/tasks/{task-id}/runs/{id}/start
GET
Tasksrunsstreamretrieve — API for managing task runs. Each run represents an execution of a task.
/v1/api/projects/{project-id}/tasks/{task-id}/runs/{id}/stream

MCP Tools

list-tasks

List tasks

read-only idempotent
list-tasks-2

List tasks

read-only idempotent
api-managing-tasks-within-project

API for managing tasks within a project. Tasks represent units of work to be performed by an agent.

api-managing-tasks-within-project-2

API for managing tasks within a project. Tasks represent units of work to be performed by an agent.

list-distinct-task-repositories

List distinct task repositories

read-only idempotent
list-distinct-task-repositories-2

List distinct task repositories

read-only idempotent
get-repository-readiness

Get repository readiness

read-only idempotent
get-repository-readiness-2

Get repository readiness

read-only idempotent
api-managing-tasks-within-project-3

API for managing tasks within a project. Tasks represent units of work to be performed by an agent.

read-only idempotent
api-managing-tasks-within-project-4

API for managing tasks within a project. Tasks represent units of work to be performed by an agent.

read-only idempotent
api-managing-tasks-within-project-5

API for managing tasks within a project. Tasks represent units of work to be performed by an agent.

idempotent
api-managing-tasks-within-project-6

API for managing tasks within a project. Tasks represent units of work to be performed by an agent.

idempotent
api-managing-tasks-within-project-7

API for managing tasks within a project. Tasks represent units of work to be performed by an agent.

idempotent
api-managing-tasks-within-project-8

API for managing tasks within a project. Tasks represent units of work to be performed by an agent.

idempotent
api-managing-tasks-within-project-9

API for managing tasks within a project. Tasks represent units of work to be performed by an agent.

idempotent
api-managing-tasks-within-project-10

API for managing tasks within a project. Tasks represent units of work to be performed by an agent.

idempotent
run-task

Run task

run-task-2

Run task

finalize-staged-direct-uploads-task

Finalize staged direct uploads for task attachments

finalize-staged-direct-uploads-task-2

Finalize staged direct uploads for task attachments

prepare-staged-direct-uploads-task

Prepare staged direct uploads for task attachments

prepare-staged-direct-uploads-task-2

Prepare staged direct uploads for task attachments

list-task-runs

List task runs

read-only idempotent
create-task-run

Create task run

api-managing-task-runs-each

API for managing task runs. Each run represents an execution of a task.

read-only idempotent
update-task-run

Update task run

idempotent
append-log-entries

Append log entries

upload-artifacts-task-run

Upload artifacts for a task run

download-artifact-through-backend

Download an artifact through the backend

finalize-direct-uploads-task-run

Finalize direct uploads for task run artifacts

prepare-direct-uploads-task-run

Prepare direct uploads for task run artifacts

generate-presigned-url-artifact

Generate presigned URL for an artifact

send-command-agent-server

Send command to agent server

get-sandbox-connection-token

Get sandbox connection token

read-only idempotent
get-task-run-logs

Get task run logs

read-only idempotent
relay-run-message-slack

Relay run message to Slack

resume-task-run-cloud

Resume task run in cloud

get-filtered-task-run-session

Get filtered task run session logs

read-only idempotent
set-run-output

Set run output

idempotent
start-task-run

Start task run

api-managing-task-runs-each-2

API for managing task runs. Each run represents an execution of a task.

read-only idempotent

Capability Spec

posthog-tasks.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: PostHog API — tasks
  description: 'PostHog API — tasks. 41 operations. Lead operation: List tasks. Self-contained Naftiko capability covering
    one Posthog business surface.'
  tags:
  - Posthog
  - tasks
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    POSTHOG_API_KEY: POSTHOG_API_KEY
capability:
  consumes:
  - type: http
    namespace: posthog-tasks
    baseUri: ''
    description: PostHog API — tasks business capability. Self-contained, no shared references.
    resources:
    - name: api-projects-project_id-tasks
      path: /api/projects/{project_id}/tasks/
      operations:
      - name: taskslist
        method: GET
        description: List tasks
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: created_by
          in: query
          type: integer
          description: Filter by creator user ID
        - name: internal
          in: query
          type: boolean
          description: When true, list internal tasks instead of user-facing ones. Honored only in debug environments; ignored
            in production. Defaults to excluding internal tasks.
        - name: limit
          in: query
          type: integer
          description: Number of results to return per page.
        - name: offset
          in: query
          type: integer
          description: The initial index from which to return the results.
        - name: organization
          in: query
          type: string
          description: Filter by repository organization
        - name: origin_product
          in: query
          type: string
          description: Filter by origin product
        - name: repository
          in: query
          type: string
          description: Filter by repository name (can include org/repo format)
        - name: search
          in: query
          type: string
          description: Case-insensitive substring search over task title and description. A numeric value also matches the
            task number. An empty value disables the filter.
        - name: stage
          in: query
          type: string
          description: Filter by task run stage
        - name: status
          in: query
          type: string
          description: Filter tasks by the status of their most recent run.
      - name: taskslist
        method: GET
        description: List tasks
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: created_by
          in: query
          type: integer
          description: Filter by creator user ID
        - name: internal
          in: query
          type: boolean
          description: When true, list internal tasks instead of user-facing ones. Honored only in debug environments; ignored
            in production. Defaults to excluding internal tasks.
        - name: limit
          in: query
          type: integer
          description: Number of results to return per page.
        - name: offset
          in: query
          type: integer
          description: The initial index from which to return the results.
        - name: organization
          in: query
          type: string
          description: Filter by repository organization
        - name: origin_product
          in: query
          type: string
          description: Filter by origin product
        - name: repository
          in: query
          type: string
          description: Filter by repository name (can include org/repo format)
        - name: search
          in: query
          type: string
          description: Case-insensitive substring search over task title and description. A numeric value also matches the
            task number. An empty value disables the filter.
        - name: stage
          in: query
          type: string
          description: Filter by task run stage
        - name: status
          in: query
          type: string
          description: Filter tasks by the status of their most recent run.
      - name: taskscreate
        method: POST
        description: API for managing tasks within a project. Tasks represent units of work to be performed by an agent.
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: false
      - name: taskscreate
        method: POST
        description: API for managing tasks within a project. Tasks represent units of work to be performed by an agent.
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: false
    - name: api-projects-project_id-tasks-repositories
      path: /api/projects/{project_id}/tasks/repositories/
      operations:
      - name: tasksrepositoriesretrieve
        method: GET
        description: List distinct task repositories
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
      - name: tasksrepositoriesretrieve
        method: GET
        description: List distinct task repositories
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: api-projects-project_id-tasks-repository_readiness
      path: /api/projects/{project_id}/tasks/repository_readiness/
      operations:
      - name: tasksrepositoryreadinessretrieve
        method: GET
        description: Get repository readiness
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: refresh
          in: query
          type: boolean
        - name: repository
          in: query
          type: string
          description: Repository in org/repo format
          required: true
        - name: window_days
          in: query
          type: integer
      - name: tasksrepositoryreadinessretrieve
        method: GET
        description: Get repository readiness
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: refresh
          in: query
          type: boolean
        - name: repository
          in: query
          type: string
          description: Repository in org/repo format
          required: true
        - name: window_days
          in: query
          type: integer
    - name: api-projects-project_id-tasks-id
      path: /api/projects/{project_id}/tasks/{id}/
      operations:
      - name: tasksretrieve
        method: GET
        description: API for managing tasks within a project. Tasks represent units of work to be performed by an agent.
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: id
          in: path
          type: string
          description: A UUID string identifying this task.
          required: true
      - name: tasksretrieve
        method: GET
        description: API for managing tasks within a project. Tasks represent units of work to be performed by an agent.
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: id
          in: path
          type: string
          description: A UUID string identifying this task.
          required: true
      - name: tasksupdate
        method: PUT
        description: API for managing tasks within a project. Tasks represent units of work to be performed by an agent.
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: id
          in: path
          type: string
          description: A UUID string identifying this task.
          required: true
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: false
      - name: tasksupdate
        method: PUT
        description: API for managing tasks within a project. Tasks represent units of work to be performed by an agent.
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: id
          in: path
          type: string
          description: A UUID string identifying this task.
          required: true
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: false
      - name: taskspartialupdate
        method: PATCH
        description: API for managing tasks within a project. Tasks represent units of work to be performed by an agent.
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: id
          in: path
          type: string
          description: A UUID string identifying this task.
          required: true
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: false
      - name: taskspartialupdate
        method: PATCH
        description: API for managing tasks within a project. Tasks represent units of work to be performed by an agent.
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: id
          in: path
          type: string
          description: A UUID string identifying this task.
          required: true
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: false
      - name: tasksdestroy
        method: DELETE
        description: API for managing tasks within a project. Tasks represent units of work to be performed by an agent.
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: id
          in: path
          type: string
          description: A UUID string identifying this task.
          required: true
      - name: tasksdestroy
        method: DELETE
        description: API for managing tasks within a project. Tasks represent units of work to be performed by an agent.
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: id
          in: path
          type: string
          description: A UUID string identifying this task.
          required: true
    - name: api-projects-project_id-tasks-id-run
      path: /api/projects/{project_id}/tasks/{id}/run/
      operations:
      - name: tasksruncreate
        method: POST
        description: Run task
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: id
          in: path
          type: string
          description: A UUID string identifying this task.
          required: true
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: false
      - name: tasksruncreate
        method: POST
        description: Run task
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: id
          in: path
          type: string
          description: A UUID string identifying this task.
          required: true
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: false
    - name: api-projects-project_id-tasks-id-staged_artifacts-finalize_upload
      path: /api/projects/{project_id}/tasks/{id}/staged_artifacts/finalize_upload/
      operations:
      - name: tasksstagedartifactsfinalizeuploadcreate
        method: POST
        description: Finalize staged direct uploads for task attachments
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: id
          in: path
          type: string
          description: A UUID string identifying this task.
          required: true
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
      - name: tasksstagedartifactsfinalizeuploadcreate
        method: POST
        description: Finalize staged direct uploads for task attachments
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: id
          in: path
          type: string
          description: A UUID string identifying this task.
          required: true
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
    - name: api-projects-project_id-tasks-id-staged_artifacts-prepare_upload
      path: /api/projects/{project_id}/tasks/{id}/staged_artifacts/prepare_upload/
      operations:
      - name: tasksstagedartifactsprepareuploadcreate
        method: POST
        description: Prepare staged direct uploads for task attachments
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: id
          in: path
          type: string
          description: A UUID string identifying this task.
          required: true
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
      - name: tasksstagedartifactsprepareuploadcreate
        method: POST
        description: Prepare staged direct uploads for task attachments
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: id
          in: path
          type: string
          description: A UUID string identifying this task.
          required: true
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
    - name: api-projects-project_id-tasks-task_id-runs
      path: /api/projects/{project_id}/tasks/{task_id}/runs/
      operations:
      - name: tasksrunslist
        method: GET
        description: List task runs
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: limit
          in: query
          type: integer
          description: Number of results to return per page.
        - name: offset
          in: query
          type: integer
          description: The initial index from which to return the results.
        - name: task_id
          in: path
          type: string
          required: true
      - name: tasksrunscreate
        method: POST
        description: Create task run
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: task_id
          in: path
          type: string
          required: true
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: false
    - name: api-projects-project_id-tasks-task_id-runs-id
      path: /api/projects/{project_id}/tasks/{task_id}/runs/{id}/
      operations:
      - name: tasksrunsretrieve
        method: GET
        description: API for managing task runs. Each run represents an execution of a task.
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: id
          in: path
          type: string
          description: A UUID string identifying this task run.
          required: true
        - name: task_id
          in: path
          type: string
          required: true
      - name: tasksrunspartialupdate
        method: PATCH
        description: Update task run
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: id
          in: path
          type: string
          description: A UUID string identifying this task run.
          required: true
        - name: task_id
          in: path
          type: string
          required: true
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: false
    - name: api-projects-project_id-tasks-task_id-runs-id-append_log
      path: /api/projects/{project_id}/tasks/{task_id}/runs/{id}/append_log/
      operations:
      - name: tasksrunsappendlogcreate
        method: POST
        description: Append log entries
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: id
          in: path
          type: string
          description: A UUID string identifying this task run.
          required: true
        - name: task_id
          in: path
          type: string
          required: true
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
    - name: api-projects-project_id-tasks-task_id-runs-id-artifacts
      path: /api/projects/{project_id}/tasks/{task_id}/runs/{id}/artifacts/
      operations:
      - name: tasksrunsartifactscreate
        method: POST
        description: Upload artifacts for a task run
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: id
          in: path
          type: string
          description: A UUID string identifying this task run.
          required: true
        - name: task_id
          in: path
          type: string
          required: true
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
    - name: api-projects-project_id-tasks-task_id-runs-id-artifacts-download
      path: /api/projects/{project_id}/tasks/{task_id}/runs/{id}/artifacts/download/
      operations:
      - name: tasksrunsartifactsdownloadcreate
        method: POST
        description: Download an artifact through the backend
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: id
          in: path
          type: string
          description: A UUID string identifying this task run.
          required: true
        - name: task_id
          in: path
          type: string
          required: true
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
    - name: api-projects-project_id-tasks-task_id-runs-id-artifacts-finalize_upload
      path: /api/projects/{project_id}/tasks/{task_id}/runs/{id}/artifacts/finalize_upload/
      operations:
      - name: tasksrunsartifactsfinalizeuploadcreate
        method: POST
        description: Finalize direct uploads for task run artifacts
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: id
          in: path
          type: string
          description: A UUID string identifying this task run.
          required: true
        - name: task_id
          in: path
          type: string
          required: true
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
    - name: api-projects-project_id-tasks-task_id-runs-id-artifacts-prepare_upload
      path: /api/projects/{project_id}/tasks/{task_id}/runs/{id}/artifacts/prepare_upload/
      operations:
      - name: tasksrunsartifactsprepareuploadcreate
        method: POST
        description: Prepare direct uploads for task run artifacts
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: id
          in: path
          type: string
          description: A UUID string identifying this task run.
          required: true
        - name: task_id
          in: path
          type: string
          required: true
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
    - name: api-projects-project_id-tasks-task_id-runs-id-artifacts-presign
      path: /api/projects/{project_id}/tasks/{task_id}/runs/{id}/artifacts/presign/
      operations:
      - name: tasksrunsartifactspresigncreate
        method: POST
        description: Generate presigned URL for an artifact
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: id
          in: path
          type: string
          description: A UUID string identifying this task run.
          required: true
        - name: task_id
          in: path
          type: string
          required: true
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
    - name: api-projects-project_id-tasks-task_id-runs-id-command
      path: /api/projects/{project_id}/tasks/{task_id}/runs/{id}/command/
      operations:
      - name: tasksrunscommandcreate
        method: POST
        description: Send command to agent server
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: id
          in: path
          type: string
          description: A UUID string identifying this task run.
          required: true
        - name: task_id
          in: path
          type: string
          required: true
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
    - name: api-projects-project_id-tasks-task_id-runs-id-connection_token
      path: /api/projects/{project_id}/tasks/{task_id}/runs/{id}/connection_token/
      operations:
      - name: tasksrunsconnectiontokenretrieve
        method: GET
        description: Get sandbox connection token
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: id
          in: path
          type: string
          description: A UUID string identifying this task run.
          required: true
        - name: task_id
          in: path
          type: string
          required: true
    - name: api-projects-project_id-tasks-task_id-runs-id-logs
      path: /api/projects/{project_id}/tasks/{task_id}/runs/{id}/logs/
      operations:
      - name: tasksrunslogsretrieve
        method: GET
        description: Get task run logs
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: id
          in: path
          type: string
          description: A UUID string identifying this task run.
          required: true
        - name: task_id
          in: path
          type: string
          required: true
    - name: api-projects-project_id-tasks-task_id-runs-id-relay_message
      path: /api/projects/{project_id}/tasks/{task_id}/runs/{id}/relay_message/
      operations:
      - name: tasksrunsrelaymessagecreate
        method: POST
        description: Relay run message to Slack
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: id
          in: path
          type: string
          description: A UUID string identifying this task run.
          required: true
        - name: task_id
          in: path
          type: string
          required: true
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
    - name: api-projects-project_id-tasks-task_id-runs-id-resume_in_cloud
      path: /api/projects/{project_id}/tasks/{task_id}/runs/{id}/resume_in_cloud/
      operations:
      - name: tasksrunsresumeincloudcreate
        method: POST
        description: Resume task run in cloud
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: id
          in: path
          type: string
          description: A UUID string identifying this task run.
          required: true
        - name: task_id
          in: path
          type: string
          required: true
    - name: api-projects-project_id-tasks-task_id-runs-id-session_logs
      path: /api/projects/{project_id}/tasks/{task_id}/runs/{id}/session_logs/
      operations:
      - name: tasksrunssessionlogsretrieve
        method: GET
        description: Get filtered task run session logs
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: after
          in: query
          type: string
          description: Only return events after this ISO8601 timestamp
        - name: event_types
          in: query
          type: string
          description: Comma-separated list of event types to include
        - name: exclude_types
          in: query
          type: string
          description: Comma-separated list of event types to exclude
        - name: id
          in: path
          type: string
          description: A UUID string identifying this task run.
          required: true
        - name: limit
          in: query
          type: integer
          description: Maximum number of entries to return (default 1000, max 5000)
        - name: offset
          in: query
          type: integer
          description: Zero-based offset into the filtered log entries
        - name: task_id
          in: path
          type: string
          required: true
    - name: api-projects-project_id-tasks-task_id-runs-id-set_output
      path: /api/projects/{project_id}/tasks/{task_id}/runs/{id}/set_output/
      operations:
      - name: tasksrunssetoutputpartialupdate
        method: PATCH
        description: Set run output
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: id
          in: path
          type: string
          description: A UUID string identifying this task run.
          required: true
        - name: task_id
          in: path
          type: string
          required: true
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: false
    - name: api-projects-project_id-tasks-task_id-runs-id-start
      path: /api/projects/{project_id}/tasks/{task_id}/runs/{id}/start/
      operations:
      - name: tasksrunsstartcreate
        method: POST
        description: Start task run
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: id
          in: path
          type: string
          description: A UUID string identifying this task run.
          required: true
        - name: task_id
          in: path
          type: string
          required: true
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: false
    - name: api-projects-project_id-tasks-task_id-runs-id-stream
      path: /api/projects/{project_id}/tasks/{task_id}/runs/{id}/stream/
      operations:
      - name: tasksrunsstreamretrieve
        method: GET
        description: API for managing task runs. Each run represents an execution of a task.
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: id
          in: path
          type: string
          description: A UUID string identifying this task run.
          required: true
        - name: task_id
          in: path
          type: string
          required: true
    authentication:
      type: bearer
      token: '{{env.POSTHOG_API_KEY}}'
  exposes:
  - type: rest
    namespace: posthog-tasks-rest
    port: 8080
    description: REST adapter for PostHog API — tasks. One Spectral-compliant resource per consumed operation, prefixed with
      /v1.
    resources:
    - path: /v1/api/projects/{project-id}/tasks
      name: api-projects-project-id-tasks
      description: REST surface for api-projects-project_id-tasks.
      operations:
      - method: GET
        name: taskslist
        description: List tasks
        call: posthog-tasks.taskslist
        with:
          created_by: rest.created_by
          internal: rest.internal
          limit: rest.limit
          offset: rest.offset
          organization: rest.organization
          origin_product: rest.origin_product
          repository: rest.repository
          search: rest.search
          stage: rest.stage
          status: rest.status
        outputParameters:
        - type: object
          mapping: $.
      - method: GET
        name: taskslist
        description: List tasks
        call: posthog-tasks.taskslist
        with:
          created_by: rest.created_by
          internal: rest.internal
          limit: rest.limit
          offset: rest.offset
          organization: rest.organization
          origin_product: rest.origin_product
          repository: rest.repository
          search: rest.search
          stage: rest.stage
          status: rest.status
        outputParameters:
        - type: object
          mapping: $.
      - method: POST
        name: taskscreate
        description: API for managing tasks within a project. Tasks represent units of work to be performed by an agent.
        call: posthog-tasks.taskscreate
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
      - method: POST
        name: taskscreate
        description: API for managing tasks within a project. Tasks represent units of work to be performed by an agent.
        call: posthog-tasks.taskscreate
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/api/projects/{project-id}/tasks/repositories
      name: api-projects-project-id-tasks-repositories
      description: REST surface for api-projects-project_id-tasks-repositories.
      operations:
      - method: GET
        name: tasksrepositoriesretrieve
        description: List distinct task repositories
        call: posthog-tasks.tasksrepositoriesretrieve
        outputParameters:
        - type: object
          mapping: $.
      - method: GET
        name: tasksrepositoriesretrieve
        description: List distinct task repositories
        call: posthog-tasks.tasksrepositoriesretrieve
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/api/projects/{project-id}/tasks/repository-readiness
      name: api-projects-project-id-tasks-repository-readiness
      

# --- truncated at 32 KB (64 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/posthog/refs/heads/main/capabilities/posthog-tasks.yaml