swagger: "2.0" info: description: "This API provides a way to access all public data published on reporting.sbb.ch" version: "2.0.0" title: "SBB Reporting Data API" termsOfService: "" contact: email: "support.sv4@intersim.ch" basePath: "/api/v1" tags: - name: "datapoint" description: "All data concerning the selected data point" schemes: - "https" paths: /swagger: get: summary: "Get Swagger definition" description: "Returns the Swagger definition" produces: - "application/json" responses: 200: description: "successful operation" /table/{identifier}/: get: summary: "Find data from table by identifier hash" description: "returns data for identifier" produces: - "application/json" parameters: - name: "identifier" in: "path" description: "Identifier for table row. Will always fetch the data from the latest uploaded file (the same hash can occur multiple times)" required: true type: "string" pattern: "^[a-f0-9]{32}$" - name: "years" in: "query" description: "Years as an array. E.g. '?years[]=2019&years=2020'. Leaving this param empty will return all existing years." required: true type: "array" items: type: "integer" format: "int64" - name: "language" in: "query" description: "Iso key of desired language (de, fr, it, en). If not set, fallback will be 'de'" required: false type: "string" pattern: "^[a-zA-Z]$" - name: "newest" in: "query" description: "Only get data for newest year (overrides 'years' parameter)" required: false type: "boolean" - name: "widgetdata" in: "query" description: "Get additional data to be used in graph widgets" required: false type: "boolean" responses: 200: description: "successful operation" schema: $ref: "#/definitions/TableData" 404: description: "No data found" definitions: TableData: type: "object" required: - identifier - language - title - valueSets properties: identifier: type: "string" pattern: "^[a-f0-9]{32}$" language: type: "string" title: type: "string" valueSets: type: "array" items: $ref: "#/definitions/ValueSet" functionData: $ref: "#/definitions/FunctionData" fallbackImgUrl: type: "string" rewriteUrl: type: "string" ValueSet: type: "object" properties: year: type: "integer" format: "int64" unit: type: "string" valueParsed: type: "string" valueRaw: type: "number" format: "float" FunctionData: type: "object" properties: typeId: type: "integer" format: "int64" type: type: "string" minX: type: "integer" format: "int64" maxX: type: "integer" format: "int64" minY: type: "integer" format: "int64" maxY: type: "integer" format: "int64" stepSize: type: "integer" format: "int64"