Witness a did:webvh entry
const url = 'https://example.com/api/v1/witness';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"log":[{}]}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/api/v1/witness \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "log": [ {} ] }'A participant’s connector asks the authority, as witness, to approve the newest entry of its did:webvh log (decisions #42). The authority approves only an entry that verifies and that extends the history it approved before, and refuses suspended participants.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”object
The participant’s whole did:webvh log, oldest entry first.
object
Example generated
{ "log": [ {} ]}Responses
Section titled “Responses”OK.
object
The entry that is approved: the newest.
The authority’s witness proof (a Data Integrity proof) for it.
object
Example generated
{ "versionId": "example", "proof": {}}The log does not verify, or does not name this authority as witness.
The body of every failed call to a management API.
object
object
Stable, machine-readable: invalid_request, unauthenticated,
forbidden, not_found, conflict, upstream_unavailable,
unavailable, internal, or a more specific code of the operation.
For people; may change between versions.
Example
{ "error": { "code": "not_found", "message": "unknown negotiation" }}Not authenticated.
The body of every failed call to a management API.
object
object
Stable, machine-readable: invalid_request, unauthenticated,
forbidden, not_found, conflict, upstream_unavailable,
unavailable, internal, or a more specific code of the operation.
For people; may change between versions.
Example
{ "error": { "code": "not_found", "message": "unknown negotiation" }}Not the participant’s own DID, or the participant is suspended.
The body of every failed call to a management API.
object
object
Stable, machine-readable: invalid_request, unauthenticated,
forbidden, not_found, conflict, upstream_unavailable,
unavailable, internal, or a more specific code of the operation.
For people; may change between versions.
Example
{ "error": { "code": "not_found", "message": "unknown negotiation" }}The log does not extend the approved history.
The body of every failed call to a management API.
object
object
Stable, machine-readable: invalid_request, unauthenticated,
forbidden, not_found, conflict, upstream_unavailable,
unavailable, internal, or a more specific code of the operation.
For people; may change between versions.
Example
{ "error": { "code": "not_found", "message": "unknown negotiation" }}