OpenAQ · Capability

OpenAQ — Monthly

OpenAQ — Monthly. 2 operations. Lead operation: OpenAQ Get measurements aggregated from hour to month by sensor ID. Self-contained Naftiko capability covering one Openaq business surface.

Run with Naftiko OpenaqMonthly

What You Can Do

GET
Sensordailyaggregatetomonthgetv3sensorssensorsiddaysmonthlyget — OpenAQ Get measurements aggregated from hour to month by sensor ID
/v1/v3/sensors/{sensors-id}/days/monthly
GET
Sensorhourlymeasurementsaggregatetomonthgetv3sensorssensorsidhoursmonthlyget — OpenAQ Get measurements aggregated from hour to month by sensor ID
/v1/v3/sensors/{sensors-id}/hours/monthly

MCP Tools

openaq-get-measurements-aggregated-hour

OpenAQ Get measurements aggregated from hour to month by sensor ID

read-only idempotent
openaq-get-measurements-aggregated-hour-2

OpenAQ Get measurements aggregated from hour to month by sensor ID

read-only idempotent

Capability Spec

openaq-monthly.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: OpenAQ — Monthly
  description: 'OpenAQ — Monthly. 2 operations. Lead operation: OpenAQ Get measurements aggregated from hour to month by sensor
    ID. Self-contained Naftiko capability covering one Openaq business surface.'
  tags:
  - Openaq
  - Monthly
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    OPENAQ_API_KEY: OPENAQ_API_KEY
capability:
  consumes:
  - type: http
    namespace: openaq-monthly
    baseUri: ''
    description: OpenAQ — Monthly business capability. Self-contained, no shared references.
    resources:
    - name: v3-sensors-sensors_id-days-monthly
      path: /v3/sensors/{sensors_id}/days/monthly
      operations:
      - name: sensordailyaggregatetomonthgetv3sensorssensorsiddaysmonthlyget
        method: GET
        description: OpenAQ Get measurements aggregated from hour to month by sensor ID
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: sensors_id
          in: path
          type: integer
          description: Limit the results to a specific sensors id
          required: true
        - name: date_to
          in: query
          type: string
          description: To when?
        - name: date_from
          in: query
          type: string
          description: From when?
        - 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: v3-sensors-sensors_id-hours-monthly
      path: /v3/sensors/{sensors_id}/hours/monthly
      operations:
      - name: sensorhourlymeasurementsaggregatetomonthgetv3sensorssensorsidhoursmonthlyget
        method: GET
        description: OpenAQ Get measurements aggregated from hour to month by sensor ID
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: sensors_id
          in: path
          type: integer
          description: Limit the results to a specific sensors id
          required: true
        - name: datetime_to
          in: query
          type: string
          description: To when?
        - name: datetime_from
          in: query
          type: string
          description: From when?
        - 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
    authentication:
      type: apikey
      key: X-API-Key
      value: '{{env.OPENAQ_API_KEY}}'
      placement: header
  exposes:
  - type: rest
    namespace: openaq-monthly-rest
    port: 8080
    description: REST adapter for OpenAQ — Monthly. One Spectral-compliant resource per consumed operation, prefixed with
      /v1.
    resources:
    - path: /v1/v3/sensors/{sensors-id}/days/monthly
      name: v3-sensors-sensors-id-days-monthly
      description: REST surface for v3-sensors-sensors_id-days-monthly.
      operations:
      - method: GET
        name: sensordailyaggregatetomonthgetv3sensorssensorsiddaysmonthlyget
        description: OpenAQ Get measurements aggregated from hour to month by sensor ID
        call: openaq-monthly.sensordailyaggregatetomonthgetv3sensorssensorsiddaysmonthlyget
        with:
          sensors_id: rest.sensors_id
          date_to: rest.date_to
          date_from: rest.date_from
          limit: rest.limit
          page: rest.page
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/v3/sensors/{sensors-id}/hours/monthly
      name: v3-sensors-sensors-id-hours-monthly
      description: REST surface for v3-sensors-sensors_id-hours-monthly.
      operations:
      - method: GET
        name: sensorhourlymeasurementsaggregatetomonthgetv3sensorssensorsidhoursmonthlyget
        description: OpenAQ Get measurements aggregated from hour to month by sensor ID
        call: openaq-monthly.sensorhourlymeasurementsaggregatetomonthgetv3sensorssensorsidhoursmonthlyget
        with:
          sensors_id: rest.sensors_id
          datetime_to: rest.datetime_to
          datetime_from: rest.datetime_from
          limit: rest.limit
          page: rest.page
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: openaq-monthly-mcp
    port: 9090
    transport: http
    description: MCP adapter for OpenAQ — Monthly. One tool per consumed operation, routed inline through this capability's
      consumes block.
    tools:
    - name: openaq-get-measurements-aggregated-hour
      description: OpenAQ Get measurements aggregated from hour to month by sensor ID
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: openaq-monthly.sensordailyaggregatetomonthgetv3sensorssensorsiddaysmonthlyget
      with:
        sensors_id: tools.sensors_id
        date_to: tools.date_to
        date_from: tools.date_from
        limit: tools.limit
        page: tools.page
      outputParameters:
      - type: object
        mapping: $.
    - name: openaq-get-measurements-aggregated-hour-2
      description: OpenAQ Get measurements aggregated from hour to month by sensor ID
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: openaq-monthly.sensorhourlymeasurementsaggregatetomonthgetv3sensorssensorsidhoursmonthlyget
      with:
        sensors_id: tools.sensors_id
        datetime_to: tools.datetime_to
        datetime_from: tools.datetime_from
        limit: tools.limit
        page: tools.page
      outputParameters:
      - type: object
        mapping: $.