Receive an acceptance, rejection or revocation
const url = 'https://example.com/delegation/v1/example/example';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{}'};
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/delegation/v1/example/example \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{}'acceptance and rejection come from the party that decides, revocation from either party. The body is a DelegationAcceptance, DelegationRejection or DelegationRevocation for this id. The same message again gets the same answer.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”The id of the delegation (urn:uuid:…).
acceptance, rejection or revocation.
Header Parameters
Section titled “Header Parameters”The sender’s signature over the body, recorded as evidence.
Request Bodyrequired
Section titled “Request Bodyrequired”The message (JSON-LD).
object
Example generated
{}Responses
Section titled “Responses”OK.
What the other connector gets back: the state of the delegation.
object
https://w3id.org/buildinglinks/v1/delegation.
Delegation.
Example generated
{ "@context": "example", "@type": "example", "@id": "example", "state": "example"}The request is not valid.
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" }}No valid DCP token or signature.
Unknown delegation or message.
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" }}Conflicts with the current state.
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" }}