swagger: "2.0" info: description: Find all our endpoints and test your request here version: "1.0.0" title: "#WirVsVirus Covid19 REST API Documentation" consumes: - "application/json" produces: - "application/json" basePath: "/api" paths: /source: get: operationId: "source.read_all" tags: - Source description: "Read all sources" responses: 200: description: "Successful read source list operation" schema: type: "array" items: $ref: '#/definitions/source' put: operationId: "source.add" tags: - Source description: "Add a source" parameters: - in: body name: source description: "source to add" schema: $ref: '#/definitions/source' responses: 200: description: "Successful add source operation" /cases: get: operationId: "cases.read_all" tags: - Cases description: "Read all cases" responses: 200: description: "Successful read cases list operation" schema: type: "array" items: $ref: '#/definitions/cases' put: operationId: "cases.add" tags: - Cases description: "Add a cases entry" parameters: - in: body name: cases description: "cases to add" schema: $ref: '#/definitions/casesIn' responses: 200: description: "Successful add cases operation" post: operationId: "cases.search" tags: - Cases description: "search a cases entries. Use MongoDB syntax https://docs.mongodb.com/manual/tutorial/query-documents/" parameters: - in: body name: cases description: "cases to search" schema: type: object responses: 200: description: "Successful found cases operation" schema: type: "array" items: $ref: '#/definitions/cases' /cases/many: put: operationId: "cases.addMany" tags: - manyCases description: "Add many cases at once. Arguments are a JSON Object containing a 'cases' array" parameters: - in: body name: cases description: "cases to add" schema: $ref: "#/definitions/manyCases" responses: 200: description: "Successfuly added cases" /mesures: get: operationId: "mesures.read_all" tags: - Mesures DEPRECATED description: "DEPRECATED Read all measures" responses: 200: description: "Successful read measures list operation" schema: type: "array" items: $ref: '#/definitions/measures' put: operationId: "mesures.add" tags: - Mesures DEPRECATED description: "DEPRECATED Add a measures entry" parameters: - in: body name: measures description: "measures to add" schema: $ref: '#/definitions/measures' responses: 200: description: "Successful add measures operation" post: operationId: "mesures.search" tags: - Mesures DEPRECATED description: "DEPRECATED search measures entries. Use MongoDB syntax https://docs.mongodb.com/manual/tutorial/query-documents/" parameters: - in: body name: measures description: "measures to search" schema: type: object responses: 200: description: "Successful found measures operation" schema: type: "array" items: $ref: '#/definitions/measures' /measures: get: operationId: "measures.read_all" tags: - Measures description: "Read all measures" responses: 200: description: "Successful read measures list operation" schema: type: "array" items: $ref: '#/definitions/measures' put: operationId: "measures.add" tags: - Measures description: "Add a measures entry" parameters: - in: body name: measures description: "measures to add" schema: $ref: '#/definitions/measuresIn' responses: 200: description: "Successful add measures operation" post: operationId: "measures.search" tags: - Measures description: "Search measures entries. Use MongoDB syntax https://docs.mongodb.com/manual/tutorial/query-documents/" parameters: - in: body name: measures description: "measures to search" schema: type: object responses: 200: description: "Successful found measures operation" schema: type: "array" items: $ref: '#/definitions/measures' /action: get: operationId: "action.read_all" tags: - Action description: "Read all actions" responses: 200: description: "Successful read action list operation" schema: type: "array" items: $ref: '#/definitions/action' put: operationId: "action.add" tags: - Action description: "Add a action" parameters: - in: body name: action description: "action to add" schema: $ref: '#/definitions/action' responses: 200: description: "Successful add action operation" /population: get: operationId: "population.read_all" tags: - Population description: "Read all population" responses: 200: description: "Successful read population list operation" schema: type: "array" items: $ref: '#/definitions/population' post: operationId: "population.search" tags: - Population description: "Search population entries. Use MongoDB syntax https://docs.mongodb.com/manual/tutorial/query-documents/" parameters: - in: body name: population description: "population to search" schema: type: object responses: 200: description: "Successful found population operation" schema: type: "array" items: $ref: '#/definitions/population' definitions: source: properties: _id: type: "string" name: type: "string" url: type: "string" cases: properties: _id: type: "string" date: type: "string" adm: type: "array" items: type: "string" ageRange: $ref: '#/definitions/ageRange' sex: type: "string" infected: type: "integer" dead: type: "integer" recovered: type: "integer" tested: type: "integer" source: type: "string" sourceFull: $ref: '#/definitions/source' casesIn: properties: date: type: "string" adm: type: "array" items: type: "string" ageRange: $ref: '#/definitions/ageRange' sex: type: "string" infected: type: "integer" dead: type: "integer" recovered: type: "integer" tested: type: "integer" source: type: "string" manyCases: properties: cases: type: "array" items: $ref: "#/definitions/casesIn" ageRange: properties: lower: type: "integer" upper: type: "integer" mesures: properties: _id: type: "string" date: type: "string" adm: type: "array" items: type: "string" border_control: type: "boolean" home_office: type: "boolean" closure_leisureandbars: type: "boolean" lockdown: type: "boolean" schools_closed: type: "boolean" traveller_quarantine: type: "boolean" primary_residence: type: "boolean" test_limitations: type: "boolean" misc: type: "string" source: type: "string" actions: type: "array" items: $ref: '#/definitions/action' measures: properties: _id: type: "string" date: type: "string" adm: type: "array" items: type: "string" border_control: type: "boolean" home_office: type: "boolean" closure_leisureandbars: type: "boolean" lockdown: type: "boolean" schools_closed: type: "boolean" traveller_quarantine: type: "boolean" primary_residence: type: "boolean" test_limitations: type: "boolean" misc: type: "string" source: type: "string" actions: type: "array" items: $ref: '#/definitions/action' sourceFull: $ref: '#/definitions/source' measuresIn: properties: date: type: "string" adm: type: "array" items: type: "string" border_control: type: "boolean" home_office: type: "boolean" closure_leisureandbars: type: "boolean" lockdown: type: "boolean" schools_closed: type: "boolean" traveller_quarantine: type: "boolean" primary_residence: type: "boolean" test_limitations: type: "boolean" misc: type: "string" source: type: "string" action: properties: _id: type: "string" name: type: "string" population: properties: _id: type: "string" LocID: type: "string" adm: type: "array" items: type: "string" VarID: type: "string" Variant: type: "string" Time: type: "string" MidPeriod: type: "number" ageRange: $ref: '#/definitions/ageRange' PopMale: type: "integer" PopFemale: type: "integer" PopTotal: type: "integer" PopDensity: type: "integer" source: $ref: '#/definitions/source'