Ga naar inhoud

Start a delegation

POST
/api/v1/delegations
curl --request POST \
--url https://example.com/api/v1/delegations \
--header 'Content-Type: application/json' \
--cookie bl_%3Cslug%3E_session=%3Cbl_%3Cslug%3E_session%3E \
--data '{ "delegate_did": "example", "delegator_did": "example", "dataset": { "id": "example", "title": "example", "description": "example", "keywords": [ "example" ], "building_id": "example", "objects": [ "example" ], "points": [ "example" ], "profile": "example" }, "objects": [ "example" ], "points": [ "example" ], "profile": "example", "basis": "example", "actions": [ "example" ], "valid_until": "2026-04-15T12:00:00Z", "note": "example", "backend": { "base_url": "example", "auth_header_name": "example", "auth_header_value": "example", "allowed_methods": [ "example" ], "allowed_paths": [ "example" ], "links": { "additionalProperty": { "local_id": "example", "auth_header_value": "example", "provides": "example" } } }, "source_id": "example", "links": [ { "local_id": "example", "auth_header_value": "example", "provides": "example", "object": "example" } ] }'

As rights holder, with delegate_did: ask a supplier to deliver a dataset of ours from its data plane; the product stays out of the catalog until the supplier accepts. As supplier, with delegator_did: offer a rights holder to deliver one of its datasets from a system of ours (source_id). The other party accepts or rejects (decisions #66).

Media typeapplication/json
object
delegate_did

Rights holder: the supplier asked to deliver.

string | null
delegator_did

Supplier: the rights holder offered delivery (decisions #66).

string | null
dataset
required

The dataset (product) a delegation is about.

object
id

The product id; left out: made from the title.

string | null
title
string
description
string
keywords
Array<string>
building_id
string | null
objects

The objects the delivery covers (decisions #69); building_id is the older single object.

Array<string>
points

Only these points of the objects; left out = all.

Array<string> | null
profile

The topology profile: a delegation for the indeling (decisions #71).

string | null
objects

The objects and points may also come next to the dataset.

Array<string>
points
Array<string> | null
profile
string | null
basis

The basis on which the supplier delivers (V1).

string | null
actions
required

read and/or write.

Array<string>
valid_until
required

At least an hour and at most five years from now.

string format: date-time
note
string | null
backend
One of:
null
source_id

Supplier: the system (source) it delivers from.

string | null
links

Supplier: the koppelingen of the objects in that system, when they differ from the default (own id, own key).

Array

A koppeling as the API shows it: the object, and how it differs.

object
local_id

The system’s own id of the building; the default is the object id.

string | null
auth_header_value

A key for this building only; the default is the system’s.

string | null
provides

What the system provides for this building: data (the default), topology (the indeling, decisions #71) or both.

string | null
object
required

The object id, e.g. nl.bag.pand.0014100040022681.

string

Example generated

{
"delegate_did": "example",
"delegator_did": "example",
"dataset": {
"id": "example",
"title": "example",
"description": "example",
"keywords": [
"example"
],
"building_id": "example",
"objects": [
"example"
],
"points": [
"example"
],
"profile": "example"
},
"objects": [
"example"
],
"points": [
"example"
],
"profile": "example",
"basis": "example",
"actions": [
"example"
],
"valid_until": "2026-04-15T12:00:00Z",
"note": "example",
"backend": {
"base_url": "example",
"auth_header_name": "example",
"auth_header_value": "example",
"allowed_methods": [
"example"
],
"allowed_paths": [
"example"
],
"links": {
"additionalProperty": {
"local_id": "example",
"auth_header_value": "example",
"provides": "example"
}
}
},
"source_id": "example",
"links": [
{
"local_id": "example",
"auth_header_value": "example",
"provides": "example",
"object": "example"
}
]
}

Created.

Media typeapplication/json

A delegation as the management API shows it: the key of a binding masked.

object
id
required
string
role
required

Our side: delegator (rights holder) or delegate (supplier).

string
Allowed values: delegator delegate
initiated_by
required

Who started it (decisions #66): the rights holder asked, or the supplier offered. The other party accepts or rejects.

string
Allowed values: delegator delegate
state
required

requested, active, suspended, rejected, revoked or expired.

string
delegator_did
required
string
delegate_did
required
string
counterparty_address
required
string
dataset_id
required
string
title
required
string
description
required
string
building_id
string | null
objects
required

The objects this erkenning en aanwijzing covers (decisions #69).

Array<string>
points

Optionally only these points of the objects; None = all.

Array<string> | null
source_id

Supplier: the own source the backend binding was taken from.

string | null
profile

None: the data; the topology profile: the indeling (decisions #71).

string | null
basis

The basis on which the supplier delivers, e.g. a contract (V1).

string | null
actions
required

read and/or write.

Array<string>
valid_until
required
string format: date-time
note
string | null
controlplane

The rights holder’s control plane (DPS registration).

object | null
dataplane

The supplier’s data plane (DPS registration).

object | null
backend
One of:
null
requested_by
string | null
decided_by
string | null
decided_at
string | null format: date-time
reason
string | null
history
required

The messages and states so far: at, state, message_type, direction, by, note, evidence_id.

Array<object>
object
created_at
required
string format: date-time
updated_at
required
string format: date-time
outbox
required

Our messages of this delegation that are not delivered yet.

Array<object>

A row of the outbox: a message of ours to a counterparty, until it is delivered or dropped (decisions #56).

object
id
required
integer format: int64
process_id
required

The negotiation, transfer or delegation the message belongs to.

string
kind
required
string
message_type
required
string
counterparty_did
required
string
url
required
string
evidence_id
required
string
status
required
string
attempts
required
integer format: int32
next_attempt_at
required
string format: date-time
last_error
string | null
response_status
integer | null format: int32
created_at
required
string format: date-time
resent_at
string | null format: date-time
delivered_at
string | null format: date-time
counterparty_did
required
string
counterparty_name
string | null
delegator_name
string | null
delegate_name
string | null
active
required

Active and within its period.

boolean
active_transfers
required

Transfers (rights holder) or data flows (supplier) that run now.

integer
asset
One of:
null
offers

Rights holder: how many offers the product has.

integer | null
existing_asset

Rights holder, open offer: a product of ours with the proposed id; reusable when its own delegation has ended.

object | null
transfers

Rights holder, single delegation: the transfers under it (id, state, counterparty_did, counterparty_name, updated_at).

Array<object> | null
object
flows

Supplier, single delegation: the data flows of the delivery, with requests_24h.

Array<object> | null
object
suggestions

Supplier, open request: existing bindings it could reuse (asset_id, title, building_id, backend).

Array<object> | null
object

Example

{
"role": "delegator",
"initiated_by": "delegator"
}

The request is not valid.

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

Conflicts with the current state.

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 authority could not be reached.

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