Skip to content

Add LogsAPI: expose GET /api/v1/{tenant}/logs/{executionId} in Go SDK #207

@Ben8t

Description

@Ben8t

Summary

The Kestra REST API exposes several log endpoints that are not currently wrapped by the Go SDK:

  • GET /api/v1/{tenant}/logs/{executionId} — fetch all log entries for an execution (returns []LogEntry)
  • GET /api/v1/{tenant}/logs/{executionId}/download — download logs as a file
  • GET /api/v1/{tenant}/logs/{executionId}/follow — stream logs in real-time (SSE)
  • GET /api/v1/{tenant}/logs/search — search logs with pagination and filters

The LogEntry and PagedResultsLogEntry models already exist in the SDK, but no LogsAPI service exposes methods for retrieving them.

Motivation

We're building a `kestractl executions get --logs` feature for kestractl that would let users fetch execution log output from the CLI. Currently this requires making raw HTTP calls because the SDK does not wrap the logs endpoints. Having a `LogsAPI` in the SDK would let us implement this cleanly.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/backendNeeds backend code changes
    No fields configured for Feature.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions