Ga naar inhoud

Get an agreement

GET
/api/v1/agreements/{id}
curl --request GET \
--url https://example.com/api/v1/agreements/example \
--cookie bl_%3Cslug%3E_session=%3Cbl_%3Cslug%3E_session%3E

With its transfers, what it covers and, as provider, how it is used.

id
required
string

The id of the agreement.

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

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