API Pattern: Circuit Breaker
- Circuit Breaker Request:
POST https://<FQDN>/circuit-breaker/exposure-notification/request
- Circuit Breaker Resolution:
GET https://<FQDN>/circuit-breaker/exposure-notification/resolution/<approval_token>
- FQDN: Hostname can be different per API
- Authorization required and signatures provided - see API security
- Request payload content-type:
application/json
- Response payload content-type:
application/json
The circuit breaker is polled following an exposure notification to get a decision on whether to proceed to notify the user of the contact risk.
POST https://<FQDN>/circuit-breaker/exposure-notification/request
{
"matchedKeyCount" : 2,
"daysSinceLastExposure": 3,
"maximumRiskScore" : 150.0,
"riskCalculationVersion": 2
}
Notes: riskCalculationVersion
should be an optional field and default to 1
if not sent by a client. (Allows supporting older clients which do not send that field)
Currently there are two risk calculation versions with the following mapping:
Risk Calculation V1
- Apps or devices using EN API v1.5/1 (App version < 3.9, iOS devices < iOS 13.7)
Risk Calculation V2
- Apps or devices using EN API v1.6/2 or higher (App version >= 3.9, iOS devices >= iOS 13.7)
{
"approvalToken": "QkFDQzlBREUtN0ZBMC00RTFELUE3NUMtRTZBMUFGNkMyRjNECg",
"approval": "yes"|"no"|"pending"
}
GET https://<FQDN>/circuit-breaker/exposure-notification/resolution/<approval_token>
{
"approval": "yes"|"no"|"pending"
}