Provides REST API to data collected in csv files. The sources are stats, regions, patients, hospitals, hospitals-list, municipalities-list, deceased-regions, municipalities, health-centers, owid, monthly_deaths_slovenia, lab-tests, daily-deaths-slovenia and age-daily-deaths-slovenia. Only GET method is supported, no parameters are available. If necessary filtering parameters will be added eventually.
A running instance is available at https://api.sledilnik.org/api/ endpoint.
Current Docker container for this project is available at covid19sledilnik/data-api-server. (Docker container has been moved on 21.9.2020)
Response compression is supported, Etag/If-None-Match as well.
Swagger endpoint is at https://api.sledilnik.org/swagger.
In case of failures a notification is set to slack channel #alert through Data API bot defined by a secret (see sample docker-compose file below).
- Adds age_daily_deaths_slovenia.csv to API as /api/age-daily-deaths-slovenia endpoint
- Schema version is 23
- Adds daily_deaths_slovenia.csv to API as /api/daily-deaths-slovenia endpoint
- Schema version is 22
- Fixes bug in lab-tests
- Updates NSwag
- Adds lab_tests.csv to API as /api/lab-tests endpoint
- Schema version is 21
- Adds monthly_deaths_slovenia.csv to API as /api/monthly_deaths_slovenia endpoint
- Schema version is 20
- Adds columns parameter to owid to allow selection of arbitrary columns. Columns isoCode and date are always present regardles of columns parameter.
- Updates to .Net 5.0
- Upgrades classes to records where applicable and switches to expressions
- Adds owid data through owid endpoint. Supports application/json and text/csv outputs. CSV output uses InvariantCulture formatting. Filter arguments are from, to and countries - all are optional. Sample: api/owid?from=2020-06-02&to=2020-06-30&countries=BEL,SLV
- Weekly: added in week.investigated and week.healthcare
- Patients, Hospitals: added support for psychiatric hospitals (care units only)
- Bug fix: toDate was not exposed properly in patients
- Patients: add support for care hospitals
- Hospital ID fix (Bolnišnica Sežana)
- Add all hospitals
- Periodic cache refresh in background instead of attempt to refresh on every client request
- Handle weak ETag-s (free cloudflare supports only weak etags)
- Add new hospital (SB Šempeter - Nova Gorica)
- Add CSV format
- Add ResponseCache (performance imporovement)
- Add new hospital (SB Trbovlje)
- Add new hospital (SB Ptuj)
- Hospitals: added support for care unit capacity
- Remove hospital (SB NG)
- Adds new hospitals (SB SG, SB NG)
- Added stats-weekly
- Adds new hospitals (SB Jesenice)
- Adds new hospitals (SB MS)
- Adds new hospitals
- Moves docker image to covid19sledilnik/data-api-server
- Updates readme with new URLs
- Adds Etag header to exposed headers
- Adds filtering by date where applicable
- Add ActiveCases to municipalities endpoint
- Updates SchemaVersion to 19
- Fixes Timestamp in headers
- Fixes bug in patients mixing today and toDate in deceased in hospitals
- Modifies patient's deceased schema
- Updates SchemaVersion to 18
- Adds health-centers endpoint
- Updates SchemaVersion to 17
- Adds municipalities endpoint
- Adds Timestamp header
- Removes unused regions-pivot endpoint
- Updates SchemaVersion to 16
- Adds cases.recovered.todate and rename cases.active (was .todate)
- Updates SchemaVersion to 15
- Adds tests.regular and tests.ns-apr20
- Updates SchemaVersion to 14
- Adds state.deceased.hospital.icu to patients
- Makes requests to source fail faster #29
- Switches to new URL for CSV retrieval #30
- Adds api/decased_regions
- Adds state..icu.todate and state..critical.todate to patients
- Updates SchemaVersion to 13
- Adds deceased.*.todate to stats
- Updates SchemaVersion to 12
- Adds cases.unclassified.confirmed.todate to stats
- Changes behavior in case of failure against CSV source - data is returned from cache, slack notification is sent
- Updates SchemaVersion to 11
- Requests to CSV source are now cached for a minute
- Refactors communicator caching
- Adds retirement-homes and retirement-homes-list endpoints
- Updates SchemaVersion to 10
- Adds prometheus metrics available at /metrics endpoint
- Adds regions-pivot, a pivoted view on regions
- Updates SchemaVersion to 9
- Removes *.needs_o2 and state.in_care from patients
- Updates Schema version to 8
- Adds municipalities-list endpoint
- Updates SchemaVersion to 7
- Adds cases.confirmed, cases.confirmed.todate, cases.closed.todate and cases.active.todate to stats
- Removes legacy buckets 0-15, 16-29, 30-49, 50-59 and 60+
- Updates SchemaVersion to 6
- Removes 14h data from stats
- Removes facilities and sources from stats
- Updates SchemaVersion to 5
- Adds hospitals and hospitals-list endpoints
- Updates SchemaVersion to 4
Run build.ps1 -Target BuildImage
Container doesn't store any files and exposed HTTP through port 5000. It also runs as a non-root user with id 9000.
Here is sample docker-compose.yml file
version: '2'
services:
covid19:
restart: always
image: mihamarkic/slo-covid19-server:latest
mem_limit: 400m
ports:
- "5000:5000"
environment:
- SloCovidServer_Slack_Secret=XXX
Repository maintainer: Miha Markič, Righthand