Ga naar inhoud

Witness a did:webvh entry

POST
/api/v1/witness
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.

Media typeapplication/json
object
log
required

The participant’s whole did:webvh log, oldest entry first.

Array<object>
object

Example generated

{
"log": [
{}
]
}

OK.

Media typeapplication/json
object
versionId
required

The entry that is approved: the newest.

string
proof
required

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.

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"
}
}

Not authenticated.

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"
}
}

Not the participant’s own DID, or the participant is suspended.

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 log does not extend the approved history.

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"
}
}