You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: gir/datastekker-installateur-flow.md
+98-62Lines changed: 98 additions & 62 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
3
3
> **⚠️ Design document — not ready for implementation**
4
4
>
5
-
> This document describes the intended flow for the Datastekker use case. Several open questions remain unresolved (see [Open Questions](#open-questions)). Policy field values, data-element sets, and license conditions have not been finalised. Do not use this document as the basis for implementation until it has been marked as approved.
5
+
> This document describes the intended flow for the Datastekker use case. Several open questions remain unresolved (see [Open Questions](#open-questions)), in particular componentId-to-installationId resolution and license conditions.
6
6
7
7
Datastekker (developed by 2BA) retrieves performance data from installation manufacturers and translates it into uniform performance data using the Heatpump Common Ontology. To access this data, an installer needs explicit consent from the building owner. GIR manages that authorization.
8
8
@@ -26,33 +26,40 @@ This guide describes how an installer requests access through a form on the Tech
26
26
27
27
The flow has two phases: a one-time approval flow and a recurring operational data access pattern.
28
28
29
-
```mermaid
30
-
sequenceDiagram
31
-
participant Form as TechniekNederland Form
32
-
participant Keyper as Keyper API
33
-
participant Owner as Building Owner
34
-
participant GIR as GIR API
35
-
participant DS as Datastekker (2BA)
36
-
participant Inst as Installer
37
-
38
-
rect rgb(240, 248, 255)
39
-
Note over Form,GIR: Approval flow (one-time per installer / building)
40
-
Form->>Keyper: Create access request for vboId
41
-
Keyper->>Owner: Approval link by email
42
-
Owner->>Keyper: Authenticates and approves
43
-
Keyper->>GIR: Register policy (installer ↔ vboId)
44
-
end
45
-
46
-
rect rgb(255, 248, 240)
47
-
Note over Inst,GIR: Operational data access (bilateral, recurring)
48
-
Inst->>DS: Data request with installationId or componentId
49
-
opt Optional: Resolve componentId to installationId
50
-
Note over DS,GIR: Endpoint not yet available
51
-
end
52
-
DS->>GIR: POST /delegation — is policy valid for installer + vboId?
53
-
GIR-->>DS: Delegation evidence
54
-
DS-->>Inst: Authorised performance data
55
-
end
29
+
```likec4
30
+
// view: datastekker_overview
31
+
specification {
32
+
element actor
33
+
element system
34
+
}
35
+
36
+
model {
37
+
form = system 'TechniekNederland Form'
38
+
keyper = system 'Keyper'
39
+
owner = actor 'Building Owner'
40
+
gir = system 'GIR'
41
+
ds = system 'Datastekker (2BA)'
42
+
inst = actor 'Installer'
43
+
}
44
+
45
+
views {
46
+
dynamic view datastekker_overview {
47
+
title 'Datastekker – Installer Access Flow'
48
+
variant sequence
49
+
50
+
form -> keyper 'Create access request for vboId'
51
+
keyper -> owner 'Approval link by email'
52
+
owner -> keyper 'Authenticate and approve'
53
+
keyper -> gir 'Register policy (installer ↔ vboId)'
54
+
55
+
inst -> ds 'Data request with componentId'
56
+
ds -> gir 'Resolve componentId → installationId + manufacturer info [TBD]'
57
+
gir -> ds 'GIRBasisdataMessage (installationId + manufacturer info)'
58
+
ds -> gir 'Verify delegation for installer + installationId'
59
+
gir -> ds 'Delegation evidence (Permit)'
60
+
ds -> inst 'Authorised performance data'
61
+
}
62
+
}
56
63
```
57
64
58
65
### Steps
@@ -66,10 +73,11 @@ sequenceDiagram
66
73
67
74
**Operational data access (bilateral, recurring)**
68
75
69
-
5. The installer sends a data request with an installationId or componentId to Datastekker.
70
-
6.*(Optional)* Datastekker queries GIR to resolve a componentId to an installationId.
71
-
7. Datastekker checks the GIR delegation endpoint to verify the active policy.
72
-
8. Datastekker returns authorised performance data to the installer.
76
+
5. The installer sends a data request with a componentId to Datastekker.
77
+
6. Datastekker obtains a DSGO bearer token from GIR
78
+
7. Datastekker queries GIR to resolve the componentId to installationId and manufacturer info [TBD — see Open Questions].
79
+
8. Datastekker checks the GIR delegation endpoint to obtain delegationEvidence
80
+
9. Datastekker returns authorised performance data and manufacturer info to the installer.
The fields `type`, `license`, `useCase`, `attribute`, and `orchestration.flow` are instance-specific and will be determined during technical configuration of the Datastekker integration. See the [Keyper API reference ➚](https://keyper-preview.poort8.nl/scalar/v1) for full field documentation.
161
+
See the [Keyper API reference ➚](https://keyper-preview.poort8.nl/scalar/v1) for full field documentation.
154
162
155
163
### Step 2: Keyper Sends Approval Link to Building Owner *(Poort8)*
156
164
@@ -174,23 +182,44 @@ On approval, Keyper automatically registers the policy in the GIR Authorization
174
182
175
183
### Step 5: Installer Sends Data Request to Datastekker *(external)*
176
184
177
-
The data exchange between the installer and Datastekker is bilateral and does not flow through GIR. The installer calls the Datastekker API directly, using an installationId or componentId as the identifier.
185
+
The data exchange between the installer and Datastekker is bilateral and does not flow through GIR. The installer calls the Datastekker API directly, using a **componentId** (such as an SGTIN or serial number) as the identifier.
178
186
179
187
> ℹ️ The Datastekker API endpoints are outside the scope of this document. Contact 2BA for the technical specifications.
180
188
181
-
### Step 6 (optional): Datastekker Resolves componentId to installationId*(Poort8)*
189
+
### Step 6: Datastekker Obtains a DSGO Bearer Token*(Poort8)*
182
190
183
-
If the installer provides a `componentId` rather than an `installationId`, Datastekker needs to resolve it to an installationId before it can check the delegation policy.
191
+
Before querying GIR, Datastekker obtains a DSGO bearer token. See [Obtaining a DSGO Bearer Token](connect-token.md) for the full procedure:
184
192
185
-
> ℹ️ A GIR endpoint for resolving a componentId to an installationId is not yet available. This step is a placeholder pending that capability.
### Step 7: Datastekker Checks Delegation in GIR*(Poort8)*
200
+
### Step 7: Datastekker Resolves componentId to installationId and Retrieves Manufacturer Info*(Poort8)*
188
201
189
-
Datastekker calls the GIR delegation endpoint to verify that an active and valid policy exists for the installer:
202
+
Before checking the delegation policy, Datastekker must resolve the componentId to an installationId. This step also retrieves the `GIRBasisdataMessage`, which contains manufacturer information for the installation.
203
+
204
+
> **⚠️ Open point**: GIR does not currently provide a filter parameter for componentId. The mechanism for resolving a componentId to an installationId has not yet been specified. See [Open Questions](#open-questions).
205
+
206
+
Once the installationId is known, Datastekker queries GIR for the full `GIRBasisdataMessage` using the bearer token from step 6:
207
+
208
+
```http
209
+
GET https://gir-preview.poort8.nl/v1/api/GIRBasisdataMessage?installationIDValue=<INSTALLATION_ID>
210
+
Authorization: Bearer <DSGO_ACCESS_TOKEN>
211
+
Accept: application/json
212
+
```
213
+
214
+
The response includes `component[].productInformation.manufacturerName` and related fields, which Datastekker uses to include manufacturer details in its response to the installer.
215
+
216
+
### Step 8: Datastekker Checks Delegation in GIR *(Poort8)*
217
+
218
+
Using the DSGO bearer token obtained in step 6, Datastekker calls the GIR delegation endpoint to verify that an active and valid policy exists for the installer:
### Step 8: Datastekker Returns Authorised Data *(Poort8)*
228
256
229
257
GIR responds with a `delegationEvidence` object. Datastekker inspects this to confirm the policy covers the requested data elements and has not expired:
230
258
@@ -242,18 +270,18 @@ GIR responds with a `delegationEvidence` object. Datastekker inspects this to co
242
270
"maxDelegationDepth": 0,
243
271
"target": {
244
272
"environment": {
245
-
"licenses": ["[TBD — license identifier]"]
273
+
"licenses": ["[PLACEHOLDER]"]
246
274
}
247
275
},
248
276
"policies": [
249
277
{
250
278
"target": {
251
279
"resource": {
252
-
"type": "[TBD — instance-specific]",
253
-
"identifiers": ["<VBOID>"],
254
-
"attributes": ["[TBD — dataset or data-element identifier (hierarchical)]"]
280
+
"type": "<DICO:GIR-DATASTEKKER>",
281
+
"identifiers": ["<INSTALLATION_ID>"],
282
+
"attributes": ["*"]
255
283
},
256
-
"actions": ["[TBD — instance-specific, e.g. read]"],
@@ -271,6 +299,10 @@ GIR responds with a `delegationEvidence` object. Datastekker inspects this to co
271
299
272
300
If no matching policy exists or the policy has expired, GIR returns a response without a `Permit` rule. Datastekker treats any non-permit result as an authorization failure and returns an error to the installer.
273
301
302
+
### Step 9: Datastekker Returns Authorised Data *(2BA)*
303
+
304
+
If authorization succeeds, Datastekker returns the authorised performance data together with the manufacturer information retrieved from the `GIRBasisdataMessage` in step 7.
305
+
274
306
## Policy Parameters
275
307
276
308
| Parameter | Where used | Description | Status |
@@ -280,12 +312,12 @@ If no matching policy exists or the policy has expired, GIR returns a response w
280
312
|`serviceProvider`| Keyper request, delegation request | DID of Datastekker / 2BA (the data service provider) | Required |
281
313
|`resourceId` / `identifiers`| Keyper request, delegation request | Hierarchical resource identifier — a vboId (building) covers all its installations; an installationId scopes to a single installation. Consent may be granted at building level and enforced at installation level. | Required |
282
314
|`notBefore` / `expiration`| Keyper request, delegation evidence | Validity period: start and end of the granted access | Required |
283
-
|`attribute`| Keyper request, delegation request |Hierarchical data-scope identifier — a predefined dataset covers multiple data elements. Consent is granted at dataset level; enforcement can evaluate access at the level of individual data elements. |[TBD — see open questions]|
284
-
|`type`| Keyper request, delegation request | Resource type identifier used in policy matching |[TBD — instance-specific]|
285
-
|`action`| Keyper request, delegation request | Permitted action on the resource (e.g.`read`) |[TBD — instance-specific]|
286
-
|`useCase`| Keyper request | Use case identifier for policy scoping |[TBD — instance-specific]|
287
-
|`license` / `licenses`| Keyper request, delegation evidence | License identifier expressing the terms of use for the data |[TBD — see open questions]|
288
-
|`componentId`| Datastekker internal | Component identifier provided by the installer; must be resolved to an installationId before delegation check |Endpoint not yet available|
315
+
|`attribute`| Keyper request, delegation request |`*` (wildcard); use a predefined dataset identifier to restrict scope. See open questions #4 and #6 for the future attribute hierarchy. |`*`|
316
+
|`type`| Keyper request, delegation request | Resource type identifier used in policy matching |`<DICO:GIR-DATASTEKKER>`|
317
+
|`action`| Keyper request, delegation request | Permitted action on the resource |`read`|
318
+
|`useCase`| Keyper request | Use case identifier for policy scoping |`dsgo.gir-datastekker@v1`|
319
+
|`license` / `licenses`| Keyper request, delegation evidence | License identifier expressing the terms of use for the data |`[PLACEHOLDER]`|
320
+
|`componentId`| Datastekker internal | Component identifier provided by the installer; must be resolved to an installationId before the GIR query and delegation check |Open point — see Open Questions|
289
321
290
322
## Open Questions
291
323
@@ -331,6 +363,10 @@ Open points:
331
363
- How are the predefined sets mapped to ontology terms in the Heatpump Common Ontology / SAREF?
332
364
- What is the governance process for adding or updating sets (versioning, backwards compatibility)?
333
365
366
+
**7. ComponentId-to-installationId resolution**
367
+
368
+
The installer provides a componentId (such as an SGTIN or serial number). GIR does not currently support filtering `GET /v1/api/GIRBasisdataMessage` by componentId. The mechanism for resolving a componentId to an installationId — for example via a new GIR endpoint, an external registry, or a mapping table maintained by 2BA — has not yet been specified.
0 commit comments