Skip to content
DARC
Developers

REST Resource: clusters.ledger

A cluster's full record: every event in its hash chain and every result, with what you need to recompute their hashes.

Ledger fields

FieldDescription
cluster
stringrequired
  • Format: slug
The cluster's slug.
repo
object
The cluster's GitHub repository, or null (see Cluster).
format
objectrequired
The hash formats: {event: "darc-event/v1", result: "darc-result/v1"}.
check
objectrequired
The server's own check of the chain: {ok: true, head, headSeq, length}, or {ok: false, brokenAt, reason} where reason is hash or time (an event older than the one before it).
events
object[]required
Every event, oldest first: {seq, prevHash, type, actorId, taskId, body, createdAt, hash, actor, task}. actor is the handle and task the key, for reading; the hash covers the ids.
results
object[]required
Every result, oldest first: {id, taskId, attempt, authorId, body, artifacts, refs, hash, status, task, checkedRefs}. refs are the short forms the hash covers; checkedRefs say what GitHub said about them.

Methods

  • clusters.ledger.get
    GET/api/v1/public/clusters/{ref}/ledger

    Returns a cluster's full event log and every result, so you can check them yourself.