Skip to content
This repository has been archived by the owner on Jun 23, 2023. It is now read-only.

Latest commit

 

History

History
62 lines (45 loc) · 1.85 KB

exposure-notification-circuit-breaker.md

File metadata and controls

62 lines (45 loc) · 1.85 KB

Exposure Notification Circuit Breaker

API Pattern: Circuit Breaker

HTTP Request and Response

  • Circuit Breaker Request: POST https://<FQDN>/circuit-breaker/exposure-notification/request
  • Circuit Breaker Resolution: GET https://<FQDN>/circuit-breaker/exposure-notification/resolution/<approval_token>

Parameters

  • 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

Scenario

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.

Initial request

POST https://<FQDN>/circuit-breaker/exposure-notification/request

Request Payload Example

{
  "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)

Risk calculation version

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)

Response Payload Example

{
  "approvalToken": "QkFDQzlBREUtN0ZBMC00RTFELUE3NUMtRTZBMUFGNkMyRjNECg",
  "approval": "yes"|"no"|"pending"
}

Poll for resolution status

GET https://<FQDN>/circuit-breaker/exposure-notification/resolution/<approval_token>

Response Payload Example

{
  "approval": "yes"|"no"|"pending"
}