naftiko: 1.0.0-alpha2 info: label: OpenAQ — Latest description: 'OpenAQ — Latest. 6 operations. Lead operation: OpenAQ Get latest measurements. Self-contained Naftiko capability covering one Openaq business surface.' tags: - Openaq - Latest created: '2026-05-19' modified: '2026-05-19' binds: - namespace: env keys: OPENAQ_API_KEY: OPENAQ_API_KEY capability: consumes: - type: http namespace: openaq-latest baseUri: '' description: OpenAQ — Latest business capability. Self-contained, no shared references. resources: - name: v1-latest path: /v1/latest operations: - name: latestv1getv1latestget method: GET description: OpenAQ Get latest measurements outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: limit in: query type: string description: Change the number of results returned. e.g. limit=1000 will return up to 1000 results - name: page in: query type: string description: Paginate through results. e.g. page=1 will return first page of results - name: offset in: query type: string - name: sort in: query type: string description: Sort Direction e.g. sort=desc - name: parameter_id in: query type: string description: (optional) A parameter ID to filter measurement results. e.g. parameter_id=2 (i.e. PM2.5) will limit measurement results to only PM2.5 measurements - name: parameter in: query type: string description: (optional) A parameter name or ID by which to filter measurement results. e.g. parameter=pm25 or parameter=pm25¶meter=pm10 - name: unit in: query type: string - name: coordinates in: query type: string description: Coordinate pair in form lat,lng. Up to 8 decimal points of precision e.g. 38.907,-77.037 - name: radius in: query type: integer description: Search radius from coordinates as center in meters. Maximum of 25,000 (25km) defaults to 1000 (1km) e.g. radius=10000 - name: country_id in: query type: string description: Limit results by a certain country using two digit country ID. e.g. 13 - name: country in: query type: string description: Limit results by a certain country using two letter country code. e.g. ?country=US or ?country=US&country=MX - name: city in: query type: string description: Limit results by a certain city or cities. (e.g. ?city=Chicago or ?city=Chicago&city=Boston) - name: location_id in: query type: string - name: location in: query type: string - name: order_by in: query type: string description: Order by a field - name: is_mobile in: query type: string description: Location is mobile e.g. ?isMobile=true - name: is_analysis in: query type: string description: Data is the product of a previous analysis/aggregation and not raw measurements e.g. ?isAnalysis=true - name: source_name in: query type: string description: Name of the data source e.g. ?sourceName=Houston%20Mobile - name: entity in: query type: string description: Source entity type. e.g. ?entity=government - name: sensor_type in: query type: string description: Type of Sensor e.g. ?sensorType=reference%20grade - name: model_name in: query type: string description: Model Name of Sensor e.g. ?modelName=AE33 - name: manufacturer_name in: query type: string description: Manufacturer of Sensor e.g. ?manufacturer=Ecotech - name: dump_raw in: query type: string - name: v1-latest-location_id path: /v1/latest/{location_id} operations: - name: getv1latestbyidv1latestlocationidget method: GET description: OpenAQ Get latest measurements by location ID outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: location_id in: path type: integer description: The ID of the location required: true - name: limit in: query type: string description: Change the number of results returned. e.g. limit=1000 will return up to 1000 results - name: page in: query type: string description: Paginate through results. e.g. page=1 will return first page of results - name: offset in: query type: string - name: sort in: query type: string description: Define sort order. e.g. ?sort=asc - name: v2-latest path: /v2/latest operations: - name: latestgetv2latestget method: GET description: OpenAQ Get latest measurements outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: limit in: query type: string - name: page in: query type: string - name: offset in: query type: string - name: sort in: query type: string - name: parameter_id in: query type: string - name: coordinates in: query type: string - name: radius in: query type: integer - name: country_id in: query type: string - name: order_by in: query type: string - name: is_mobile in: query type: string - name: is_analysis in: query type: string - name: entity in: query type: string - name: sensor_type in: query type: string - name: dump_raw in: query type: string - name: body in: body type: object description: Request body (JSON). required: false - name: v2-latest-location_id path: /v2/latest/{location_id} operations: - name: getv2latestbyidv2latestlocationidget method: GET description: OpenAQ Get latest measurements by location ID outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: location_id in: path type: integer description: The ID of the location required: true - name: limit in: query type: string description: Change the number of results returned. e.g. limit=1000 will return up to 1000 results - name: page in: query type: string description: Paginate through results. e.g. page=1 will return first page of results - name: offset in: query type: string - name: sort in: query type: string description: Define sort order. e.g. ?sort=asc - name: v3-locations-locations_id-latest path: /v3/locations/{locations_id}/latest operations: - name: locationlatestgetv3locationslocationsidlatestget method: GET description: OpenAQ Get a location's latest measurements outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: locations_id in: path type: integer description: Limit the results to a specific location by id required: true - name: limit in: query type: integer description: Change the number of results returned. - name: page in: query type: integer description: Paginate through results. e.g. page=1 will return first page of results - name: datetime_min in: query type: string description: Minimum datetime - name: v3-parameters-parameters_id-latest path: /v3/parameters/{parameters_id}/latest operations: - name: parameterslatestgetv3parametersparametersidlatestget method: GET description: OpenAQ Parameters Latest Get outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: parameters_id in: path type: integer description: Limit the results to a specific parameters id required: true - name: limit in: query type: integer description: Change the number of results returned. - name: page in: query type: integer description: Paginate through results. e.g. page=1 will return first page of results - name: datetime_min in: query type: string description: Minimum datetime authentication: type: apikey key: X-API-Key value: '{{env.OPENAQ_API_KEY}}' placement: header exposes: - type: rest namespace: openaq-latest-rest port: 8080 description: REST adapter for OpenAQ — Latest. One Spectral-compliant resource per consumed operation, prefixed with /v1. resources: - path: /v1/v1/latest name: v1-latest description: REST surface for v1-latest. operations: - method: GET name: latestv1getv1latestget description: OpenAQ Get latest measurements call: openaq-latest.latestv1getv1latestget with: limit: rest.limit page: rest.page offset: rest.offset sort: rest.sort parameter_id: rest.parameter_id parameter: rest.parameter unit: rest.unit coordinates: rest.coordinates radius: rest.radius country_id: rest.country_id country: rest.country city: rest.city location_id: rest.location_id location: rest.location order_by: rest.order_by is_mobile: rest.is_mobile is_analysis: rest.is_analysis source_name: rest.source_name entity: rest.entity sensor_type: rest.sensor_type model_name: rest.model_name manufacturer_name: rest.manufacturer_name dump_raw: rest.dump_raw outputParameters: - type: object mapping: $. - path: /v1/v1/latest/{location-id} name: v1-latest-location-id description: REST surface for v1-latest-location_id. operations: - method: GET name: getv1latestbyidv1latestlocationidget description: OpenAQ Get latest measurements by location ID call: openaq-latest.getv1latestbyidv1latestlocationidget with: location_id: rest.location_id limit: rest.limit page: rest.page offset: rest.offset sort: rest.sort outputParameters: - type: object mapping: $. - path: /v1/v2/latest name: v2-latest description: REST surface for v2-latest. operations: - method: GET name: latestgetv2latestget description: OpenAQ Get latest measurements call: openaq-latest.latestgetv2latestget with: limit: rest.limit page: rest.page offset: rest.offset sort: rest.sort parameter_id: rest.parameter_id coordinates: rest.coordinates radius: rest.radius country_id: rest.country_id order_by: rest.order_by is_mobile: rest.is_mobile is_analysis: rest.is_analysis entity: rest.entity sensor_type: rest.sensor_type dump_raw: rest.dump_raw body: rest.body outputParameters: - type: object mapping: $. - path: /v1/v2/latest/{location-id} name: v2-latest-location-id description: REST surface for v2-latest-location_id. operations: - method: GET name: getv2latestbyidv2latestlocationidget description: OpenAQ Get latest measurements by location ID call: openaq-latest.getv2latestbyidv2latestlocationidget with: location_id: rest.location_id limit: rest.limit page: rest.page offset: rest.offset sort: rest.sort outputParameters: - type: object mapping: $. - path: /v1/v3/locations/{locations-id}/latest name: v3-locations-locations-id-latest description: REST surface for v3-locations-locations_id-latest. operations: - method: GET name: locationlatestgetv3locationslocationsidlatestget description: OpenAQ Get a location's latest measurements call: openaq-latest.locationlatestgetv3locationslocationsidlatestget with: locations_id: rest.locations_id limit: rest.limit page: rest.page datetime_min: rest.datetime_min outputParameters: - type: object mapping: $. - path: /v1/v3/parameters/{parameters-id}/latest name: v3-parameters-parameters-id-latest description: REST surface for v3-parameters-parameters_id-latest. operations: - method: GET name: parameterslatestgetv3parametersparametersidlatestget description: OpenAQ Parameters Latest Get call: openaq-latest.parameterslatestgetv3parametersparametersidlatestget with: parameters_id: rest.parameters_id limit: rest.limit page: rest.page datetime_min: rest.datetime_min outputParameters: - type: object mapping: $. - type: mcp namespace: openaq-latest-mcp port: 9090 transport: http description: MCP adapter for OpenAQ — Latest. One tool per consumed operation, routed inline through this capability's consumes block. tools: - name: openaq-get-latest-measurements description: OpenAQ Get latest measurements hints: readOnly: true destructive: false idempotent: true call: openaq-latest.latestv1getv1latestget with: limit: tools.limit page: tools.page offset: tools.offset sort: tools.sort parameter_id: tools.parameter_id parameter: tools.parameter unit: tools.unit coordinates: tools.coordinates radius: tools.radius country_id: tools.country_id country: tools.country city: tools.city location_id: tools.location_id location: tools.location order_by: tools.order_by is_mobile: tools.is_mobile is_analysis: tools.is_analysis source_name: tools.source_name entity: tools.entity sensor_type: tools.sensor_type model_name: tools.model_name manufacturer_name: tools.manufacturer_name dump_raw: tools.dump_raw outputParameters: - type: object mapping: $. - name: openaq-get-latest-measurements-location description: OpenAQ Get latest measurements by location ID hints: readOnly: true destructive: false idempotent: true call: openaq-latest.getv1latestbyidv1latestlocationidget with: location_id: tools.location_id limit: tools.limit page: tools.page offset: tools.offset sort: tools.sort outputParameters: - type: object mapping: $. - name: openaq-get-latest-measurements-2 description: OpenAQ Get latest measurements hints: readOnly: true destructive: false idempotent: true call: openaq-latest.latestgetv2latestget with: limit: tools.limit page: tools.page offset: tools.offset sort: tools.sort parameter_id: tools.parameter_id coordinates: tools.coordinates radius: tools.radius country_id: tools.country_id order_by: tools.order_by is_mobile: tools.is_mobile is_analysis: tools.is_analysis entity: tools.entity sensor_type: tools.sensor_type dump_raw: tools.dump_raw body: tools.body outputParameters: - type: object mapping: $. - name: openaq-get-latest-measurements-location-2 description: OpenAQ Get latest measurements by location ID hints: readOnly: true destructive: false idempotent: true call: openaq-latest.getv2latestbyidv2latestlocationidget with: location_id: tools.location_id limit: tools.limit page: tools.page offset: tools.offset sort: tools.sort outputParameters: - type: object mapping: $. - name: openaq-get-location-s-latest-measurements description: OpenAQ Get a location's latest measurements hints: readOnly: true destructive: false idempotent: true call: openaq-latest.locationlatestgetv3locationslocationsidlatestget with: locations_id: tools.locations_id limit: tools.limit page: tools.page datetime_min: tools.datetime_min outputParameters: - type: object mapping: $. - name: openaq-parameters-latest-get description: OpenAQ Parameters Latest Get hints: readOnly: true destructive: false idempotent: true call: openaq-latest.parameterslatestgetv3parametersparametersidlatestget with: parameters_id: tools.parameters_id limit: tools.limit page: tools.page datetime_min: tools.datetime_min outputParameters: - type: object mapping: $.