Data Adapter
The Data Adapter is a critical component of the HaaS environment as it is what HaaS uses to collect Consumer Data. A HaaS space can only have one Data Adapter across all of its brands (it is sent an x-haas-realm header for the adapter to identify which brand is requesting the data).
A core feature of HaaS is that it does not store any Consumer Data other than the Principal, User and Account IDs for the purposes of maintaining its Consent Store. It relies on the Data Adapter every time a piece of Consumer Data is requested by the CDR.
Global Endpoint Headersβ
This section outlines the endpoint flags which are applicable across most/all of the adapter endpoints. Please refer to the Get Endpoint Meta documentation for which endpoints support which flags.
Provide userId parameterβ
This behaviour is only enabled if the SUPPORTS_USERID_QUERY_PARAM flag is included in the relevant endpoint definitions obtained from the Get Endpoint metadata (getEndpointMeta) operation.
To facilitate pass through context this flag introduces the provision of the userId attribute as a query parameter in all supported calls.
Exampleβ
GET /energy/8b2e5c1f-2cf2-43d2-8e50-004893abeb05/account?userId=b5d1da97-a796-4e8f-9221-cc3cffafb567&accountIds=5bbdb5d20e474ee2f10ecd08deca1b16c89f0eaa94e69167c2475b417db7ec58
x-fapi-interaction-id : 6ba7b814-9dad-11d1-80b4-00c04fd430c8
x-haas-v: V0
HTTP 200 OK
Content-Length: 1234
{
"version": "V0",
"data": [
{
"accountId": "5bbdb5d20e474ee2f10ecd08deca1b16c89f0eaa94e69167c2475b417db7ec58",
"accountNumber": "12981837",
"...": "..."
}
]
}
Supply Performance Tierβ
This behaviour is only enabled if the SUPPORTS_TIER_HEADER flag is included in the relevant endpoint definitions obtained from the Get Endpoint metadata (getEndpointMeta) operation.
Enabling this flag allows for the Data Adapter to gain visibility of the performance tier of the source request. When enabled the HaaS environment will provide a header of x-haas-performance-tier indicating what tier the source request belongs to. The tiers supported at this stage are:
UNAUTHENTICATED: Unauthenticated request according to the Data Standards.HIGH_PRIORITY: High Priority request according to the Data Standards.LOW_PRIORITY: Low Priority request according to the Data Standards.UNATTENDED: Unattended request according to the Data Standards.LARGE_PAYLOAD: Large Payload request according to the Data Standards.SECONDARY_REQUEST: Request related to a Secondary Data Holder request according to the Data Standards.LARGE_SECONDARY_REQUEST: Request related to a Large Secondary Data Holder request according to the Data Standards.INTERNAL: Request related to internal HaaS activity, this tier does not contribute to the Metrics reported to the Regulator. Please note this is not currently used.
Exampleβ
Demonstrating a Customer Present call to Get Energy Accounts.
GET /energy/8b2e5c1f-2cf2-43d2-8e50-004893abeb05/account?accountIds=5bbdb5d20e474ee2f10ecd08deca1b16c89f0eaa94e69167c2475b417db7ec58
x-haas-v: V0
x-fapi-interaction-id : 6ba7b814-9dad-11d1-80b4-00c04fd430c8
x-haas-performance-tier: HIGH_PRIORITY
`` HTTP 200 OK Content-Length: 1234
```json
{
"version": "V0",
"data": [
{
"accountId": "5bbdb5d20e474ee2f10ecd08deca1b16c89f0eaa94e69167c2475b417db7ec58",
"accountNumber": "12981837",
"...": "..."
}
]
}
Supply Consumer Headersβ
This behaviour is only enabled if the SUPPORTS_CONSUMER_HEADERS flag is included in the relevant endpoint definitions obtained from the Get Endpoint metadata (getEndpointMeta) operation.
Enabling this flag allows for the Data Adapter to receive the Data Standards Consumer headers containing:
x-fapi-customer-ip: The customer's original IP address if the customer is currently logged in to the Data Recipient Software Product.x-fapi-auth-date: The time when the customer last logged in to the Data Recipient Software Productx-cds-client-headers: The customer's original standard http headers Base64 encoded, including the original User Agent header.
Not all requests the adapter receives will have any/all of these values available for distribution. These headers MUST be treated as optional.
These headers are passed through from the Data Recipient and therefore have limited trust. Be very careful to treat them for what they are, third party supplied headers apparently representing the Consumer making the request.
Exampleβ
Demonstrating a Customer Present call to Get Energy Accounts.
GET /energy/8b2e5c1f-2cf2-43d2-8e50-004893abeb05/account?accountIds=5bbdb5d20e474ee2f10ecd08deca1b16c89f0eaa94e69167c2475b417db7ec58
x-haas-v: V0
x-fapi-interaction-id : 6ba7b814-9dad-11d1-80b4-00c04fd430c8
x-fapi-auth-date : Thu, 16 Jan 2020 16:50:15 GMT
x-fapi-customer-ip-address : 2001:0db8:85a3:0000:0000:8a2e:0370:7334
x-cds-client-headers : TW96aWxsYS81LjAgKFgxMTsgTGludXggeDg2XzY0KSBBcHBsZVdlYktpdC81MzcuMzYgKEtIVE1MLCBsaWtlIEdlY2tvKSBDaHJvbWUvNzkuMC4zOTQ1Ljg4IFNhZmFyaS81MzcuMzY=
HTTP 200 OK
Content-Length: 1234
{
"version": "V0",
"data": [
{
"accountId": "5bbdb5d20e474ee2f10ecd08deca1b16c89f0eaa94e69167c2475b417db7ec58",
"accountNumber": "12981837",
"...": "..."
}
]
}
Handy Linksβ
- See Security Profile information here.
- See the Design Principles for the Data Adapter.
- See the Minimum Requirements for each Data Adapter implementation.