Ga naar inhoud

Revoke an agreement

POST
/api/v1/agreements/{id}/revoke
curl --request POST \
--url https://example.com/api/v1/agreements/example/revoke \
--header 'Content-Type: application/json' \
--cookie bl_%3Cslug%3E_session=%3Cbl_%3Cslug%3E_session%3E \
--data '{ "reason": "example" }'

As provider: no new transfers under the agreement, running ones end, and a new request of the consumer waits for approval. The reason goes to the consumer.

id
required
string

The id of the agreement.

Media typeapplication/json
object
reason

At most 500 characters; travels to the counterparty.

string | null

Example generated

{
"reason": "example"
}

OK.

Media typeapplication/json

An agreement as the management API shows it.

object
id
required
string
negotiation_id

The negotiation that closed it; none for an agreement for own use.

string | null
delegation_id

The aanwijzing an agreement for own use comes from (decisions #74).

string | null
dataset_id
required
string
provider_did
required
string
consumer_did
required
string
odrl
required

The agreement as ODRL.

object
signed_at
required
string format: date-time
role
required

provider or consumer: our side.

string
Allowed values: provider consumer
provider_name

List only.

string | null
consumer_name

List only.

string | null
negotiation_state
One of:
null
transfers

Single agreement only: its transfers (id, state, role, updated_at).

Array<object> | null
object
offer_id
string | null
revocation

Set when the provider revoked the agreement.

object | null
termination

Set when the agreement was terminated.

object | null
objects

The objects the agreement covers.

Array<string> | null
points

The points it covers; null: all points of the objects.

Array<string> | null
read_only
boolean | null
observed_from

Data from before this moment is not covered.

string | null
usage
One of:
null

Example

{
"role": "provider",
"negotiation_state": "INITIAL"
}

The reason is too long.

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

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

Not found.

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 ours to revoke, or already revoked.

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