{ "swagger": "2.0", "info": { "title": "Airly", "description": "Airly provides accurate, hyper-local data about air pollution in your community. This is the first step towards understanding the health risks and making improvements.", "version": "1.0", "contact": { "name": "Tomasz Poszytek", "url": "https://aka.ms/poszytek", "email": "tomasz@poszytek.eu" } }, "x-ms-connector-metadata": [ { "propertyName": "Website", "propertyValue": "https://airly.org/" }, { "propertyName": "Privacy policy", "propertyValue": "https://airly.org/en/terms-conditions/" }, { "propertyName": "Categories", "propertyValue": "Internet of Things;Lifestyle and Entertainment" } ], "host": "airapi.airly.eu", "basePath": "/v2", "schemes": [ "https" ], "consumes": ["application/json"], "produces": ["application/json"], "paths": { "/installations/{InstallationID}": { "get": { "responses": { "200": { "description": "200", "schema": { "type": "array", "items": { "description": "List of nearest installations.", "type": "object", "properties": { "id": { "type": "integer", "format": "int32", "description": "Unique installation identifier. Having InstallationId you can query measurements from particular installation.", "title": "Id" }, "location": { "type": "object", "properties": { "latitude": { "type": "number", "format": "float", "description": "Installation coordinates - latitude. Exact sensor location on map.", "title": "Latitude" }, "longitude": { "type": "number", "format": "float", "description": "Installation coordinates - longitude. Exact sensor location on map.", "title": "Longitude" } }, "description": "Location details." }, "locationId": { "type": "integer", "format": "int32", "description": "Unique location identifier.", "title": "Location Id" }, "address": { "type": "object", "properties": { "country": { "type": "string", "description": "Installation country. Attribute is optional, may be empty or null.", "title": "Country" }, "city": { "type": "string", "description": "Installation city. Attribute is optional, may be empty or null.", "title": "City" }, "street": { "type": "string", "description": "Installation street. Attribute is optional, may be empty or null.", "title": "Street" }, "number": { "type": "string", "description": "Installation street number. Attribute is optional, may be empty or null.", "title": "Number" }, "displayAddress1": { "type": "string", "description": "Extra field describing address, e.g. school name or number. Optional field.", "title": "Display address 1" }, "displayAddress2": { "type": "string", "description": "Extra field describing address, e.g. school name or number. Optional field.", "title": "Display address 2" } }, "description": "Address details." }, "elevation": { "type": "number", "format": "float", "description": "Altitude at which device is installed; meters above mean sea level (mamsl).", "title": "Elevation" }, "airly": { "type": "boolean", "description": "Flag indicating whether this installation is an Airly device or not; e.g. GIOŚ stations are flagged as false.", "title": "Airly", "enum": [ true, false ] }, "sponsor": { "type": "object", "properties": { "id": { "type": "integer", "format": "int32", "description": "Sponsor identifier.", "title": "Id" }, "name": { "type": "string", "description": "Name of this installation's sponsor.", "title": "Name" }, "description": { "type": "string", "description": "Additional description of this installation's sponsor.", "title": "Description" }, "logo": { "type": "string", "description": "Url pointing to sponsor's logo (jpg image).", "title": "Logo" }, "link": { "type": "string", "description": "Url pointing to sponsor's website.", "title": "Link" } }, "description": "Sponsor details." } } } } } }, "operationId": "GetInstallationByID", "summary": "Get installation by ID", "description": "Operation returns single installation metadata, given by InstallationId.", "parameters": [ { "name": "InstallationID", "in": "path", "required": true, "type": "integer", "description": "Id of the single installation to get metadata.", "x-ms-summary": "Installation ID", "x-ms-visibility": "important", "format": "int32", "x-ms-url-encoding": "single" }, { "name": "Accept", "in": "header", "required": true, "type": "string", "default": "application/json", "x-ms-visibility": "internal" }, { "name": "Accept-Encoding", "in": "header", "required": true, "type": "string", "default": "gzip", "x-ms-visibility": "internal" } ] } }, "/installations/nearest": { "get": { "responses": { "200": { "description": "200", "schema": { "type": "array", "items": { "description": "List of nearest installations.", "type": "object", "properties": { "id": { "type": "integer", "format": "int32", "description": "Unique installation identifier. Having InstallationId you can query measurements from particular installation.", "title": "Id" }, "location": { "type": "object", "properties": { "latitude": { "type": "number", "format": "float", "description": "Installation coordinates - latitude. Exact sensor location on map.", "title": "Latitude" }, "longitude": { "type": "number", "format": "float", "description": "Installation coordinates - longitude. Exact sensor location on map.", "title": "Longitude" } }, "description": "Location details." }, "locationId": { "type": "integer", "format": "int32", "description": "Unique location identifier.", "title": "Location Id" }, "address": { "type": "object", "properties": { "country": { "type": "string", "description": "Installation country. Attribute is optional, may be empty or null.", "title": "Country" }, "city": { "type": "string", "description": "Installation city. Attribute is optional, may be empty or null.", "title": "City" }, "street": { "type": "string", "description": "Installation street. Attribute is optional, may be empty or null.", "title": "Street" }, "number": { "type": "string", "description": "Installation street number. Attribute is optional, may be empty or null.", "title": "Number" }, "displayAddress1": { "type": "string", "description": "Extra field describing address, e.g. school name or number. Optional field.", "title": "Display address 1" }, "displayAddress2": { "type": "string", "description": "Extra field describing address, e.g. school name or number. Optional field.", "title": "Display address 2" } }, "description": "Address details." }, "elevation": { "type": "number", "format": "float", "description": "Altitude at which device is installed; meters above mean sea level (mamsl).", "title": "Elevation" }, "airly": { "type": "boolean", "description": "Flag indicating whether this installation is an Airly device or not; e.g. GIOŚ stations are flagged as false.", "title": "Airly", "enum": [ true, false ] }, "sponsor": { "type": "object", "properties": { "id": { "type": "integer", "format": "int32", "description": "Sponsor identifier.", "title": "Id" }, "name": { "type": "string", "description": "Name of this installation's sponsor.", "title": "Name" }, "description": { "type": "string", "description": "Additional description of this installation's sponsor.", "title": "Description" }, "logo": { "type": "string", "description": "Url pointing to sponsor's logo (jpg image).", "title": "Logo" }, "link": { "type": "string", "description": "Url pointing to sponsor's website.", "title": "Link" } }, "description": "Sponsor details." } } } } } }, "summary": "Get nearest installations", "description": "Endpoint returns list of installations which are closest to a given point, sorted by distance to that point.", "operationId": "GetNearestInstallations", "parameters": [ { "name": "lat", "in": "query", "required": true, "type": "number", "x-ms-summary": "Latitude", "description": "Latitude as decimal degree, e.g. 50.062006.", "x-ms-visibility": "important", "format": "float" }, { "name": "lng", "in": "query", "required": true, "type": "number", "x-ms-summary": "Longitude", "description": "Longitude as decimal degree, e.g. 19.940984.", "format": "float", "x-ms-visibility": "important" }, { "name": "maxDistanceKM", "in": "query", "required": false, "type": "number", "format": "float", "description": "Default value 3.0. All the returned installations must be located within this limit from the given point (in km). Negative value means no limit.", "x-ms-summary": "Max distance (KM)", "x-ms-visibility": "advanced" }, { "name": "maxResults", "in": "query", "required": false, "type": "integer", "x-ms-summary": "Max returned results", "x-ms-visibility": "advanced", "format": "int32", "description": "Default value 1. Maximum number of installations to return. Negative value means no limit" }, { "name": "Accept", "in": "header", "required": true, "type": "string", "default": "application/json", "x-ms-visibility": "internal" }, { "name": "Accept-Encoding", "in": "header", "required": true, "type": "string", "default": "gzip", "x-ms-visibility": "internal" } ] } }, "/measurements/installation": { "get": { "responses": { "200": { "description": "200", "schema": { "type": "object", "properties": { "current": { "type": "object", "description": "List of current entries.", "properties": { "fromDateTime": { "type": "string", "description": "ISO8601 timestamp. Date and time in UTC. The field represent start time from which the data in this payload was measured and averaged.", "title": "From DateTime - current" }, "tillDateTime": { "type": "string", "description": "ISO8601 timestamp. Date and time in UTC. The field represent end time to which the data in this payload was measured and averaged.", "title": "Till DateTime - current" }, "values": { "x-ms-visibility": "advanced", "description": "Values - current.", "type": "array", "items": { "x-ms-visibility": "advanced", "description": "List of values - current.", "type": "object", "properties": { "name": { "type": "string", "description": "Name (type) of the given measurement; e.g. PM10.", "title": "Measurement name - current" }, "value": { "type": "number", "format": "float", "description": "Measured value of the given measurement type, e.g. concentration 25µg/m3.", "title": "Measurement value - current" } } } }, "indexes": { "x-ms-visibility": "advanced", "description": "Indexes - current.", "type": "array", "items": { "x-ms-visibility": "advanced", "description": "List of indexes - current.", "type": "object", "properties": { "name": { "type": "string", "description": "Name of the index (e.g. CAQI, or PIJP).", "title": "Index name - current" }, "value": { "type": "number", "description": "Numerical value of the calculated index.", "title": "Index value - current", "format": "float" }, "level": { "type": "string", "description": "Discreet level of the index (e.g. HIGH, or LOW etc.).", "title": "Level - current" }, "description": { "type": "string", "description": "Description of the index level. The text translated and returned in a language according to Accept-Language request header.", "title": "Description - current" }, "advice": { "type": "string", "description": "Additional text with advice regarding current index level. The text translated and returned in a language according to Accept-Language request header.", "title": "Advice - current" }, "color": { "type": "string", "description": "Color representing index level in a form of hexadecimal RGB triplet (e.g. #D1CF1E).", "title": "Color - current" } } } }, "standards": { "x-ms-visibility": "advanced", "description": "Standards - current.", "type": "array", "items": { "x-ms-visibility": "advanced", "description": "List of standards - current.", "type": "object", "properties": { "name": { "type": "string", "description": "Name of this standard. Currently only WHO standards are supported.", "title": "Standard name - current" }, "pollutant": { "type": "string", "description": "Name of the pollutant to which this standard applies, currently only PM10 and PM25 are supported.", "title": "Pollutant - current" }, "limit": { "type": "number", "format": "float", "description": "Certain average concentration level of the pollutant which should not be exceeded over given period of time; in other words, this is the value for which the pollutant concentration reaches 100% of the limit.", "title": "Limit - current" }, "percent": { "type": "number", "format": "float", "description": "Concentration value of a given pollutant expressed as a percentage of this concentration in the standard / limit, e.g. for a standard of 50μg/m3 of PM10 the concentration of 25μg/m3 is expressed as 50%.", "title": "Percent - current" }, "averaging": { "type": "string", "description": "Measurement values are interpolated by averaging measurements from nearby sensors (up to 1,5km away from the given point).", "title": "Averaging - current" } } } } } }, "history": { "x-ms-visibility": "advanced", "description": "Historical entries.", "type": "array", "items": { "x-ms-visibility": "advanced", "description": "List of historical entries.", "type": "object", "properties": { "fromDateTime": { "type": "string", "description": "ISO8601 timestamp. Date and time in UTC. The field represent start time from which the data in this payload was measured and averaged.", "title": "From DateTime - history", "x-ms-visibility": "advanced" }, "tillDateTime": { "type": "string", "description": "ISO8601 timestamp. Date and time in UTC. The field represent end time to which the data in this payload was measured and averaged.", "title": "Till DateTime - history", "x-ms-visibility": "advanced" }, "values": { "x-ms-visibility": "advanced", "description": "Values - history.", "type": "array", "items": { "x-ms-visibility": "advanced", "description": "List of values - history.", "type": "object", "properties": { "name": { "type": "string", "description": "Name (type) of the given measurement; e.g. PM10.", "title": "Measurement name - history" }, "value": { "type": "number", "format": "float", "description": "Measured value of the given measurement type, e.g. concentration 25µg/m3.", "title": "Measurement value - history" } } } }, "indexes": { "x-ms-visibility": "advanced", "description": "Indexes - history.", "type": "array", "items": { "x-ms-visibility": "advanced", "description": "List of indexes - history.", "type": "object", "properties": { "name": { "type": "string", "description": "Name of this standard. Currently only WHO standards are supported.", "title": "Standard name - history" }, "pollutant": { "type": "string", "description": "Name of the pollutant to which this standard applies, currently only PM10 and PM25 are supported.", "title": "Pollutant - history" }, "limit": { "type": "number", "format": "float", "description": "Certain average concentration level of the pollutant which should not be exceeded over given period of time; in other words, this is the value for which the pollutant concentration reaches 100% of the limit.", "title": "Limit - history" }, "percent": { "type": "number", "format": "float", "description": "Concentration value of a given pollutant expressed as a percentage of this concentration in the standard / limit, e.g. for a standard of 50μg/m3 of PM10 the concentration of 25μg/m3 is expressed as 50%.", "title": "Percent - history" }, "averaging": { "type": "string", "description": "Measurement values are interpolated by averaging measurements from nearby sensors (up to 1,5km away from the given point).", "title": "Averaging - history" } } } }, "standards": { "x-ms-visibility": "advanced", "description": "Standards - history.", "type": "array", "items": { "x-ms-visibility": "advanced", "description": "List of standards - history.", "type": "object", "properties": { "name": { "type": "string", "description": "Name of this standard. Currently only WHO standards are supported.", "title": "Standard name - history" }, "pollutant": { "type": "string", "description": "Name of the pollutant to which this standard applies, currently only PM10 and PM25 are supported.", "title": "Pollutant - history" }, "limit": { "type": "number", "format": "float", "description": "Certain average concentration level of the pollutant which should not be exceeded over given period of time; in other words, this is the value for which the pollutant concentration reaches 100% of the limit.", "title": "Limit - history" }, "percent": { "type": "number", "format": "float", "description": "Concentration value of a given pollutant expressed as a percentage of this concentration in the standard / limit, e.g. for a standard of 50μg/m3 of PM10 the concentration of 25μg/m3 is expressed as 50%.", "title": "Percent - history" }, "averaging": { "type": "string", "description": "Measurement values are interpolated by averaging measurements from nearby sensors (up to 1,5km away from the given point).", "title": "Averaging - history" } } } } } } }, "forecast": { "x-ms-visibility": "advanced", "description": "Forecast entries.", "type": "array", "items": { "x-ms-visibility": "advanced", "description": "List of forecast entries.", "type": "object", "properties": { "fromDateTime": { "type": "string", "description": "ISO8601 timestamp. Date and time in UTC. The field represent start time from which the data in this payload was measured and averaged.", "title": "From DateTime - forecast", "x-ms-visibility": "advanced" }, "tillDateTime": { "type": "string", "description": "ISO8601 timestamp. Date and time in UTC. The field represent end time to which the data in this payload was measured and averaged.", "title": "Till DateTime - forecast", "x-ms-visibility": "advanced" }, "values": { "x-ms-visibility": "advanced", "description": "Values - forecast.", "type": "array", "items": { "x-ms-visibility": "advanced", "description": "List of values - forecast.", "type": "object", "properties": { "name": { "type": "string", "description": "Name (type) of the given measurement; e.g. PM10.", "title": "Measurement name - forecast" }, "value": { "type": "number", "format": "float", "description": "Measured value of the given measurement type, e.g. concentration 25µg/m3.", "title": "Measurement value - forecast" } } } }, "indexes": { "x-ms-visibility": "advanced", "description": "Indexes - forecast.", "type": "array", "items": { "x-ms-visibility": "advanced", "description": "List of indexes - forecast.", "type": "object", "properties": { "name": { "type": "string", "description": "Name of this standard. Currently only WHO standards are supported.", "title": "Standard name - forecast" }, "pollutant": { "type": "string", "description": "Name of the pollutant to which this standard applies, currently only PM10 and PM25 are supported.", "title": "Pollutant - forecast" }, "limit": { "type": "number", "format": "float", "description": "Certain average concentration level of the pollutant which should not be exceeded over given period of time; in other words, this is the value for which the pollutant concentration reaches 100% of the limit.", "title": "Limit - forecast" }, "percent": { "type": "number", "format": "float", "description": "Concentration value of a given pollutant expressed as a percentage of this concentration in the standard / limit, e.g. for a standard of 50μg/m3 of PM10 the concentration of 25μg/m3 is expressed as 50%.", "title": "Percent - forecast" }, "averaging": { "type": "string", "description": "Measurement values are interpolated by averaging measurements from nearby sensors (up to 1,5km away from the given point).", "title": "Averaging - forecast" } } } }, "standards": { "x-ms-visibility": "advanced", "description": "Standards - forecast.", "type": "array", "items": { "x-ms-visibility": "advanced", "description": "List of standards - forecast.", "type": "object", "properties": { "name": { "type": "string", "description": "Name of this standard. Currently only WHO standards are supported.", "title": "Standard name - forecast" }, "pollutant": { "type": "string", "description": "Name of the pollutant to which this standard applies, currently only PM10 and PM25 are supported.", "title": "Pollutant - forecast" }, "limit": { "type": "number", "format": "float", "description": "Certain average concentration level of the pollutant which should not be exceeded over given period of time; in other words, this is the value for which the pollutant concentration reaches 100% of the limit.", "title": "Limit - forecast" }, "percent": { "type": "number", "format": "float", "description": "Concentration value of a given pollutant expressed as a percentage of this concentration in the standard / limit, e.g. for a standard of 50μg/m3 of PM10 the concentration of 25μg/m3 is expressed as 50%.", "title": "Percent - forecast" }, "averaging": { "type": "string", "description": "Measurement values are interpolated by averaging measurements from nearby sensors (up to 1,5km away from the given point).", "title": "Averaging - forecast" } } } } } } } } }, "headers": { "Content-Encoding": { "description": "Content-Encoding", "type": "string", "x-ms-visibility": "internal" } } } }, "summary": "Get measurements for installation", "description": "Endpoint returns measurements for concrete installation given by InstallationId.", "operationId": "GetMeasurementsForInstallation", "parameters": [ { "name": "installationId", "in": "query", "required": true, "type": "integer", "x-ms-summary": "Installation ID", "format": "int32", "description": "Installation identifier for which measurements are returned." }, { "name": "Accept", "in": "header", "required": true, "type": "string", "default": "application/json", "x-ms-visibility": "internal" }, { "name": "Accept-Language", "in": "header", "required": false, "type": "string", "default": "en", "x-ms-summary": "Language", "description": "Language in which text descriptions should be returned.", "enum": [ "en", "pl" ], "x-ms-visibility": "advanced" }, { "name": "Accept-Encoding", "in": "header", "required": true, "type": "string", "default": "gzip", "x-ms-visibility": "internal" }, { "name": "indexType", "in": "query", "required": false, "type": "string", "default": "AIRLY_CAQI", "x-ms-summary": "Index type", "description": "Selects the type of the index which should be calculated and returned in response.", "enum": [ "AIRLY_CAQI", "CAQI", "PIJP" ], "x-ms-visibility": "advanced" } ] } }, "/measurements/nearest": { "get": { "responses": { "200": { "description": "200", "schema": { "type": "object", "properties": { "current": { "type": "object", "description": "List of current entries.", "properties": { "fromDateTime": { "type": "string", "description": "ISO8601 timestamp. Date and time in UTC. The field represent start time from which the data in this payload was measured and averaged.", "title": "From DateTime - current" }, "tillDateTime": { "type": "string", "description": "ISO8601 timestamp. Date and time in UTC. The field represent end time to which the data in this payload was measured and averaged.", "title": "Till DateTime - current" }, "values": { "x-ms-visibility": "advanced", "description": "Values - current.", "type": "array", "items": { "x-ms-visibility": "advanced", "description": "List of values - current.", "type": "object", "properties": { "name": { "type": "string", "description": "Name (type) of the given measurement; e.g. PM10.", "title": "Measurement name - current" }, "value": { "type": "number", "format": "float", "description": "Measured value of the given measurement type, e.g. concentration 25µg/m3.", "title": "Measurement value - current" } } } }, "indexes": { "x-ms-visibility": "advanced", "description": "Indexes - current.", "type": "array", "items": { "x-ms-visibility": "advanced", "description": "List of indexes - current.", "type": "object", "properties": { "name": { "type": "string", "description": "Name of the index (e.g. CAQI, or PIJP).", "title": "Index name - current" }, "value": { "type": "number", "description": "Numerical value of the calculated index.", "title": "Index value - current", "format": "float" }, "level": { "type": "string", "description": "Discreet level of the index (e.g. HIGH, or LOW etc.).", "title": "Level - current" }, "description": { "type": "string", "description": "Description of the index level. The text translated and returned in a language according to Accept-Language request header.", "title": "Description - current" }, "advice": { "type": "string", "description": "Additional text with advice regarding current index level. The text translated and returned in a language according to Accept-Language request header.", "title": "Advice - current" }, "color": { "type": "string", "description": "Color representing index level in a form of hexadecimal RGB triplet (e.g. #D1CF1E).", "title": "Color - current" } } } }, "standards": { "x-ms-visibility": "advanced", "description": "Standards - current.", "type": "array", "items": { "x-ms-visibility": "advanced", "description": "List of standards - current.", "type": "object", "properties": { "name": { "type": "string", "description": "Name of this standard. Currently only WHO standards are supported.", "title": "Standard name - current" }, "pollutant": { "type": "string", "description": "Name of the pollutant to which this standard applies, currently only PM10 and PM25 are supported.", "title": "Pollutant - current" }, "limit": { "type": "number", "format": "float", "description": "Certain average concentration level of the pollutant which should not be exceeded over given period of time; in other words, this is the value for which the pollutant concentration reaches 100% of the limit.", "title": "Limit - current" }, "percent": { "type": "number", "format": "float", "description": "Concentration value of a given pollutant expressed as a percentage of this concentration in the standard / limit, e.g. for a standard of 50μg/m3 of PM10 the concentration of 25μg/m3 is expressed as 50%.", "title": "Percent - current" }, "averaging": { "type": "string", "description": "Measurement values are interpolated by averaging measurements from nearby sensors (up to 1,5km away from the given point).", "title": "Averaging - current" } } } } } }, "history": { "x-ms-visibility": "advanced", "description": "Historical entries.", "type": "array", "items": { "x-ms-visibility": "advanced", "description": "List of historical entries.", "type": "object", "properties": { "fromDateTime": { "type": "string", "description": "ISO8601 timestamp. Date and time in UTC. The field represent start time from which the data in this payload was measured and averaged.", "title": "From DateTime - history", "x-ms-visibility": "advanced" }, "tillDateTime": { "type": "string", "description": "ISO8601 timestamp. Date and time in UTC. The field represent end time to which the data in this payload was measured and averaged.", "title": "Till DateTime - history", "x-ms-visibility": "advanced" }, "values": { "x-ms-visibility": "advanced", "description": "Values - history.", "type": "array", "items": { "x-ms-visibility": "advanced", "description": "List of values - history.", "type": "object", "properties": { "name": { "type": "string", "description": "Name (type) of the given measurement; e.g. PM10.", "title": "Measurement name - history" }, "value": { "type": "number", "format": "float", "description": "Measured value of the given measurement type, e.g. concentration 25µg/m3.", "title": "Measurement value - history" } } } }, "indexes": { "x-ms-visibility": "advanced", "description": "Indexes - history.", "type": "array", "items": { "x-ms-visibility": "advanced", "description": "List of indexes - history.", "type": "object", "properties": { "name": { "type": "string", "description": "Name of this standard. Currently only WHO standards are supported.", "title": "Standard name - history" }, "pollutant": { "type": "string", "description": "Name of the pollutant to which this standard applies, currently only PM10 and PM25 are supported.", "title": "Pollutant - history" }, "limit": { "type": "number", "format": "float", "description": "Certain average concentration level of the pollutant which should not be exceeded over given period of time; in other words, this is the value for which the pollutant concentration reaches 100% of the limit.", "title": "Limit - history" }, "percent": { "type": "number", "format": "float", "description": "Concentration value of a given pollutant expressed as a percentage of this concentration in the standard / limit, e.g. for a standard of 50μg/m3 of PM10 the concentration of 25μg/m3 is expressed as 50%.", "title": "Percent - history" }, "averaging": { "type": "string", "description": "Measurement values are interpolated by averaging measurements from nearby sensors (up to 1,5km away from the given point).", "title": "Averaging - history" } } } }, "standards": { "x-ms-visibility": "advanced", "description": "Standards - history.", "type": "array", "items": { "x-ms-visibility": "advanced", "description": "List of standards - history.", "type": "object", "properties": { "name": { "type": "string", "description": "Name of this standard. Currently only WHO standards are supported.", "title": "Standard name - history" }, "pollutant": { "type": "string", "description": "Name of the pollutant to which this standard applies, currently only PM10 and PM25 are supported.", "title": "Pollutant - history" }, "limit": { "type": "number", "format": "float", "description": "Certain average concentration level of the pollutant which should not be exceeded over given period of time; in other words, this is the value for which the pollutant concentration reaches 100% of the limit.", "title": "Limit - history" }, "percent": { "type": "number", "format": "float", "description": "Concentration value of a given pollutant expressed as a percentage of this concentration in the standard / limit, e.g. for a standard of 50μg/m3 of PM10 the concentration of 25μg/m3 is expressed as 50%.", "title": "Percent - history" }, "averaging": { "type": "string", "description": "Measurement values are interpolated by averaging measurements from nearby sensors (up to 1,5km away from the given point).", "title": "Averaging - history" } } } } } } }, "forecast": { "x-ms-visibility": "advanced", "description": "Forecast entries.", "type": "array", "items": { "x-ms-visibility": "advanced", "description": "List of forecast entries.", "type": "object", "properties": { "fromDateTime": { "type": "string", "description": "ISO8601 timestamp. Date and time in UTC. The field represent start time from which the data in this payload was measured and averaged.", "title": "From DateTime - forecast", "x-ms-visibility": "advanced" }, "tillDateTime": { "type": "string", "description": "ISO8601 timestamp. Date and time in UTC. The field represent end time to which the data in this payload was measured and averaged.", "title": "Till DateTime - forecast", "x-ms-visibility": "advanced" }, "values": { "x-ms-visibility": "advanced", "description": "Values - forecast.", "type": "array", "items": { "x-ms-visibility": "advanced", "description": "List of values - forecast.", "type": "object", "properties": { "name": { "type": "string", "description": "Name (type) of the given measurement; e.g. PM10.", "title": "Measurement name - forecast" }, "value": { "type": "number", "format": "float", "description": "Measured value of the given measurement type, e.g. concentration 25µg/m3.", "title": "Measurement value - forecast" } } } }, "indexes": { "x-ms-visibility": "advanced", "description": "Indexes - forecast.", "type": "array", "items": { "x-ms-visibility": "advanced", "description": "List of indexes - forecast.", "type": "object", "properties": { "name": { "type": "string", "description": "Name of this standard. Currently only WHO standards are supported.", "title": "Standard name - forecast" }, "pollutant": { "type": "string", "description": "Name of the pollutant to which this standard applies, currently only PM10 and PM25 are supported.", "title": "Pollutant - forecast" }, "limit": { "type": "number", "format": "float", "description": "Certain average concentration level of the pollutant which should not be exceeded over given period of time; in other words, this is the value for which the pollutant concentration reaches 100% of the limit.", "title": "Limit - forecast" }, "percent": { "type": "number", "format": "float", "description": "Concentration value of a given pollutant expressed as a percentage of this concentration in the standard / limit, e.g. for a standard of 50μg/m3 of PM10 the concentration of 25μg/m3 is expressed as 50%.", "title": "Percent - forecast" }, "averaging": { "type": "string", "description": "Measurement values are interpolated by averaging measurements from nearby sensors (up to 1,5km away from the given point).", "title": "Averaging - forecast" } } } }, "standards": { "x-ms-visibility": "advanced", "description": "Standards - forecast.", "type": "array", "items": { "x-ms-visibility": "advanced", "description": "List of standards - forecast.", "type": "object", "properties": { "name": { "type": "string", "description": "Name of this standard. Currently only WHO standards are supported.", "title": "Standard name - forecast" }, "pollutant": { "type": "string", "description": "Name of the pollutant to which this standard applies, currently only PM10 and PM25 are supported.", "title": "Pollutant - forecast" }, "limit": { "type": "number", "format": "float", "description": "Certain average concentration level of the pollutant which should not be exceeded over given period of time; in other words, this is the value for which the pollutant concentration reaches 100% of the limit.", "title": "Limit - forecast" }, "percent": { "type": "number", "format": "float", "description": "Concentration value of a given pollutant expressed as a percentage of this concentration in the standard / limit, e.g. for a standard of 50μg/m3 of PM10 the concentration of 25μg/m3 is expressed as 50%.", "title": "Percent - forecast" }, "averaging": { "type": "string", "description": "Measurement values are interpolated by averaging measurements from nearby sensors (up to 1,5km away from the given point).", "title": "Averaging - forecast" } } } } } } } } }, "headers": { "Content-Encoding": { "description": "Content-Encoding", "type": "string", "x-ms-visibility": "internal" } } } }, "summary": "Get nearest measurements", "operationId": "GetNearestMeasurements", "description": "Endpoint returns measurements for an installation closest to a given location.", "parameters": [ { "name": "lat", "in": "query", "required": true, "type": "number", "x-ms-summary": "Latitude", "description": "Latitude as decimal degree, e.g. 50.062006." }, { "name": "lng", "in": "query", "required": true, "type": "number", "description": "Longitude as decimal degree, e.g. 19.940984.", "x-ms-summary": "Longitude" }, { "name": "maxDistanceKM", "in": "query", "required": false, "type": "number", "default": 3, "x-ms-summary": "Max distance (KM)", "format": "float", "description": "The searched installation must be located within this limit from the given point (in km). Negative value means no limit.", "x-ms-visibility": "advanced" }, { "name": "Accept", "in": "header", "required": true, "type": "string", "default": "application/json", "x-ms-visibility": "internal" }, { "name": "indexType", "in": "query", "required": false, "type": "string", "default": "AIRLY_CAQI", "x-ms-summary": "Index type", "description": "Selects the type of the index which should be calculated and returned in response.", "enum": [ "AIRLY_CAQI", "CAQI", "PIJP" ], "x-ms-visibility": "advanced" }, { "name": "Accept-Language", "in": "header", "required": false, "type": "string", "default": "en", "x-ms-summary": "Language", "description": "Language in which text descriptions should be returned.", "enum": [ "en", "pl" ], "x-ms-visibility": "advanced" }, { "name": "Accept-Encoding", "in": "header", "required": true, "type": "string", "default": "gzip", "x-ms-visibility": "internal" } ] } }, "/measurements/point": { "get": { "responses": { "200": { "description": "200", "schema": { "type": "object", "properties": { "current": { "type": "object", "description": "List of current entries.", "properties": { "fromDateTime": { "type": "string", "description": "ISO8601 timestamp. Date and time in UTC. The field represent start time from which the data in this payload was measured and averaged.", "title": "From DateTime - current" }, "tillDateTime": { "type": "string", "description": "ISO8601 timestamp. Date and time in UTC. The field represent end time to which the data in this payload was measured and averaged.", "title": "Till DateTime - current" }, "values": { "x-ms-visibility": "advanced", "description": "Values - current.", "type": "array", "items": { "x-ms-visibility": "advanced", "description": "List of values - current.", "type": "object", "properties": { "name": { "type": "string", "description": "Name (type) of the given measurement; e.g. PM10.", "title": "Measurement name - current" }, "value": { "type": "number", "format": "float", "description": "Measured value of the given measurement type, e.g. concentration 25µg/m3.", "title": "Measurement value - current" } } } }, "indexes": { "x-ms-visibility": "advanced", "description": "Indexes - current.", "type": "array", "items": { "x-ms-visibility": "advanced", "description": "List of indexes - current.", "type": "object", "properties": { "name": { "type": "string", "description": "Name of the index (e.g. CAQI, or PIJP).", "title": "Index name - current" }, "value": { "type": "number", "description": "Numerical value of the calculated index.", "title": "Index value - current", "format": "float" }, "level": { "type": "string", "description": "Discreet level of the index (e.g. HIGH, or LOW etc.).", "title": "Level - current" }, "description": { "type": "string", "description": "Description of the index level. The text translated and returned in a language according to Accept-Language request header.", "title": "Description - current" }, "advice": { "type": "string", "description": "Additional text with advice regarding current index level. The text translated and returned in a language according to Accept-Language request header.", "title": "Advice - current" }, "color": { "type": "string", "description": "Color representing index level in a form of hexadecimal RGB triplet (e.g. #D1CF1E).", "title": "Color - current" } } } }, "standards": { "x-ms-visibility": "advanced", "description": "Standards - current.", "type": "array", "items": { "x-ms-visibility": "advanced", "description": "List of standards - current.", "type": "object", "properties": { "name": { "type": "string", "description": "Name of this standard. Currently only WHO standards are supported.", "title": "Standard name - current" }, "pollutant": { "type": "string", "description": "Name of the pollutant to which this standard applies, currently only PM10 and PM25 are supported.", "title": "Pollutant - current" }, "limit": { "type": "number", "format": "float", "description": "Certain average concentration level of the pollutant which should not be exceeded over given period of time; in other words, this is the value for which the pollutant concentration reaches 100% of the limit.", "title": "Limit - current" }, "percent": { "type": "number", "format": "float", "description": "Concentration value of a given pollutant expressed as a percentage of this concentration in the standard / limit, e.g. for a standard of 50μg/m3 of PM10 the concentration of 25μg/m3 is expressed as 50%.", "title": "Percent - current" }, "averaging": { "type": "string", "description": "Measurement values are interpolated by averaging measurements from nearby sensors (up to 1,5km away from the given point).", "title": "Averaging - current" } } } } } }, "history": { "x-ms-visibility": "advanced", "description": "Historical entries.", "type": "array", "items": { "x-ms-visibility": "advanced", "description": "List of historical entries.", "type": "object", "properties": { "fromDateTime": { "type": "string", "description": "ISO8601 timestamp. Date and time in UTC. The field represent start time from which the data in this payload was measured and averaged.", "title": "From DateTime - history", "x-ms-visibility": "advanced" }, "tillDateTime": { "type": "string", "description": "ISO8601 timestamp. Date and time in UTC. The field represent end time to which the data in this payload was measured and averaged.", "title": "Till DateTime - history", "x-ms-visibility": "advanced" }, "values": { "x-ms-visibility": "advanced", "description": "Values - history.", "type": "array", "items": { "x-ms-visibility": "advanced", "description": "List of values - history.", "type": "object", "properties": { "name": { "type": "string", "description": "Name (type) of the given measurement; e.g. PM10.", "title": "Measurement name - history" }, "value": { "type": "number", "format": "float", "description": "Measured value of the given measurement type, e.g. concentration 25µg/m3.", "title": "Measurement value - history" } } } }, "indexes": { "x-ms-visibility": "advanced", "description": "Indexes - history.", "type": "array", "items": { "x-ms-visibility": "advanced", "description": "List of indexes - history.", "type": "object", "properties": { "name": { "type": "string", "description": "Name of this standard. Currently only WHO standards are supported.", "title": "Standard name - history" }, "pollutant": { "type": "string", "description": "Name of the pollutant to which this standard applies, currently only PM10 and PM25 are supported.", "title": "Pollutant - history" }, "limit": { "type": "number", "format": "float", "description": "Certain average concentration level of the pollutant which should not be exceeded over given period of time; in other words, this is the value for which the pollutant concentration reaches 100% of the limit.", "title": "Limit - history" }, "percent": { "type": "number", "format": "float", "description": "Concentration value of a given pollutant expressed as a percentage of this concentration in the standard / limit, e.g. for a standard of 50μg/m3 of PM10 the concentration of 25μg/m3 is expressed as 50%.", "title": "Percent - history" }, "averaging": { "type": "string", "description": "Measurement values are interpolated by averaging measurements from nearby sensors (up to 1,5km away from the given point).", "title": "Averaging - history" } } } }, "standards": { "x-ms-visibility": "advanced", "description": "Standards - history.", "type": "array", "items": { "x-ms-visibility": "advanced", "description": "List of standards - history.", "type": "object", "properties": { "name": { "type": "string", "description": "Name of this standard. Currently only WHO standards are supported.", "title": "Standard name - history" }, "pollutant": { "type": "string", "description": "Name of the pollutant to which this standard applies, currently only PM10 and PM25 are supported.", "title": "Pollutant - history" }, "limit": { "type": "number", "format": "float", "description": "Certain average concentration level of the pollutant which should not be exceeded over given period of time; in other words, this is the value for which the pollutant concentration reaches 100% of the limit.", "title": "Limit - history" }, "percent": { "type": "number", "format": "float", "description": "Concentration value of a given pollutant expressed as a percentage of this concentration in the standard / limit, e.g. for a standard of 50μg/m3 of PM10 the concentration of 25μg/m3 is expressed as 50%.", "title": "Percent - history" }, "averaging": { "type": "string", "description": "Measurement values are interpolated by averaging measurements from nearby sensors (up to 1,5km away from the given point).", "title": "Averaging - history" } } } } } } }, "forecast": { "x-ms-visibility": "advanced", "description": "Forecast entries.", "type": "array", "items": { "x-ms-visibility": "advanced", "description": "List of forecast entries.", "type": "object", "properties": { "fromDateTime": { "type": "string", "description": "ISO8601 timestamp. Date and time in UTC. The field represent start time from which the data in this payload was measured and averaged.", "title": "From DateTime - forecast", "x-ms-visibility": "advanced" }, "tillDateTime": { "type": "string", "description": "ISO8601 timestamp. Date and time in UTC. The field represent end time to which the data in this payload was measured and averaged.", "title": "Till DateTime - forecast", "x-ms-visibility": "advanced" }, "values": { "x-ms-visibility": "advanced", "description": "Values - forecast.", "type": "array", "items": { "x-ms-visibility": "advanced", "description": "List of values - forecast.", "type": "object", "properties": { "name": { "type": "string", "description": "Name (type) of the given measurement; e.g. PM10.", "title": "Measurement name - forecast" }, "value": { "type": "number", "format": "float", "description": "Measured value of the given measurement type, e.g. concentration 25µg/m3.", "title": "Measurement value - forecast" } } } }, "indexes": { "x-ms-visibility": "advanced", "description": "Indexes - forecast.", "type": "array", "items": { "x-ms-visibility": "advanced", "description": "List of indexes - forecast.", "type": "object", "properties": { "name": { "type": "string", "description": "Name of this standard. Currently only WHO standards are supported.", "title": "Standard name - forecast" }, "pollutant": { "type": "string", "description": "Name of the pollutant to which this standard applies, currently only PM10 and PM25 are supported.", "title": "Pollutant - forecast" }, "limit": { "type": "number", "format": "float", "description": "Certain average concentration level of the pollutant which should not be exceeded over given period of time; in other words, this is the value for which the pollutant concentration reaches 100% of the limit.", "title": "Limit - forecast" }, "percent": { "type": "number", "format": "float", "description": "Concentration value of a given pollutant expressed as a percentage of this concentration in the standard / limit, e.g. for a standard of 50μg/m3 of PM10 the concentration of 25μg/m3 is expressed as 50%.", "title": "Percent - forecast" }, "averaging": { "type": "string", "description": "Measurement values are interpolated by averaging measurements from nearby sensors (up to 1,5km away from the given point).", "title": "Averaging - forecast" } } } }, "standards": { "x-ms-visibility": "advanced", "description": "Standards - forecast.", "type": "array", "items": { "x-ms-visibility": "advanced", "description": "List of standards - forecast.", "type": "object", "properties": { "name": { "type": "string", "description": "Name of this standard. Currently only WHO standards are supported.", "title": "Standard name - forecast" }, "pollutant": { "type": "string", "description": "Name of the pollutant to which this standard applies, currently only PM10 and PM25 are supported.", "title": "Pollutant - forecast" }, "limit": { "type": "number", "format": "float", "description": "Certain average concentration level of the pollutant which should not be exceeded over given period of time; in other words, this is the value for which the pollutant concentration reaches 100% of the limit.", "title": "Limit - forecast" }, "percent": { "type": "number", "format": "float", "description": "Concentration value of a given pollutant expressed as a percentage of this concentration in the standard / limit, e.g. for a standard of 50μg/m3 of PM10 the concentration of 25μg/m3 is expressed as 50%.", "title": "Percent - forecast" }, "averaging": { "type": "string", "description": "Measurement values are interpolated by averaging measurements from nearby sensors (up to 1,5km away from the given point).", "title": "Averaging - forecast" } } } } } } } } }, "headers": { "Content-Encoding": { "description": "Content-Encoding", "type": "string", "x-ms-visibility": "internal" } } } }, "summary": "Get measurements for a point", "description": "Endpoint returns measurements for any geographical location. Measurement values are interpolated by averaging measurements from nearby sensors (up to 1,5km away from the given point). The returned value is a weighted average, with the weight inversely proportional to the distance from the sensor to the given point.", "operationId": "GetMeasurementsForPoint", "parameters": [ { "name": "lat", "in": "query", "required": true, "type": "number", "x-ms-summary": "Latitude", "description": "Latitude as decimal degree, e.g. 50.062006." }, { "name": "lng", "in": "query", "required": true, "type": "number", "description": "Longitude as decimal degree, e.g. 19.940984.", "x-ms-summary": "Longitude" }, { "name": "Accept", "in": "header", "required": true, "type": "string", "default": "application/json", "x-ms-visibility": "internal" }, { "name": "indexType", "in": "query", "required": false, "type": "string", "default": "AIRLY_CAQI", "x-ms-summary": "Index type", "description": "Selects the type of the index which should be calculated and returned in response.", "enum": [ "AIRLY_CAQI", "CAQI", "PIJP" ], "x-ms-visibility": "advanced" }, { "name": "Accept-Language", "in": "header", "required": false, "type": "string", "default": "en", "x-ms-summary": "Language", "description": "Language in which text descriptions should be returned.", "enum": [ "en", "pl" ], "x-ms-visibility": "advanced" }, { "name": "Accept-Encoding", "in": "header", "required": true, "type": "string", "default": "gzip", "x-ms-visibility": "internal" } ] } }, "/meta/indexes": { "get": { "responses": { "200": { "description": "200", "schema": { "type": "array", "items": { "x-ms-visibility": "advanced", "description": "List of available indexes.", "type": "object", "properties": { "name": { "type": "string", "description": "Name of the index.", "title": "Index name" }, "levels": { "x-ms-visibility": "advanced", "type": "array", "items": { "x-ms-visibility": "advanced", "type": "object", "properties": { "minValue": { "type": "number", "format": "float", "description": "Minimum value the index can return for the given level.", "title": "Minimum value" }, "maxValue": { "type": "number", "format": "float", "description": "Maximum value the index can return for the given level.", "title": "Maximum value" }, "values": { "type": "string", "description": "Values the index can return for the given level.", "title": "Values" }, "level": { "type": "string", "title": "Level name" }, "description": { "type": "string", "title": "Level description" }, "color": { "type": "string", "description": "Color representing index level in a form of hexadecimal RGB triplet (e.g. #D1CF1E).", "title": "Color" } } }, "description": "List of available indexes levels." } } } } } }, "summary": "Get available indexes", "description": "Endpoint returns a list of all the index types supported in the API along with lists of levels defined per each index type.", "operationId": "GetAvailableIndexes", "x-ms-visibility": "advanced", "parameters": [ { "name": "Accept", "in": "header", "required": true, "type": "string", "default": "application/json", "x-ms-visibility": "internal" }, { "name": "Accept-Encoding", "in": "header", "required": true, "type": "string", "default": "gzip", "x-ms-visibility": "internal" } ] } }, "/meta/measurements": { "get": { "responses": { "200": { "description": "200", "schema": { "type": "array", "items": { "x-ms-visibility": "advanced", "description": "List of available measurements", "type": "object", "properties": { "name": { "type": "string", "description": "Name of this measurement type, e.g. PM10.", "title": "Name" }, "label": { "type": "string", "description": "Descriptive name of this measurement type (field translated).", "title": "Label" }, "unit": { "type": "string", "description": "Unit of this measurement type e.g. µg/m3.", "title": "Unit" } } } } } }, "summary": "Get available measurements", "description": "Endpoint returns list of all the measurement types supported in the API along with their names and units.", "operationId": "GetAvailableMeasurements", "x-ms-visibility": "advanced", "parameters": [ { "name": "Accept", "in": "header", "required": true, "type": "string", "default": "application/json", "x-ms-visibility": "internal" }, { "name": "Accept-Language", "in": "header", "required": false, "type": "string", "default": "en", "x-ms-summary": "Language", "description": "Language in which text descriptions should be returned.", "enum": [ "en", "pl" ], "x-ms-visibility": "advanced" }, { "name": "Accept-Encoding", "in": "header", "required": true, "type": "string", "default": "gzip", "x-ms-visibility": "internal" } ] } } }, "definitions": {}, "parameters": {}, "responses": {}, "securityDefinitions": { "API Key": { "type": "apiKey", "in": "header", "name": "apikey" } }, "security": [ { "API Key": [] } ], "tags": [] }