Change a product
const url = 'https://example.com/api/v1/products/example';const options = { method: 'PUT', headers: { cookie: 'bl_%3Cslug%3E_session=%3Cbl_%3Cslug%3E_session%3E', 'Content-Type': 'application/json' }, body: '{"id":"example","title":"example","description":"example","keywords":["example"],"objects":["example"],"building_id":"example","sort":"example","selection":{"kind":"all"},"points":["example"],"source_id":"example","delegation_id":"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"}}},"content_type":"example","profile":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PUT \ --url https://example.com/api/v1/products/example \ --header 'Content-Type: application/json' \ --cookie bl_%3Cslug%3E_session=%3Cbl_%3Cslug%3E_session%3E \ --data '{ "id": "example", "title": "example", "description": "example", "keywords": [ "example" ], "objects": [ "example" ], "building_id": "example", "sort": "example", "selection": { "kind": "all" }, "points": [ "example" ], "source_id": "example", "delegation_id": "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" } } }, "content_type": "example", "profile": "example" }'Replaces the product. How it is delivered stays as it is. An unchanged selection keeps its point list.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”The id of the product.
Request Bodyrequired
Section titled “Request Bodyrequired”A product as the API accepts it. building_id and backend are the
fields from before sources (an own binding per product).
object
Left out on create: made from the title.
The object ids, e.g. nl.bag.pand.0014100040022681.
Older single object; objects wins.
A readable kind of data, e.g. “Klimaat”; derived when left out.
All points of the objects.
object
A Brick class and everything beneath it.
object
A named group of the supplier.
object
Locations (floors, zones, rooms) and everything inside them.
object
Chosen by hand: the product’s points.
object
With selection points: the points chosen by hand.
The own source that delivers the product.
Create only: the delivery by a supplier this product belongs to.
A binding of its own, from before sources; not with source_id or delegation_id.
object
The address of the system, e.g. https://bms.example.nl/api.
The header that carries the key, e.g. X-Api-Key.
The key; shown as ••••••, and sent back as such it stays as it was.
Methods the data plane lets through, e.g. ["GET"] for reading or
["GET", "POST", "PATCH"] for reading and steering. At least one: an
empty list lets nothing through.
Path patterns the data plane lets through (* one segment, ** the
rest), e.g. api/sites/4711/**, or ["**"] for the whole API. At
least one, except on a Buildinglinks system, whose koppelingen fill
them (v1/buildings/{object}/**): an empty list lets nothing through.
Koppelingen that differ from the default, per object (decisions #72): the data plane routes the building to the system’s own id and key.
object
How one object is reached in a system (decisions #72).
object
The system’s own id of the building; the default is the object id.
A key for this building only; the default is the system’s.
What the system provides for this building: data (the default),
topology (the indeling, decisions #71) or both.
Default application/json.
https://w3id.org/buildinglinks/v1 or its topology profile; settled by where the data comes from.
Responses
Section titled “Responses”OK.
A product as the management API shows it: key masked, plus how it is delivered.
object
Building the dataset exposes (building_id in the wire protocol);
published in the catalog so consumers can address it.
Object ids of the product (decisions #67); building_id is the first.
Readable kind of data, e.g. “Verlichting”, “Klimaat”, “Alle data”.
All points of the objects.
object
A Brick class and everything beneath it.
object
A named group of the supplier.
object
Locations (floors, zones, rooms) and everything inside them.
object
Chosen by hand: the product’s points.
object
The resolved point list (a snapshot); None = all points of the objects.
The own source that delivers this product.
Own delivery: the internal API behind the dataset. Empty when a
supplier delivers the dataset (delegation_id).
object
The address of the system, e.g. https://bms.example.nl/api.
The header that carries the key, e.g. X-Api-Key.
The key; shown as ••••••, and sent back as such it stays as it was.
Methods the data plane lets through, e.g. ["GET"] for reading or
["GET", "POST", "PATCH"] for reading and steering. At least one: an
empty list lets nothing through.
Path patterns the data plane lets through (* one segment, ** the
rest), e.g. api/sites/4711/**, or ["**"] for the whole API. At
least one, except on a Buildinglinks system, whose koppelingen fill
them (v1/buildings/{object}/**): an empty list lets nothing through.
Koppelingen that differ from the default, per object (decisions #72): the data plane routes the building to the system’s own id and key.
object
How one object is reached in a system (decisions #72).
object
The system’s own id of the building; the default is the object id.
A key for this building only; the default is the system’s.
What the system provides for this building: data (the default),
topology (the indeling, decisions #71) or both.
Delivery delegated to a supplier’s data plane (docs/decisions.md #32).
How a product is delivered: from an own source, or by a supplier’s data plane under an erkenning en aanwijzing.
object
own or delegated.
Own: the name of the source.
Delegated: the delegation.
Delegated: the state of the delegation, or unknown.
Delegated: an open request or offer waits for our decision.
Single product only: its offers.
An offer: a product with the policies under which it is in the catalog.
object
The product.
Who sees the offer in the catalog.
The conditions of the agreement.
Whether a provider operator must approve each contract request.
Example
{ "selection": { "kind": "all" }, "delivery": { "role": "delegator", "initiated_by": "delegator" }, "offers": [ { "approval": "automatic" } ]}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 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" }}The points could not be read from the source.
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" }}