Skip to content
Hayonix

API reference · Clusters

A member’s container output as a server-sent event stream

GET/v1/clusters/{cluster_id}/members/{rank}/logs
API keycluster:readProject
TypeScript
client.clusters.streamMemberLogs()
Python
client.clusters.stream_member_logs()
CLI
hayonix clusters logs

Events: output (stream stdout|stderr, text, timestamp, instance_id), notice (why there is no output, e.g. the member is not on a host) and finally end. Output comes from the member’s host and is gone once its container is removed.

Project API key (Authorization: Bearer sk_…), or a console session. Requires the cluster:read permission (a key's scope, or a role that includes it).

Examples

The samples read API_KEY and API_BASE_URL from the environment (see Setup). Values are examples.

curl -sS -N "$API_BASE_URL/clusters/clu_01jc5zq4m8k3v6x9t2w7r0b1e4/members/0/logs" \
  -H "Authorization: Bearer $API_KEY"

Request

Headers
HeaderRequiredDescription
AuthorizationyesBearer and your API key. The key implies its project.
X-Project-Idsession onlyThe project to act in, for console sessions. Requests with an API key leave it out.

Path parameters

  • cluster_idstringrequired

    ID of the cluster

    ID with prefix clu_

  • rankinteger | null

    The member’s rank (0 is the head)

    0–63

Query parameters

  • tailinteger | null

    Lines of past output to send first (default 200)

    0–5000 · default 200

  • followboolean | string

    Keep the stream open for new output (default false)

Response

200 a server-sent event stream (text/event-stream) — An SSE stream

Errors

Errors use the standard envelope. What this operation can answer:

Errors
StatusTypeWhen
400invalid_request_errorA parameter or body field is missing or not allowed; param names it.
401authentication_errorThe key or session is missing, revoked or expired.
403permission_errorThe credential lacks the permission this needs, or the organization is suspended.
404not_found_errorNo such resource in this project (an ID from another project is answered the same way).
429rate_limit_error rate_limitedToo many requests; retry after retry-after seconds.