{ "openapi": "3.0.0", "info": { "version": "v1", "title": "CWA-Server Distribution API", "license": { "name": "Apache 2.0" } }, "paths": { "/version": { "get": { "summary": "Get API versions", "tags": [ "Meta" ], "responses": { "200": { "description": "All implemented API versions", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/Version" }, "example": [ "v1", "v2", "v3" ] } } } } } } }, "/version/{version}": { "get": { "summary": "Get API specification for specific API version.", "tags": [ "Meta" ], "parameters": [ { "name": "version", "in": "path", "description": "API version", "required": true, "schema": { "$ref": "#/components/schemas/Version" } } ], "responses": { "200": { "description": "OpenAPI 3.0 specification", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/OpenAPI" }, "example": { "openapi": "3.0.0", "info": { "version": "v1", "title": "CWA-Server Distribution API", "license": { "name": "Apache 2.0" } }, "paths": { "...": "..." }, "components": { "...": "..." } } } } } } } } }, "/version/{version}/diagnosis-keys/country": { "get": { "summary": "Get the origin country and the common package for which diagnosis keys are available. The common package contains all diagnosis keys from the origin country as well as the keys from the European Federation Gateway Service (EFGS).", "tags": [ "Diagnosis keys" ], "parameters": [ { "name": "version", "in": "path", "description": "API version", "required": true, "schema": { "$ref": "#/components/schemas/Version" } } ], "responses": { "200": { "description": "Country and common package for which diagnosis keys are available", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/Country" }, "example": [ "DE", "EUR" ] } } } } } } }, "/version/{version}/diagnosis-keys/country/{country}/date": { "get": { "summary": "Get all dates for which diagnosis keys are available.", "description": "Gives a list of all dates for which diagnosis keys are available for a specific country or all supported countries. For Germany, this would return a list of dates for the past 14 days (if all of them contain diagnosis keys).", "tags": [ "Diagnosis keys" ], "parameters": [ { "name": "version", "in": "path", "description": "API version", "required": true, "schema": { "$ref": "#/components/schemas/Version" } }, { "name": "country", "in": "path", "description": "Country", "required": true, "schema": { "$ref": "#/components/schemas/Country" } } ], "responses": { "200": { "description": "All dates for which diagnosis keys are available", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/Date" }, "example": [ "2020-05-01", "2020-04-30", "2020-04-29", "2020-04-28" ] } } } } } } }, "/version/{version}/diagnosis-keys/country/{country}/date/{date}": { "get": { "summary": "Get all diagnosis keys for a specific date.", "description": "Gives all diagnosis keys for a specific country or all supported countries on a specific date. If there are no diagnosis keys available for that date (but the date is still within the 14-day window), a signed payload with an empty list of diagnosis keys will be returned. If the date is outside of the 14-day window, or in the future, an HTTP error code will be returned.", "tags": [ "Diagnosis keys" ], "parameters": [ { "name": "version", "in": "path", "description": "API version", "required": true, "schema": { "$ref": "#/components/schemas/Version" } }, { "name": "country", "in": "path", "description": "Country", "required": true, "schema": { "$ref": "#/components/schemas/Country" } }, { "name": "date", "in": "path", "description": "Date", "required": true, "schema": { "$ref": "#/components/schemas/Date" } } ], "responses": { "200": { "description": "All diagnosis keys for a specific date.", "content": { "application/zip": { "schema": { "$ref": "#/components/schemas/app.coronawarn.server.common.protocols.external.TemporaryExposureKeyExport" }, "example": "" } } } } } }, "/version/{version}/diagnosis-keys/country/{country}/date/{date}/hour": { "get": { "summary": "Get all hours of a specific date for which diagnosis keys are available.", "description": "Gives a list of all hours (0-23) of a specific date for which diagnosis keys are available for a specific country or all supported countries. For the current date, a list containing the respective numbers/hours for which data is available (e.g. 0-17) will be returned. If the date is outside of the 14-day window, or in the future, an HTTP error code will be returned..", "tags": [ "Diagnosis keys" ], "parameters": [ { "name": "version", "in": "path", "description": "API version", "required": true, "schema": { "$ref": "#/components/schemas/Version" } }, { "name": "country", "in": "path", "description": "Country", "required": true, "schema": { "$ref": "#/components/schemas/Country" } }, { "name": "date", "in": "path", "description": "Date", "required": true, "schema": { "$ref": "#/components/schemas/Date" } } ], "responses": { "200": { "description": "All hours (0~23) of that date for which diagnosis keys are available", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Hour" }, "example": [ 6, 7, 8, 9, 14, 15, 16, 22 ] } } } } } }, "/version/{version}/diagnosis-keys/country/{country}/date/{date}/hour/{hour}": { "get": { "summary": "Get all diagnosis keys for a specific hour on a specific date.", "description": "Gives all diagnosis keys for a specific country or all supported countries on a specific date within a specific hour. If there are no diagnosis keys available for the hour (but the date is still within the 14-day window), a signed payload with an empty list of diagnosis keys will be returned. If the date is outside of the 14-day window, or in the future, or an hour > 23 was requested, an HTTP error code will be returned..", "tags": [ "Diagnosis keys" ], "parameters": [ { "name": "version", "in": "path", "description": "API version", "required": true, "schema": { "$ref": "#/components/schemas/Version" } }, { "name": "country", "in": "path", "description": "Country", "required": true, "schema": { "$ref": "#/components/schemas/Country" } }, { "name": "date", "in": "path", "description": "Date", "required": true, "schema": { "$ref": "#/components/schemas/Date" } }, { "name": "hour", "in": "path", "description": "Hour", "required": true, "schema": { "$ref": "#/components/schemas/Hour" } } ], "responses": { "200": { "description": "All diagnosis keys for that hour.", "content": { "application/zip": { "schema": { "$ref": "#/components/schemas/app.coronawarn.server.common.protocols.external.TemporaryExposureKeyExport" }, "example": "" } } } } } }, "/version/{version}/configuration/country/{country}/app_config": { "get": { "summary": "Get application configuration for the origin country.", "description": "Gives application configuration for a specific country, which includes:\n- Minimum risk score\n- Risk score classification\n- Risk score parameters\n- Attenuation duration\n- Application version configuration\n- Supported countries", "tags": [ "Application configuration" ], "parameters": [ { "name": "version", "in": "path", "description": "API version", "required": true, "schema": { "$ref": "#/components/schemas/Version" } }, { "name": "country", "in": "path", "description": "Country", "required": true, "schema": { "$ref": "#/components/schemas/Country" } } ], "responses": { "200": { "description": "Application configuration for a the origin country.", "content": { "application/zip": { "schema": { "$ref": "#/components/schemas/app.coronawarn.server.common.protocols.external.TemporaryExposureKeyExport" }, "example": "" } } } } } }, "/version/{version}/configuration/app_config": { "get": { "summary": "Get application configuration.", "description": "Gives application configuration, which includes:\n- Minimum risk score\n- Risk score classification\n- Risk score parameters\n- Attenuation duration\n- Application version configuration\n- Supported countries", "tags": [ "Application configuration" ], "parameters": [ { "name": "version", "in": "path", "description": "API version", "required": true, "schema": { "$ref": "#/components/schemas/Version" } } ], "responses": { "200": { "description": "Application configuration.", "content": { "application/zip": { "schema": { "$ref": "#/components/schemas/app.coronawarn.server.common.protocols.external.TemporaryExposureKeyExport" }, "example": "" } } } } } } }, "components": { "schemas": { "Version": { "type": "string", "description": "A string of form 'v[\\d+]'", "example": "v1" }, "OpenAPI": { "description": "OpenAPI 3.0 specification", "properties": { "openapi": { "type": "string" }, "info": { "type": "object" }, "paths": { "type": "object" }, "components": { "type": "object" } }, "example": { "openapi": "3.0.0", "info": { "version": "v1", "title": "CWA-Server Distribution API", "license": { "name": "Apache 2.0" } }, "paths": { "...": "..." }, "components": { "...": "..." } } }, "Country": { "type": "string", "description": "An ISO 3166-1 alpha-2 country key or a common package which gathers all supported european countries (EUR)", "example": "DE" }, "Language": { "type": "string", "description": "An IETF BCP 47 language tag.", "example": "de-DE" }, "Date": { "type": "string", "description": "An ISO-8601 date descriptor. Server time zone is UTC.", "example": "2020-05-01" }, "Hour": { "type": "string", "description": "An integer number between 0 and 23. Server time zone is UTC.", "example": "17" }, "app.coronawarn.server.common.protocols.external.TemporaryExposureKeyExport": { "type": "string", "format": "binary" } } } }