naftiko: 1.0.0-alpha2 info: label: ZAP API — stats description: 'ZAP API — stats. 13 operations. Lead operation: stats. Self-contained Naftiko capability covering one Owasp Zap business surface.' tags: - Owasp Zap - stats created: '2026-05-19' modified: '2026-05-19' binds: - namespace: env keys: OWASP_ZAP_API_KEY: OWASP_ZAP_API_KEY capability: consumes: - type: http namespace: owasp-zap-stats baseUri: http://zap description: ZAP API — stats business capability. Self-contained, no shared references. resources: - name: JSON-stats-action-clearStats path: /JSON/stats/action/clearStats/ operations: - name: statsactionclearstats method: GET description: Clears all of the statistics outputRawFormat: json outputParameters: - name: result type: object value: $. - name: JSON-stats-action-setOptionInMemoryEnabled path: /JSON/stats/action/setOptionInMemoryEnabled/ operations: - name: statsactionsetoptioninmemoryenabled method: GET description: Sets whether in memory statistics are enabled outputRawFormat: json outputParameters: - name: result type: object value: $. - name: JSON-stats-action-setOptionStatsdHost path: /JSON/stats/action/setOptionStatsdHost/ operations: - name: statsactionsetoptionstatsdhost method: GET description: Sets the Statsd service hostname, supply an empty string to stop using a Statsd service outputRawFormat: json outputParameters: - name: result type: object value: $. - name: JSON-stats-action-setOptionStatsdPort path: /JSON/stats/action/setOptionStatsdPort/ operations: - name: statsactionsetoptionstatsdport method: GET description: Sets the Statsd service port outputRawFormat: json outputParameters: - name: result type: object value: $. - name: JSON-stats-action-setOptionStatsdPrefix path: /JSON/stats/action/setOptionStatsdPrefix/ operations: - name: statsactionsetoptionstatsdprefix method: GET description: Sets the prefix to be applied to all stats sent to the configured Statsd service outputRawFormat: json outputParameters: - name: result type: object value: $. - name: JSON-stats-view-allSitesStats path: /JSON/stats/view/allSitesStats/ operations: - name: statsviewallsitesstats method: GET description: Gets all of the site based statistics, optionally filtered by a key prefix outputRawFormat: json outputParameters: - name: result type: object value: $. - name: JSON-stats-view-optionInMemoryEnabled path: /JSON/stats/view/optionInMemoryEnabled/ operations: - name: statsviewoptioninmemoryenabled method: GET description: Returns 'true' if in memory statistics are enabled, otherwise returns 'false' outputRawFormat: json outputParameters: - name: result type: object value: $. - name: JSON-stats-view-optionStatsdEnabled path: /JSON/stats/view/optionStatsdEnabled/ operations: - name: statsviewoptionstatsdenabled method: GET description: Returns 'true' if a Statsd server has been correctly configured, otherwise returns 'false' outputRawFormat: json outputParameters: - name: result type: object value: $. - name: JSON-stats-view-optionStatsdHost path: /JSON/stats/view/optionStatsdHost/ operations: - name: statsviewoptionstatsdhost method: GET description: Gets the Statsd service hostname outputRawFormat: json outputParameters: - name: result type: object value: $. - name: JSON-stats-view-optionStatsdPort path: /JSON/stats/view/optionStatsdPort/ operations: - name: statsviewoptionstatsdport method: GET description: Gets the Statsd service port outputRawFormat: json outputParameters: - name: result type: object value: $. - name: JSON-stats-view-optionStatsdPrefix path: /JSON/stats/view/optionStatsdPrefix/ operations: - name: statsviewoptionstatsdprefix method: GET description: Gets the prefix to be applied to all stats sent to the configured Statsd service outputRawFormat: json outputParameters: - name: result type: object value: $. - name: JSON-stats-view-siteStats path: /JSON/stats/view/siteStats/ operations: - name: statsviewsitestats method: GET description: Gets all of the global statistics, optionally filtered by a key prefix outputRawFormat: json outputParameters: - name: result type: object value: $. - name: JSON-stats-view-stats path: /JSON/stats/view/stats/ operations: - name: statsviewstats method: GET description: Statistics outputRawFormat: json outputParameters: - name: result type: object value: $. authentication: type: apikey key: X-ZAP-API-Key value: '{{env.OWASP_ZAP_API_KEY}}' placement: header exposes: - type: rest namespace: owasp-zap-stats-rest port: 8080 description: REST adapter for ZAP API — stats. One Spectral-compliant resource per consumed operation, prefixed with /v1. resources: - path: /v1/json/stats/action/clearstats name: json-stats-action-clearstats description: REST surface for JSON-stats-action-clearStats. operations: - method: GET name: statsactionclearstats description: Clears all of the statistics call: owasp-zap-stats.statsactionclearstats outputParameters: - type: object mapping: $. - path: /v1/json/stats/action/setoptioninmemoryenabled name: json-stats-action-setoptioninmemoryenabled description: REST surface for JSON-stats-action-setOptionInMemoryEnabled. operations: - method: GET name: statsactionsetoptioninmemoryenabled description: Sets whether in memory statistics are enabled call: owasp-zap-stats.statsactionsetoptioninmemoryenabled outputParameters: - type: object mapping: $. - path: /v1/json/stats/action/setoptionstatsdhost name: json-stats-action-setoptionstatsdhost description: REST surface for JSON-stats-action-setOptionStatsdHost. operations: - method: GET name: statsactionsetoptionstatsdhost description: Sets the Statsd service hostname, supply an empty string to stop using a Statsd service call: owasp-zap-stats.statsactionsetoptionstatsdhost outputParameters: - type: object mapping: $. - path: /v1/json/stats/action/setoptionstatsdport name: json-stats-action-setoptionstatsdport description: REST surface for JSON-stats-action-setOptionStatsdPort. operations: - method: GET name: statsactionsetoptionstatsdport description: Sets the Statsd service port call: owasp-zap-stats.statsactionsetoptionstatsdport outputParameters: - type: object mapping: $. - path: /v1/json/stats/action/setoptionstatsdprefix name: json-stats-action-setoptionstatsdprefix description: REST surface for JSON-stats-action-setOptionStatsdPrefix. operations: - method: GET name: statsactionsetoptionstatsdprefix description: Sets the prefix to be applied to all stats sent to the configured Statsd service call: owasp-zap-stats.statsactionsetoptionstatsdprefix outputParameters: - type: object mapping: $. - path: /v1/json/stats/view/allsitesstats name: json-stats-view-allsitesstats description: REST surface for JSON-stats-view-allSitesStats. operations: - method: GET name: statsviewallsitesstats description: Gets all of the site based statistics, optionally filtered by a key prefix call: owasp-zap-stats.statsviewallsitesstats outputParameters: - type: object mapping: $. - path: /v1/json/stats/view/optioninmemoryenabled name: json-stats-view-optioninmemoryenabled description: REST surface for JSON-stats-view-optionInMemoryEnabled. operations: - method: GET name: statsviewoptioninmemoryenabled description: Returns 'true' if in memory statistics are enabled, otherwise returns 'false' call: owasp-zap-stats.statsviewoptioninmemoryenabled outputParameters: - type: object mapping: $. - path: /v1/json/stats/view/optionstatsdenabled name: json-stats-view-optionstatsdenabled description: REST surface for JSON-stats-view-optionStatsdEnabled. operations: - method: GET name: statsviewoptionstatsdenabled description: Returns 'true' if a Statsd server has been correctly configured, otherwise returns 'false' call: owasp-zap-stats.statsviewoptionstatsdenabled outputParameters: - type: object mapping: $. - path: /v1/json/stats/view/optionstatsdhost name: json-stats-view-optionstatsdhost description: REST surface for JSON-stats-view-optionStatsdHost. operations: - method: GET name: statsviewoptionstatsdhost description: Gets the Statsd service hostname call: owasp-zap-stats.statsviewoptionstatsdhost outputParameters: - type: object mapping: $. - path: /v1/json/stats/view/optionstatsdport name: json-stats-view-optionstatsdport description: REST surface for JSON-stats-view-optionStatsdPort. operations: - method: GET name: statsviewoptionstatsdport description: Gets the Statsd service port call: owasp-zap-stats.statsviewoptionstatsdport outputParameters: - type: object mapping: $. - path: /v1/json/stats/view/optionstatsdprefix name: json-stats-view-optionstatsdprefix description: REST surface for JSON-stats-view-optionStatsdPrefix. operations: - method: GET name: statsviewoptionstatsdprefix description: Gets the prefix to be applied to all stats sent to the configured Statsd service call: owasp-zap-stats.statsviewoptionstatsdprefix outputParameters: - type: object mapping: $. - path: /v1/json/stats/view/sitestats name: json-stats-view-sitestats description: REST surface for JSON-stats-view-siteStats. operations: - method: GET name: statsviewsitestats description: Gets all of the global statistics, optionally filtered by a key prefix call: owasp-zap-stats.statsviewsitestats outputParameters: - type: object mapping: $. - path: /v1/json/stats/view/stats name: json-stats-view-stats description: REST surface for JSON-stats-view-stats. operations: - method: GET name: statsviewstats description: Statistics call: owasp-zap-stats.statsviewstats outputParameters: - type: object mapping: $. - type: mcp namespace: owasp-zap-stats-mcp port: 9090 transport: http description: MCP adapter for ZAP API — stats. One tool per consumed operation, routed inline through this capability's consumes block. tools: - name: clears-all-statistics description: Clears all of the statistics hints: readOnly: true destructive: false idempotent: true call: owasp-zap-stats.statsactionclearstats outputParameters: - type: object mapping: $. - name: sets-whether-memory-statistics-are description: Sets whether in memory statistics are enabled hints: readOnly: true destructive: false idempotent: true call: owasp-zap-stats.statsactionsetoptioninmemoryenabled outputParameters: - type: object mapping: $. - name: sets-statsd-service-hostname-supply description: Sets the Statsd service hostname, supply an empty string to stop using a Statsd service hints: readOnly: true destructive: false idempotent: true call: owasp-zap-stats.statsactionsetoptionstatsdhost outputParameters: - type: object mapping: $. - name: sets-statsd-service-port description: Sets the Statsd service port hints: readOnly: true destructive: false idempotent: true call: owasp-zap-stats.statsactionsetoptionstatsdport outputParameters: - type: object mapping: $. - name: sets-prefix-be-applied-all description: Sets the prefix to be applied to all stats sent to the configured Statsd service hints: readOnly: true destructive: false idempotent: true call: owasp-zap-stats.statsactionsetoptionstatsdprefix outputParameters: - type: object mapping: $. - name: gets-all-site-based-statistics description: Gets all of the site based statistics, optionally filtered by a key prefix hints: readOnly: true destructive: false idempotent: true call: owasp-zap-stats.statsviewallsitesstats outputParameters: - type: object mapping: $. - name: returns-true-if-memory-statistics description: Returns 'true' if in memory statistics are enabled, otherwise returns 'false' hints: readOnly: true destructive: false idempotent: true call: owasp-zap-stats.statsviewoptioninmemoryenabled outputParameters: - type: object mapping: $. - name: returns-true-if-statsd-server description: Returns 'true' if a Statsd server has been correctly configured, otherwise returns 'false' hints: readOnly: true destructive: false idempotent: true call: owasp-zap-stats.statsviewoptionstatsdenabled outputParameters: - type: object mapping: $. - name: gets-statsd-service-hostname description: Gets the Statsd service hostname hints: readOnly: true destructive: false idempotent: true call: owasp-zap-stats.statsviewoptionstatsdhost outputParameters: - type: object mapping: $. - name: gets-statsd-service-port description: Gets the Statsd service port hints: readOnly: true destructive: false idempotent: true call: owasp-zap-stats.statsviewoptionstatsdport outputParameters: - type: object mapping: $. - name: gets-prefix-be-applied-all description: Gets the prefix to be applied to all stats sent to the configured Statsd service hints: readOnly: true destructive: false idempotent: true call: owasp-zap-stats.statsviewoptionstatsdprefix outputParameters: - type: object mapping: $. - name: gets-all-global-statistics-optionally description: Gets all of the global statistics, optionally filtered by a key prefix hints: readOnly: true destructive: false idempotent: true call: owasp-zap-stats.statsviewsitestats outputParameters: - type: object mapping: $. - name: statistics description: Statistics hints: readOnly: true destructive: false idempotent: true call: owasp-zap-stats.statsviewstats outputParameters: - type: object mapping: $.