Provides REST API to data collected in csv files. The sources are stats, regions, patients, hospitals, hospitals-list, municipalities-list, municipalities, health-centers, owid, monthly_deaths_slovenia, lab-tests, daily-deaths-slovenia, age-daily-deaths-slovenia, summary, sewage, sewage-cases, sewage-genomes, schools, school-status, vaccinations and episari-weekly.
Only GET method is supported, most of endpoints support parameters from
and to
(both dates).
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.
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
opsi-cases.csv
to API asapi/opsi-cases
endpoint
- Updates .NET to 8.0
- Updates all NuGet libraries
- Fixes Sewage Cases by changing flow type from int to float
- Use NIJZ OPSI deaths for Deceased card in
api/summary
endpoint
- Adds
sewage-cases.csv
to API asapi/sewage-cases
endpoint - Adds
sewage-genome.csv
to API asapi/sewage-genomes
endpoint
- Updates to .NET 7
- Removes Swagger
- Updates libraries
- Update for changes in EPISARI vacc
- Schema version 48
- Patients: add red-zone and leadingCovid
- Schema version 47
- Summary: add daily new cases to CasesAvg7Days
- Add support for 0-11 age range in vaccinations
- Adds
episari-nijz-weekly.csv
to API asapi/episari-weekly
endpoint - Schema version 46
- Vaccination: added 3rd dose
- Schema version 45
- stats-weekly: added vaccinated icu cases
- stats-weekly: added vaccinated hospitalized cases
- stats: added vaccinated confirmed cases
- Population update to SURS 2021/H1
- Vaccination info card: only show fully vaccinated
- Active100k info card: 14-day incidence
- Vaccinations: add used by manufacturer
- Vaccinations: add administered by age groups
- Sewage: fix parsing float numbers with exponent
- Returns only results with absences and/or regimes when filtering school-status by date
- Makes date parsing tolerant to included time
- Adds
vaccination.csv
to API as/api/vaccinations
endpoint - Schema version 41
- Adds from/to filter to
api/school-status
endpoint - Changes school property to string in
api/school-status
endpoint
- Adds
api/school-status
endpoint. It combinesschools-absences.csv
andschools-regimes.csv
data into single source. Filtering on schools is available through argument id in URL. - Schema version 40
- Adds today data for vaccination.administered
- Schema version 39
- Adds
schools-cases.csv
to API as/api/schools
endpoint - Schema version 38
- Adds deceased.todate and deceased to stats endpoint
- Schema version 37
- Reduces logging
- Schema version 36
- Adds
sewage.csv
to API as/api/sewage
endpoint
- Schema version 35
- Add vaccination.administered2nd vaccination.used to
/api/stats
- Extend vaccinationSummary with 2nd dose in
/api/summary
- Schema version 34
- Update Slovenia population to SURS H2/2020
- Add healthcare male/female to
/api/stats-weekly
- Schema version 33
- Add patients.niv to
/api/patients
- Schema version 32
- Add vaccination.delivered to
/api/stats
- Schema version 31
- Removed
api/deceased-regions
/api/region-cases
endpoint not usesregion-cases.csv
as source/api/municipalities
endpoint not usesmunicipalities-cases.csv
as source
- stats: remove obsolete recovered field
- weekly-stats: remove vaccination field (now only in daily)
- municipalities: switch to municipality-cases.csv
- regions: switch to municipality-confirmed.csv (obsolete)
- deceased-regions: switch to municipality-deceased.csv (obsolete)
- Schema version 30
- Switch VaccinationSummary to daily numbers
- Updates stats with vaccination.administered
- Schema version 29
- Add simple VaccinationSummary to summary
- Updates stats-weekly with vaccination.administered
- Schema version 28
- Replaces
age_daily_deaths_slovenia.csv
source withdaily_deaths_slovenia_by_age.csv
- Preloads cache before starting API
- Summary: add TestsTodayHAT
- Schema version 27
- Updates stats with deceased RH occupant
- Schema version 26
- Adds summary endpoint as /api/summary
- Schema version 25
- Updates stats-weekly with rhoccupant (rh-occupant) and loc (locations)
- Schema version 24
- 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