...
All points data will be stored in the points
table in discreet format.
Service Endpoints
...
POST /case/points
The SafePlaces web client will utilize this endpoint to retrieve all endpoints points associated with a case. The points data associated with the case will be read from the existing private database, translated in memory to duration format, and returned to the web client.
...
Code Block | ||
---|---|---|
| ||
{
"caseId": 1
} |
Sample Response Payload
Code Block | ||
---|---|---|
| ||
{
"concernPoints": [
{
"discreetPointIds": [232],
"longitude": 14.91328448,
"latitude": 41.24060321,
"time": "2020-05-30T18:25:43.511Z",
"duration": 5
},
{
"discreetPointIds": [233, 234, 235, 236],
"longitude": 15.21328448,
"latitude": 42.44060321,
"time": "2020-06-30T18:25:43.511Z",
"duration": 20
}
]
} |
POST /cases/points
The SafePlaces web client will utilize this endpoint to retrieve all points associated with the cases provided. The points data associated with the cases will be read from the existing private database, translated in memory to duration format, and returned to the web client.
Sample Request Payload
Code Block | ||
---|---|---|
| ||
{
"caseIds": [1, 2, 3]
} |
Sample Response Payload
Code Block | ||
---|---|---|
| ||
{
"concernPoints": [
{
"discreetPointIds": [232],
"longitude": 14.91328448,
"latitude": 41.24060321,
"time": "2020-05-30T18:25:43.511Z",
"duration": 5
},
{
"discreetPointIds": [233, 234, 235, 236],
"longitude": 15.21328448,
"latitude": 42.44060321,
"time": "2020-06-30T18:25:43.511Z",
"duration": 20
}
]
} |
POST /case/points/ingest
The SafePlaces web application will utilize this endpoint to retrieve points uploaded by a user from the SafePaths mobile app within the context of an ongoing contact tracing interview. The SafePlaces web application will provide the API with an access code and case ID. The API will query the public ingest database for points of concern (in discreet format) that are associated with the access code. The points of concern will then be associated with the case having an ID that matches the caseID
request param and persisted (in discreet format) in the private database. The points will be translated to duration format in memory and returned to the SafePlaces web application in the response payload.
Sample Request Payload
Code Block |
---|
{
"accessCode": "123456",
"caseId": 12
} |
Sample Response Payload
Code Block | ||
---|---|---|
| ||
{ "concernPoints": [ { "discreetPointIds": [232], "longitude": 14.91328448, "latitude": 41.24060321, "time": "2020-05-30T18:25:43.511Z", "duration": 5 }, { "discreetPointIds": [233, 234, 235, 236], "longitude": 15.21328448, "latitude": 42.44060321, "time": "2020-06-30T18:25:43.511Z", "duration": 20 } ] } |
...
Code Block | ||
---|---|---|
| ||
{ "concernPoint": { "discreetPointIds": [ 23, 24, 25, 26 ], "longitude": 14.91328448, "latitude": 41.24060321, "time": "2020-05-30T18:25:43.511Z", "duration": 5 } } |
PATCH /case/point
The SafePlaces web client will call this endpoint when attempting to update an existing concern point. Concern points with ids matching the discreetPointIds
in the request payload will be deleted from the private database. The rest of the data in the payload will be translated from duration format to discreet format and saved to the private database. The newly created points data will be represented in duration format in the response payload.
...