Ga naar inhoud

Status of anchoring

GET
/api/v1/evidence/anchoring
curl --request GET \
--url https://example.com/api/v1/evidence/anchoring \
--cookie bl_%3Cslug%3E_session=%3Cbl_%3Cslug%3E_session%3E

Whether anchoring at the notary works, as anchoring in /healthz: degraded when the notary refuses the chain (reason: fork), or when new evidence has waited longer than BL_ANCHOR_STALE_AFTER for an anchor (reason: stale), for example because the authority is unreachable. With the last anchor and the last failure and its reason.

OK.

Media typeapplication/json

The anchoring of this connector, as GET /api/v1/evidence/anchoring shows it.

object
last_success_at

When an anchor was last made.

string | null format: date-time
anchored_seq

The last entry an anchor covers.

integer | null format: int64
last_failure_at

When anchoring last failed.

string | null format: date-time
last_error

Why it last failed.

string | null
failures

Failed attempts since the last anchor.

integer format: int64
fork_since

Since when the notary refuses the chain because it does not continue what was anchored before (#58), for example after restoring a backup. Cleared by the next anchor.

string | null format: date-time
status
required

ok or degraded, as anchoring in /healthz.

string
reason
One of:
null
unanchored_since

The oldest evidence entry that no anchor covers yet.

string | null format: date-time
stale_after_secs
required

Evidence may wait this long for an anchor before anchoring is degraded (BL_ANCHOR_STALE_AFTER).

integer format: int64

Example

{
"reason": "fork"
}

No valid session, DPoP-bound token or API key.

Media typeapplication/json

The body of every failed call to a management API.

object
error
required
object
code
required

Stable, machine-readable: invalid_request, unauthenticated, forbidden, not_found, conflict, upstream_unavailable, unavailable, internal, or a more specific code of the operation.

string
message
required

For people; may change between versions.

string

Example

{
"error": {
"code": "not_found",
"message": "unknown negotiation"
}
}

The caller lacks the role this operation needs; or a change with the session cookie came from a page of another site (cross_site_request, decisions #83).

Media typeapplication/json

The body of every failed call to a management API.

object
error
required
object
code
required

Stable, machine-readable: invalid_request, unauthenticated, forbidden, not_found, conflict, upstream_unavailable, unavailable, internal, or a more specific code of the operation.

string
message
required

For people; may change between versions.

string

Example

{
"error": {
"code": "not_found",
"message": "unknown negotiation"
}
}