Harthelm Docs

Stage and service logs

Step output of the workspace. Without `follow`, the history as NDJSON (`application/x-ndjson`, one `LogEntry` per line, oldest first, at most `limit` lines) from the log backend. With `follow=true`, a `text/event-stream`: the agents' ring buffers since `since`, then live lines, each `event: log` with a `LogEntry` as data; `event: end` when the followed run finished; a `: ping` comment every 25 s. Filters combine; `replica` is a pod name. Needs `workspace.view`.

Generated from openapi/harthelm.yaml at v1.5.0
GET
/workspaces/{ws}/logs

Authorization

cookie__Host-harthelm_session<token>

Browser session of the UI (12 h idle, 7 days absolute). State-changing requests also need the header Harthelm-CSRF: 1 and a matching Origin.

Path Parameters

ws*integer

Numeric resource id.

Formatint64
Range1 <= value

Query Parameters

stage?string

Only this stage's steps.

Value in"prepare""test""run"
service?string

A service name, or ide for prepare and test.

Lengthlength <= 32
replica?string

Only this pod's lines (a pod name).

Lengthlength <= 253
step?integer

Only this step's lines (the step's index).

Range0 <= value
since?string

Only lines at or after this time; default the start of the latest run of the stage.

Formatdate-time
follow?boolean

Stream live lines as server-sent events instead of answering the history.

Defaultfalse
limit?integer

History only; the newest lines win when there are more.

Range1 <= value <= 10000
Default1000

Response Body

The log lines.

  1. response
time*string
Formatdate-time
stage*StageName
Value in"prepare""test""run"
step?integer
Range0 <= value
service*string
replica*string
run_id?ID

Numeric resource id.

Formatint64
Range1 <= value
stream*LogStream

system lines come from the agent (step started, exited with 1, restarting in 4 s).

Value in"stdout""stderr""system"
msg*string
curl -X GET 'https://console.example.com/api/v1/workspaces/1/logs'
{  "time": "2019-08-24T14:15:22Z",  "stage": "prepare",  "step": 0,  "service": "string",  "replica": "string",  "run_id": 1,  "stream": "stdout",  "msg": "string"}

Write harthelm.yml

Writes the profile's file through the IDE agent, the one file write the console has. `If-Match` is the quoted SHA-256 the editor read; `If-None-Match: *` creates a file that must not exist yet; neither is 428. A file whose hash is not `If-Match` (or that exists under `If-None-Match: *`) is 412 with problem `config-changed`: the editor re-reads and offers *Save and override*, which sends the new hash. The agent writes atomically (a temporary file in `/data/app` renamed over the old one, mode kept) and does not validate: a file with a syntax error is saved as written, and the next Plan answers 422 `invalid-config`. The content is UTF-8 without NUL bytes (422 with pointer `/content`), at most 1 MiB (413). Nothing else changes: the synced landscape keeps running until a Sync. Needs `workspace.code`; audited as `landscape.config_write` (profile and the new hash).

Create a standalone managed service

Needs `team.managed_services` (every team member). Checks the request against the provider's definition: the provider is offered to the team and available on the cluster (409 `provider-unavailable`), the plan exists, `resources` override only parameters that are not read-only and stay within their bounds, `config` and `secrets` validate against `fields.config` and `fields.secrets` (defaults applied; 422 with pointers `/config/<k>`, `/secrets/<k>`, `/resources/<k>`, `/plan`). 409 `name-taken` when a standalone instance of the team that is not deleted has the name, `one-per-team`, `quota-exceeded` (the plan's CPU and memory against the team quota). The instance starts in `creating`; follow `managed_service.updated`. Secret values are write-only: the console generates passwords in the browser and shows them once. `public` (1.4): as for `PATCH /managed-services/{ms}` (422 at `/public`, 409 `public-hosts-disabled`).