Get an agreement
const url = 'https://example.com/api/v1/agreements/example';const options = { method: 'GET', headers: {cookie: 'bl_%3Cslug%3E_session=%3Cbl_%3Cslug%3E_session%3E'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://example.com/api/v1/agreements/example \ --cookie bl_%3Cslug%3E_session=%3Cbl_%3Cslug%3E_session%3EWith its transfers, what it covers and, as provider, how it is used.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”The id of the agreement.
Responses
Section titled “Responses”OK.
An agreement as the management API shows it.
object
The negotiation that closed it; none for an agreement for own use.
The aanwijzing an agreement for own use comes from (decisions #74).
The agreement as ODRL.
object
provider or consumer: our side.
List only.
List only.
Single agreement only: its transfers (id, state, role, updated_at).
object
Set when the provider revoked the agreement.
Set when the agreement was terminated.
The objects the agreement covers.
The points it covers; null: all points of the objects.
Data from before this moment is not covered.
Provider only: how the consumer uses the agreement (decisions #76, #77).
object
The consumer has a running transfer.
Not running: since when; never used: since the agreement.
A data plane told how it was used; otherwise only running is known.
Example
{ "role": "provider", "negotiation_state": "INITIAL"}No valid session, DPoP-bound token or API key.
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 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).
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 found.
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" }}