openapi: 3.1.0 info: title: OpenAQ Averages Sensors API description: ' OpenAQ is a nonprofit organization providing universal access to air quality data to empower a global community of changemakers to solve air inequality-the unequal access to clean air.' version: 2.0.0 tags: - name: Sensors paths: /v3/sensors/{sensors_id}/measurements: get: tags: - Sensors summary: OpenAQ Get measurements by sensor ID description: Provides a list of measurements by sensor ID operationId: sensor_measurements_get_v3_sensors__sensors_id__measurements_get security: - APIKeyHeader: [] parameters: - name: sensors_id in: path required: true schema: type: integer description: Limit the results to a specific sensors id title: Sensors Id description: Limit the results to a specific sensors id - name: datetime_to in: query required: false schema: anyOf: - type: string format: date-time - type: string format: date - type: 'null' description: To when? examples: - '2022-10-01T11:19:38-06:00' - '2022-10-01' title: Datetime To description: To when? - name: datetime_from in: query required: false schema: anyOf: - type: string format: date-time - type: string format: date - type: 'null' description: From when? examples: - '2022-10-01T11:19:38-06:00' - '2022-10-01' title: Datetime From description: From when? - name: limit in: query required: false schema: type: integer description: "Change the number of results returned.\n e.g. limit=100 will return up to 100 results" examples: - '100' default: 100 title: Limit description: "Change the number of results returned.\n e.g. limit=100 will return up to 100 results" - name: page in: query required: false schema: type: integer description: Paginate through results. e.g. page=1 will return first page of results examples: - '1' default: 1 title: Page description: Paginate through results. e.g. page=1 will return first page of results responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/openaq_api__v3__models__responses__MeasurementsResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /v3/sensors/{sensors_id}/measurements/hourly: get: tags: - Sensors summary: OpenAQ Get measurements aggregated to hours by sensor ID description: Provides a list of measurements by sensor ID operationId: sensor_measurements_aggregated_get_hourly_v3_sensors__sensors_id__measurements_hourly_get security: - APIKeyHeader: [] parameters: - name: sensors_id in: path required: true schema: type: integer description: Limit the results to a specific sensors id title: Sensors Id description: Limit the results to a specific sensors id - name: datetime_to in: query required: false schema: anyOf: - type: string format: date-time - type: string format: date - type: 'null' description: To when? examples: - '2022-10-01T11:19:38-06:00' - '2022-10-01' title: Datetime To description: To when? - name: datetime_from in: query required: false schema: anyOf: - type: string format: date-time - type: string format: date - type: 'null' description: From when? examples: - '2022-10-01T11:19:38-06:00' - '2022-10-01' title: Datetime From description: From when? - name: limit in: query required: false schema: type: integer description: "Change the number of results returned.\n e.g. limit=100 will return up to 100 results" examples: - '100' default: 100 title: Limit description: "Change the number of results returned.\n e.g. limit=100 will return up to 100 results" - name: page in: query required: false schema: type: integer description: Paginate through results. e.g. page=1 will return first page of results examples: - '1' default: 1 title: Page description: Paginate through results. e.g. page=1 will return first page of results responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/openaq_api__v3__models__responses__MeasurementsResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /v3/sensors/{sensors_id}/measurements/daily: get: tags: - Sensors summary: OpenAQ Get measurements aggregated to days by sensor ID description: Provides a list of measurements by sensor ID operationId: sensor_measurements_aggregated_get_daily_v3_sensors__sensors_id__measurements_daily_get security: - APIKeyHeader: [] parameters: - name: sensors_id in: path required: true schema: type: integer description: Limit the results to a specific sensors id title: Sensors Id description: Limit the results to a specific sensors id - name: datetime_to in: query required: false schema: anyOf: - type: string format: date-time - type: string format: date - type: 'null' description: To when? examples: - '2022-10-01T11:19:38-06:00' - '2022-10-01' title: Datetime To description: To when? - name: datetime_from in: query required: false schema: anyOf: - type: string format: date-time - type: string format: date - type: 'null' description: From when? examples: - '2022-10-01T11:19:38-06:00' - '2022-10-01' title: Datetime From description: From when? - name: limit in: query required: false schema: type: integer description: "Change the number of results returned.\n e.g. limit=100 will return up to 100 results" examples: - '100' default: 100 title: Limit description: "Change the number of results returned.\n e.g. limit=100 will return up to 100 results" - name: page in: query required: false schema: type: integer description: Paginate through results. e.g. page=1 will return first page of results examples: - '1' default: 1 title: Page description: Paginate through results. e.g. page=1 will return first page of results responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/openaq_api__v3__models__responses__MeasurementsResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /v3/sensors/{sensors_id}/hours: get: tags: - Sensors summary: OpenAQ Get measurements aggregated to hour by sensor ID description: Provides a list of hourly data by sensor ID operationId: sensor_hourly_measurements_get_v3_sensors__sensors_id__hours_get security: - APIKeyHeader: [] parameters: - name: sensors_id in: path required: true schema: type: integer description: Limit the results to a specific sensors id title: Sensors Id description: Limit the results to a specific sensors id - name: datetime_to in: query required: false schema: anyOf: - type: string format: date-time - type: string format: date - type: 'null' description: To when? examples: - '2022-10-01T11:19:38-06:00' - '2022-10-01' title: Datetime To description: To when? - name: datetime_from in: query required: false schema: anyOf: - type: string format: date-time - type: string format: date - type: 'null' description: From when? examples: - '2022-10-01T11:19:38-06:00' - '2022-10-01' title: Datetime From description: From when? - name: limit in: query required: false schema: type: integer description: "Change the number of results returned.\n e.g. limit=100 will return up to 100 results" examples: - '100' default: 100 title: Limit description: "Change the number of results returned.\n e.g. limit=100 will return up to 100 results" - name: page in: query required: false schema: type: integer description: Paginate through results. e.g. page=1 will return first page of results examples: - '1' default: 1 title: Page description: Paginate through results. e.g. page=1 will return first page of results responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/HourlyDataResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /v3/sensors/{sensors_id}/hours/daily: get: tags: - Sensors summary: OpenAQ Get measurements aggregated from hour to day by sensor ID description: Provides a list of daily summaries of hourly data by sensor ID operationId: sensor_hourly_measurements_aggregate_to_day_get_v3_sensors__sensors_id__hours_daily_get security: - APIKeyHeader: [] parameters: - name: sensors_id in: path required: true schema: type: integer description: Limit the results to a specific sensors id title: Sensors Id description: Limit the results to a specific sensors id - name: datetime_to in: query required: false schema: anyOf: - type: string format: date-time - type: string format: date - type: 'null' description: To when? examples: - '2022-10-01T11:19:38-06:00' - '2022-10-01' title: Datetime To description: To when? - name: datetime_from in: query required: false schema: anyOf: - type: string format: date-time - type: string format: date - type: 'null' description: From when? examples: - '2022-10-01T11:19:38-06:00' - '2022-10-01' title: Datetime From description: From when? - name: limit in: query required: false schema: type: integer description: "Change the number of results returned.\n e.g. limit=100 will return up to 100 results" examples: - '100' default: 100 title: Limit description: "Change the number of results returned.\n e.g. limit=100 will return up to 100 results" - name: page in: query required: false schema: type: integer description: Paginate through results. e.g. page=1 will return first page of results examples: - '1' default: 1 title: Page description: Paginate through results. e.g. page=1 will return first page of results responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/HourlyDataResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /v3/sensors/{sensors_id}/hours/monthly: get: tags: - Sensors summary: OpenAQ Get measurements aggregated from hour to month by sensor ID description: Provides a list of daily summaries of hourly data by sensor ID operationId: sensor_hourly_measurements_aggregate_to_month_get_v3_sensors__sensors_id__hours_monthly_get security: - APIKeyHeader: [] parameters: - name: sensors_id in: path required: true schema: type: integer description: Limit the results to a specific sensors id title: Sensors Id description: Limit the results to a specific sensors id - name: datetime_to in: query required: false schema: anyOf: - type: string format: date-time - type: string format: date - type: 'null' description: To when? examples: - '2022-10-01T11:19:38-06:00' - '2022-10-01' title: Datetime To description: To when? - name: datetime_from in: query required: false schema: anyOf: - type: string format: date-time - type: string format: date - type: 'null' description: From when? examples: - '2022-10-01T11:19:38-06:00' - '2022-10-01' title: Datetime From description: From when? - name: limit in: query required: false schema: type: integer description: "Change the number of results returned.\n e.g. limit=100 will return up to 100 results" examples: - '100' default: 100 title: Limit description: "Change the number of results returned.\n e.g. limit=100 will return up to 100 results" - name: page in: query required: false schema: type: integer description: Paginate through results. e.g. page=1 will return first page of results examples: - '1' default: 1 title: Page description: Paginate through results. e.g. page=1 will return first page of results responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/HourlyDataResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /v3/sensors/{sensors_id}/hours/yearly: get: tags: - Sensors summary: OpenAQ Get measurements aggregated from hour to year by sensor ID description: Provides a list of yearly summaries of hourly data by sensor ID operationId: sensor_hourly_measurements_aggregate_to_year_get_v3_sensors__sensors_id__hours_yearly_get security: - APIKeyHeader: [] parameters: - name: sensors_id in: path required: true schema: type: integer description: Limit the results to a specific sensors id title: Sensors Id description: Limit the results to a specific sensors id - name: datetime_to in: query required: false schema: anyOf: - type: string format: date-time - type: string format: date - type: 'null' description: To when? examples: - '2022-10-01T11:19:38-06:00' - '2022-10-01' title: Datetime To description: To when? - name: datetime_from in: query required: false schema: anyOf: - type: string format: date-time - type: string format: date - type: 'null' description: From when? examples: - '2022-10-01T11:19:38-06:00' - '2022-10-01' title: Datetime From description: From when? - name: limit in: query required: false schema: type: integer description: "Change the number of results returned.\n e.g. limit=100 will return up to 100 results" examples: - '100' default: 100 title: Limit description: "Change the number of results returned.\n e.g. limit=100 will return up to 100 results" - name: page in: query required: false schema: type: integer description: Paginate through results. e.g. page=1 will return first page of results examples: - '1' default: 1 title: Page description: Paginate through results. e.g. page=1 will return first page of results responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/HourlyDataResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /v3/sensors/{sensors_id}/hours/hourofday: get: tags: - Sensors summary: OpenAQ Get measurements aggregated from hour to day of week by sensor ID description: Provides a list of yearly summaries of hourly data by sensor ID operationId: sensor_hourly_measurements_aggregate_to_hod_get_v3_sensors__sensors_id__hours_hourofday_get security: - APIKeyHeader: [] parameters: - name: sensors_id in: path required: true schema: type: integer description: Limit the results to a specific sensors id title: Sensors Id description: Limit the results to a specific sensors id - name: datetime_to in: query required: false schema: anyOf: - type: string format: date-time - type: string format: date - type: 'null' description: To when? examples: - '2022-10-01T11:19:38-06:00' - '2022-10-01' title: Datetime To description: To when? - name: datetime_from in: query required: false schema: anyOf: - type: string format: date-time - type: string format: date - type: 'null' description: From when? examples: - '2022-10-01T11:19:38-06:00' - '2022-10-01' title: Datetime From description: From when? responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/HourlyDataResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /v3/sensors/{sensors_id}/hours/dayofweek: get: tags: - Sensors summary: OpenAQ Get measurements aggregated from hour to day of week by sensor ID description: Provides a list of yearly summaries of hourly data by sensor ID operationId: sensor_hourly_measurements_aggregate_to_dow_get_v3_sensors__sensors_id__hours_dayofweek_get security: - APIKeyHeader: [] parameters: - name: sensors_id in: path required: true schema: type: integer description: Limit the results to a specific sensors id title: Sensors Id description: Limit the results to a specific sensors id - name: datetime_to in: query required: false schema: anyOf: - type: string format: date-time - type: string format: date - type: 'null' description: To when? examples: - '2022-10-01T11:19:38-06:00' - '2022-10-01' title: Datetime To description: To when? - name: datetime_from in: query required: false schema: anyOf: - type: string format: date-time - type: string format: date - type: 'null' description: From when? examples: - '2022-10-01T11:19:38-06:00' - '2022-10-01' title: Datetime From description: From when? responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/HourlyDataResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /v3/sensors/{sensors_id}/hours/monthofyear: get: tags: - Sensors summary: OpenAQ Get measurements aggregated from hour to day of week by sensor ID description: Provides a list of yearly summaries of hourly data by sensor ID operationId: sensor_hourly_measurements_aggregate_to_moy_get_v3_sensors__sensors_id__hours_monthofyear_get security: - APIKeyHeader: [] parameters: - name: sensors_id in: path required: true schema: type: integer description: Limit the results to a specific sensors id title: Sensors Id description: Limit the results to a specific sensors id - name: datetime_to in: query required: false schema: anyOf: - type: string format: date-time - type: string format: date - type: 'null' description: To when? examples: - '2022-10-01T11:19:38-06:00' - '2022-10-01' title: Datetime To description: To when? - name: datetime_from in: query required: false schema: anyOf: - type: string format: date-time - type: string format: date - type: 'null' description: From when? examples: - '2022-10-01T11:19:38-06:00' - '2022-10-01' title: Datetime From description: From when? responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/HourlyDataResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /v3/sensors/{sensors_id}/days/dayofweek: get: tags: - Sensors summary: OpenAQ Get measurements aggregated from day to day of week by sensor ID description: Provides a list of yearly summaries of dayly data by sensor ID operationId: sensor_daily_measurements_aggregate_to_dow_get_v3_sensors__sensors_id__days_dayofweek_get security: - APIKeyHeader: [] parameters: - name: sensors_id in: path required: true schema: type: integer description: Limit the results to a specific sensors id title: Sensors Id description: Limit the results to a specific sensors id - name: date_to in: query required: false schema: anyOf: - type: string format: date-time - type: string format: date - type: 'null' description: To when? examples: - '2022-10-01T11:19:38-06:00' - '2022-10-01' title: Date To description: To when? - name: date_from in: query required: false schema: anyOf: - type: string format: date-time - type: string format: date - type: 'null' description: From when? examples: - '2022-10-01T11:19:38-06:00' - '2022-10-01' title: Date From description: From when? responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/HourlyDataResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /v3/sensors/{sensors_id}/days/monthofyear: get: tags: - Sensors summary: OpenAQ Get measurements aggregated from day to day of week by sensor ID description: Provides a list of yearly summaries of daily data by sensor ID operationId: sensor_daily_measurements_aggregate_to_moy_get_v3_sensors__sensors_id__days_monthofyear_get security: - APIKeyHeader: [] parameters: - name: sensors_id in: path required: true schema: type: integer description: Limit the results to a specific sensors id title: Sensors Id description: Limit the results to a specific sensors id - name: date_to in: query required: false schema: anyOf: - type: string format: date-time - type: string format: date - type: 'null' description: To when? examples: - '2022-10-01T11:19:38-06:00' - '2022-10-01' title: Date To description: To when? - name: date_from in: query required: false schema: anyOf: - type: string format: date-time - type: string format: date - type: 'null' description: From when? examples: - '2022-10-01T11:19:38-06:00' - '2022-10-01' title: Date From description: From when? responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/HourlyDataResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /v3/sensors/{sensors_id}/days: get: tags: - Sensors summary: OpenAQ Get measurements aggregated to day by sensor ID description: Provides a list of daily data by sensor ID operationId: sensor_daily_get_v3_sensors__sensors_id__days_get security: - APIKeyHeader: [] parameters: - name: sensors_id in: path required: true schema: type: integer description: Limit the results to a specific sensors id title: Sensors Id description: Limit the results to a specific sensors id - name: date_to in: query required: false schema: anyOf: - type: string format: date-time - type: string format: date - type: 'null' description: To when? examples: - '2022-10-01T11:19:38-06:00' - '2022-10-01' title: Date To description: To when? - name: date_from in: query required: false schema: anyOf: - type: string format: date-time - type: string format: date - type: 'null' description: From when? examples: - '2022-10-01T11:19:38-06:00' - '2022-10-01' title: Date From description: From when? - name: limit in: query required: false schema: type: integer description: "Change the number of results returned.\n e.g. limit=100 will return up to 100 results" examples: - '100' default: 100 title: Limit description: "Change the number of results returned.\n e.g. limit=100 will return up to 100 results" - name: page in: query required: false schema: type: integer description: Paginate through results. e.g. page=1 will return first page of results examples: - '1' default: 1 title: Page description: Paginate through results. e.g. page=1 will return first page of results responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/DailyDataResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /v3/sensors/{sensors_id}/days/monthly: get: tags: - Sensors summary: OpenAQ Get measurements aggregated from hour to month by sensor ID description: Provides a list of daily summaries of hourly data by sensor ID operationId: sensor_daily_aggregate_to_month_get_v3_sensors__sensors_id__days_monthly_get security: - APIKeyHeader: [] parameters: - name: sensors_id in: path required: true schema: type: integer description: Limit the results to a specific sensors id title: Sensors Id description: Limit the results to a specific sensors id - name: date_to in: query required: false schema: anyOf: - type: string format: date-time - type: string format: date - type: 'null' description: To when? examples: - '2022-10-01T11:19:38-06:00' - '2022-10-01' title: Date To description: To when? - name: date_from in: query required: false schema: anyOf: - type: string format: date-time - type: string format: date - type: 'null' description: From when? examples: - '2022-10-01T11:19:38-06:00' - '2022-10-01' title: Date From description: From when? - name: limit in: query required: false schema: type: integer description: "Change the number of results returned.\n e.g. limit=100 will return up to 100 results" examples: - '100' default: 100 title: Limit description: "Change the number of results returned.\n e.g. limit=100 will return up to 100 results" - name: page in: query required: false schema: type: integer description: Paginate through results. e.g. page=1 will return first page of results examples: - '1' default: 1 title: Page description: Paginate through results. e.g. page=1 will return first page of results responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/HourlyDataResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /v3/sensors/{sensors_id}/days/yearly: get: tags: - Sensors summary: OpenAQ Get measurements aggregated from day to year by sensor ID description: Provides a list of yearly summaries of daily data by sensor ID operationId: sensor_daily_aggregate_to_year_get_v3_sensors__sensors_id__days_yearly_get security: - APIKeyHeader: [] parameters: - name: sensors_id in: path required: true schema: type: integer description: Limit the results to a specific sensors id title: Sensors Id description: Limit the results to a specific sensors id - name: date_to in: query required: false schema: anyOf: - type: string format: date-time - type: string format: date - type: 'null' description: To when? examples: - '2022-10-01T11:19:38-06:00' - '2022-10-01' title: Date To description: To when? - name: date_from in: query required: false schema: anyOf: - type: string format: date-time - type: string format: date - type: 'null' description: From when? examples: - '2022-10-01T11:19:38-06:00' - '2022-10-01' title: Date From description: From when? - name: limit in: query required: false schema: type: integer description: "Change the number of results returned.\n e.g. limit=100 will return up to 100 results" examples: - '100' default: 100 title: Limit description: "Change the number of results returned.\n e.g. limit=100 will return up to 100 results" - name: page in: query required: false schema: type: integer description: Paginate through results. e.g. page=1 will return first page of results examples: - '1' default: 1 title: Page description: Paginate through results. e.g. page=1 will return first page of results responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/HourlyDataResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /v3/sensors/{sensors_id}/years: get: tags: - Sensors summary: OpenAQ Get measurements aggregated to year by sensor ID description: Provides a list of annual data by sensor ID operationId: sensor_yearly_get_v3_sensors__sensors_id__years_get security: - APIKeyHeader: [] parameters: - name: sensors_id in: path required: true schema: type: integer description: Limit the results to a specific sensors id title: Sensors Id description: Limit the results to a specific sensors id - name: date_to in: query required: false schema: anyOf: - type: string format: date-time - type: string format: date - type: 'null' description: To when? examples: - '2022-10-01T11:19:38-06:00' - '2022-10-01' title: Date To description: To when? - name: date_from in: query required: false schema: anyOf: - type: string format: date-time - type: string format: date - type: 'null' description: From when? examples: - '2022-10-01T11:19:38-06:00' - '2022-10-01' title: Date From description: From when? - name: limit in: query required: false schema: type: integer description: "Change the number of results returned.\n e.g. limit=100 will return up to 100 results" examples: - '100' default: 100 title: Limit description: "Change the number of results returned.\n e.g. limit=100 will return up to 100 results" - name: page in: query required: false schema: type: integer description: Paginate through results. e.g. page=1 will return first page of results examples: - '1' default: 1 title: Page description: Paginate through results. e.g. page=1 will return first page of results responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/AnnualDataResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /v3/locations/{locations_id}/sensors: get: tags: - Sensors summary: OpenAQ Get sensors by location ID description: Provides a list of sensors by location ID operationId: sensors_get_v3_locations__locations_id__sensors_get security: - APIKeyHeader: [] parameters: - name: locations_id in: path required: true schema: type: integer description: Limit the results to a specific sensors id title: Locations Id description: Limit the results to a specific sensors id responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/SensorsResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /v3/sensors/{sensors_id}: get: tags: - Sensors summary: OpenAQ Get a sensor by ID description: Provides a sensor by sensor ID operationId: sensor_get_v3_sensors__sensors_id__get security: - APIKeyHeader: [] parameters: - name: sensors_id in: path required: true schema: type: integer description: Limit the results to a specific sensors id title: Sensors Id description: Limit the results to a specific sensors id responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/SensorsResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /v3/sensors/{sensor_id}/flags: get: tags: - Sensors summary: OpenAQ Get flags by sensor ID description: Provides a list of flags by sensor ID operationId: sensor_flags_get_v3_sensors__sensor_id__flags_get security: - APIKeyHeader: [] parameters: - name: sensor_id in: path required: true schema: type: integer description: Limit the results to a specific sensor title: Sensor Id description: Limit the results to a specific sensor - name: limit in: query required: false schema: type: integer description: "Change the number of results returned.\n e.g. limit=100 will return up to 100 results" examples: - '100' default: 100 title: Limit description: "Change the number of results returned.\n e.g. limit=100 will return up to 100 results" - name: page in: query required: false schema: type: integer description: Paginate through results. e.g. page=1 will return first page of results examples: - '1' default: 1 title: Page description: Paginate through results. e.g. page=1 will return first page of results - name: datetime_from in: query required: false schema: anyOf: - type: string format: date-time - type: string format: date - type: 'null' description: To when? examples: - '2022-10-01T11:19:38-06:00' - '2022-10-01' title: Datetime From description: To when? - name: datetime_to in: query required: false schema: anyOf: - type: string format: date-time - type: string format: date - type: 'null' description: To when? examples: - '2022-10-01T11:19:38-06:00' - '2022-10-01' title: Datetime To description: To when? responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/LocationFlagsResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' components: schemas: HourlyDataResponse: properties: meta: allOf: - $ref: '#/components/schemas/openaq_api__v3__models__responses__Meta' default: limit: 100 name: openaq-api page: 1 website: / results: items: $ref: '#/components/schemas/HourlyData' type: array title: Results type: object required: - results title: HourlyDataResponse LocationFlag: properties: locationId: type: integer title: Locationid flagType: $ref: '#/components/schemas/FlagType' datetimeFrom: $ref: '#/components/schemas/DatetimeObject' datetimeTo: $ref: '#/components/schemas/DatetimeObject' sensorIds: items: type: integer type: array title: Sensorids default: [] note: anyOf: - type: string - type: 'null' title: Note type: object required: - locationId - flagType - datetimeFrom - datetimeTo title: LocationFlag openaq_api__v3__models__responses__MeasurementsResponse: properties: meta: allOf: - $ref: '#/components/schemas/openaq_api__v3__models__responses__Meta' default: limit: 100 name: openaq-api page: 1 website: / results: items: $ref: '#/components/schemas/Measurement' type: array title: Results type: object required: - results title: MeasurementsResponse AnnualDataResponse: properties: meta: allOf: - $ref: '#/components/schemas/openaq_api__v3__models__responses__Meta' default: limit: 100 name: openaq-api page: 1 website: / results: items: $ref: '#/components/schemas/AnnualData' type: array title: Results type: object required: - results title: AnnualDataResponse HourlyData: properties: value: anyOf: - type: number - type: 'null' title: Value flagInfo: $ref: '#/components/schemas/FlagInfo' parameter: $ref: '#/components/schemas/ParameterBase' period: anyOf: - $ref: '#/components/schemas/Period' - type: 'null' coordinates: anyOf: - $ref: '#/components/schemas/Coordinates' - type: 'null' summary: anyOf: - $ref: '#/components/schemas/Summary' - type: 'null' coverage: anyOf: - $ref: '#/components/schemas/Coverage' - type: 'null' type: object required: - flagInfo - parameter title: HourlyData AnnualData: properties: value: anyOf: - type: number - type: 'null' title: Value flagInfo: $ref: '#/components/schemas/FlagInfo' parameter: $ref: '#/components/schemas/ParameterBase' period: anyOf: - $ref: '#/components/schemas/Period' - type: 'null' coordinates: anyOf: - $ref: '#/components/schemas/Coordinates' - type: 'null' summary: anyOf: - $ref: '#/components/schemas/Summary' - type: 'null' coverage: anyOf: - $ref: '#/components/schemas/Coverage' - type: 'null' type: object required: - flagInfo - parameter title: AnnualData FlagType: properties: id: type: integer title: Id label: type: string title: Label level: type: string title: Level type: object required: - id - label - level title: FlagType DailyDataResponse: properties: meta: allOf: - $ref: '#/components/schemas/openaq_api__v3__models__responses__Meta' default: limit: 100 name: openaq-api page: 1 website: / results: items: $ref: '#/components/schemas/DailyData' type: array title: Results type: object required: - results title: DailyDataResponse Sensor: properties: id: type: integer title: Id name: type: string title: Name parameter: $ref: '#/components/schemas/ParameterBase' datetimeFirst: anyOf: - $ref: '#/components/schemas/DatetimeObject' - type: 'null' datetimeLast: anyOf: - $ref: '#/components/schemas/DatetimeObject' - type: 'null' coverage: anyOf: - $ref: '#/components/schemas/Coverage' - type: 'null' latest: anyOf: - $ref: '#/components/schemas/LatestBase' - type: 'null' summary: anyOf: - $ref: '#/components/schemas/Summary' - type: 'null' type: object required: - id - name - parameter title: Sensor Coordinates: properties: latitude: anyOf: - type: number - type: 'null' title: Latitude longitude: anyOf: - type: number - type: 'null' title: Longitude type: object title: Coordinates Summary: properties: min: anyOf: - type: number - type: 'null' title: Min q02: anyOf: - type: number - type: 'null' title: Q02 q25: anyOf: - type: number - type: 'null' title: Q25 median: anyOf: - type: number - type: 'null' title: Median q75: anyOf: - type: number - type: 'null' title: Q75 q98: anyOf: - type: number - type: 'null' title: Q98 max: anyOf: - type: number - type: 'null' title: Max avg: anyOf: - type: number - type: 'null' title: Avg sd: anyOf: - type: number - type: 'null' title: Sd type: object title: Summary ParameterBase: properties: id: type: integer title: Id name: type: string title: Name units: type: string title: Units displayName: anyOf: - type: string - type: 'null' title: Displayname type: object required: - id - name - units title: ParameterBase openaq_api__v3__models__responses__Meta: properties: name: type: string title: Name default: openaq-api website: type: string title: Website default: / page: type: integer title: Page default: 1 limit: type: integer title: Limit default: 100 found: anyOf: - type: integer - type: string - type: 'null' title: Found type: object title: Meta DatetimeObject: properties: utc: type: string format: date-time title: Utc local: type: string format: date-time title: Local type: object required: - utc - local title: DatetimeObject LocationFlagsResponse: properties: meta: allOf: - $ref: '#/components/schemas/openaq_api__v3__models__responses__Meta' default: limit: 100 name: openaq-api page: 1 website: / results: items: $ref: '#/components/schemas/LocationFlag' type: array title: Results type: object required: - results title: LocationFlagsResponse Measurement: properties: value: type: number title: Value flagInfo: $ref: '#/components/schemas/FlagInfo' parameter: $ref: '#/components/schemas/ParameterBase' period: anyOf: - $ref: '#/components/schemas/Period' - type: 'null' coordinates: anyOf: - $ref: '#/components/schemas/Coordinates' - type: 'null' summary: anyOf: - $ref: '#/components/schemas/Summary' - type: 'null' coverage: anyOf: - $ref: '#/components/schemas/Coverage' - type: 'null' type: object required: - value - flagInfo - parameter title: Measurement ValidationError: properties: loc: items: anyOf: - type: string - type: integer type: array title: Location msg: type: string title: Message type: type: string title: Error Type type: object required: - loc - msg - type title: ValidationError FlagInfo: properties: hasFlags: type: boolean title: Hasflags type: object required: - hasFlags title: FlagInfo Period: properties: label: type: string title: Label interval: type: string title: Interval datetimeFrom: anyOf: - $ref: '#/components/schemas/DatetimeObject' - type: 'null' datetimeTo: anyOf: - $ref: '#/components/schemas/DatetimeObject' - type: 'null' type: object required: - label - interval title: Period HTTPValidationError: properties: detail: items: $ref: '#/components/schemas/ValidationError' type: array title: Detail type: object title: HTTPValidationError SensorsResponse: properties: meta: allOf: - $ref: '#/components/schemas/openaq_api__v3__models__responses__Meta' default: limit: 100 name: openaq-api page: 1 website: / results: items: $ref: '#/components/schemas/Sensor' type: array title: Results type: object required: - results title: SensorsResponse Coverage: properties: expectedCount: type: integer title: Expectedcount expectedInterval: type: string title: Expectedinterval observedCount: type: integer title: Observedcount observedInterval: type: string title: Observedinterval percentComplete: type: number title: Percentcomplete percentCoverage: type: number title: Percentcoverage datetimeFrom: anyOf: - $ref: '#/components/schemas/DatetimeObject' - type: 'null' datetimeTo: anyOf: - $ref: '#/components/schemas/DatetimeObject' - type: 'null' type: object required: - expectedCount - expectedInterval - observedCount - observedInterval - percentComplete - percentCoverage title: Coverage LatestBase: properties: datetime: $ref: '#/components/schemas/DatetimeObject' value: type: number title: Value coordinates: $ref: '#/components/schemas/Coordinates' type: object required: - datetime - value - coordinates title: LatestBase DailyData: properties: value: anyOf: - type: number - type: 'null' title: Value flagInfo: $ref: '#/components/schemas/FlagInfo' parameter: $ref: '#/components/schemas/ParameterBase' period: anyOf: - $ref: '#/components/schemas/Period' - type: 'null' coordinates: anyOf: - $ref: '#/components/schemas/Coordinates' - type: 'null' summary: anyOf: - $ref: '#/components/schemas/Summary' - type: 'null' coverage: anyOf: - $ref: '#/components/schemas/Coverage' - type: 'null' type: object required: - flagInfo - parameter title: DailyData securitySchemes: APIKeyHeader: type: apiKey in: header name: X-API-Key