naftiko: 1.0.0-alpha2 info: label: Unleash Admin API — Metrics description: 'Unleash Admin API — Metrics. 13 operations. Lead operation: Last Hour of Usage and a List of Applications That Have Reported Seeing This Feature Flag. Self-contained Naftiko capability covering one Unleash business surface.' tags: - Unleash - Metrics created: '2026-05-19' modified: '2026-05-19' binds: - namespace: env keys: UNLEASH_API_KEY: UNLEASH_API_KEY capability: consumes: - type: http namespace: admin-metrics baseUri: https://app.unleash-instance.example.com description: Unleash Admin API — Metrics business capability. Self-contained, no shared references. resources: - name: api-admin-client-metrics-features-name path: /api/admin/client-metrics/features/{name} operations: - name: getfeatureusagesummary method: GET description: Last Hour of Usage and a List of Applications That Have Reported Seeing This Feature Flag outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: name in: path type: string required: true - name: api-admin-client-metrics-features-name-raw path: /api/admin/client-metrics/features/{name}/raw operations: - name: getrawfeaturemetrics method: GET description: Get Feature Metrics outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: name in: path type: string required: true - name: api-admin-custom-metrics path: /api/admin/custom-metrics operations: - name: getcustommetrics method: GET description: Get Stored Custom Metrics outputRawFormat: json outputParameters: - name: result type: object value: $. - name: api-admin-custom-metrics-prometheus path: /api/admin/custom-metrics/prometheus operations: - name: getprometheusmetrics method: GET description: Get Metrics in Prometheus Format outputRawFormat: json outputParameters: - name: result type: object value: $. - name: api-admin-metrics-applications path: /api/admin/metrics/applications operations: - name: getapplications method: GET description: Get All Applications outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: query in: query type: string description: The search query for the application name - name: offset in: query type: string description: The number of applications to skip when returning a page. By default it is set to 0. - name: limit in: query type: string description: The number of applications to return in a page. By default it is set to 1000. - name: sortBy in: query type: string description: The field to sort the results by. By default it is set to "appName". - name: sortOrder in: query type: string description: The sort order for the sortBy. By default it is det to "asc". - name: api-admin-metrics-applications-appName path: /api/admin/metrics/applications/{appName} operations: - name: createapplication method: POST description: Create an Application to Connect Reported Metrics outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: appName in: path type: string required: true - name: body in: body type: object description: Request body (JSON). required: true - name: deleteapplication method: DELETE description: Delete an Application outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: appName in: path type: string required: true - name: getapplication method: GET description: Get Application Data outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: appName in: path type: string required: true - name: api-admin-metrics-applications-appName-overview path: /api/admin/metrics/applications/{appName}/overview operations: - name: getapplicationoverview method: GET description: Get Application Overview outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: appName in: path type: string required: true - name: api-admin-metrics-instances-appName-environment-environment path: /api/admin/metrics/instances/{appName}/environment/{environment} operations: - name: getapplicationenvironmentinstances method: GET description: Get Application Environment Instances (last 24h) outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: appName in: path type: string required: true - name: environment in: path type: string required: true - name: api-admin-metrics-rps path: /api/admin/metrics/rps operations: - name: getrequestspersecond method: GET description: Gets Usage Data outputRawFormat: json outputParameters: - name: result type: object value: $. - name: api-admin-metrics-sdks-outdated path: /api/admin/metrics/sdks/outdated operations: - name: getoutdatedsdks method: GET description: Get Outdated Sdks outputRawFormat: json outputParameters: - name: result type: object value: $. - name: api-admin-metrics-traffic path: /api/admin/metrics/traffic operations: - name: gettrafficdatausageforperiod method: GET description: Get Aggregated Traffic Data for a Given Time Period. outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: grouping in: query type: string description: Whether to aggregate the data by month or by day required: true - name: from in: query type: string description: The starting date of the traffic data usage search in IS:yyyy-MM-dd format required: true - name: to in: query type: string description: The starting date of the traffic data usage search in IS:yyyy-MM-dd format required: true authentication: type: bearer token: '{{env.UNLEASH_API_KEY}}' exposes: - type: rest namespace: admin-metrics-rest port: 8080 description: REST adapter for Unleash Admin API — Metrics. One Spectral-compliant resource per consumed operation, prefixed with /v1. resources: - path: /v1/api/admin/client-metrics/features/{name} name: api-admin-client-metrics-features-name description: REST surface for api-admin-client-metrics-features-name. operations: - method: GET name: getfeatureusagesummary description: Last Hour of Usage and a List of Applications That Have Reported Seeing This Feature Flag call: admin-metrics.getfeatureusagesummary with: name: rest.name outputParameters: - type: object mapping: $. - path: /v1/api/admin/client-metrics/features/{name}/raw name: api-admin-client-metrics-features-name-raw description: REST surface for api-admin-client-metrics-features-name-raw. operations: - method: GET name: getrawfeaturemetrics description: Get Feature Metrics call: admin-metrics.getrawfeaturemetrics with: name: rest.name outputParameters: - type: object mapping: $. - path: /v1/api/admin/custom-metrics name: api-admin-custom-metrics description: REST surface for api-admin-custom-metrics. operations: - method: GET name: getcustommetrics description: Get Stored Custom Metrics call: admin-metrics.getcustommetrics outputParameters: - type: object mapping: $. - path: /v1/api/admin/custom-metrics/prometheus name: api-admin-custom-metrics-prometheus description: REST surface for api-admin-custom-metrics-prometheus. operations: - method: GET name: getprometheusmetrics description: Get Metrics in Prometheus Format call: admin-metrics.getprometheusmetrics outputParameters: - type: object mapping: $. - path: /v1/api/admin/metrics/applications name: api-admin-metrics-applications description: REST surface for api-admin-metrics-applications. operations: - method: GET name: getapplications description: Get All Applications call: admin-metrics.getapplications with: query: rest.query offset: rest.offset limit: rest.limit sortBy: rest.sortBy sortOrder: rest.sortOrder outputParameters: - type: object mapping: $. - path: /v1/api/admin/metrics/applications/{appname} name: api-admin-metrics-applications-appname description: REST surface for api-admin-metrics-applications-appName. operations: - method: POST name: createapplication description: Create an Application to Connect Reported Metrics call: admin-metrics.createapplication with: appName: rest.appName body: rest.body outputParameters: - type: object mapping: $. - method: DELETE name: deleteapplication description: Delete an Application call: admin-metrics.deleteapplication with: appName: rest.appName outputParameters: - type: object mapping: $. - method: GET name: getapplication description: Get Application Data call: admin-metrics.getapplication with: appName: rest.appName outputParameters: - type: object mapping: $. - path: /v1/api/admin/metrics/applications/{appname}/overview name: api-admin-metrics-applications-appname-overview description: REST surface for api-admin-metrics-applications-appName-overview. operations: - method: GET name: getapplicationoverview description: Get Application Overview call: admin-metrics.getapplicationoverview with: appName: rest.appName outputParameters: - type: object mapping: $. - path: /v1/api/admin/metrics/instances/{appname}/environment/{environment} name: api-admin-metrics-instances-appname-environment-environment description: REST surface for api-admin-metrics-instances-appName-environment-environment. operations: - method: GET name: getapplicationenvironmentinstances description: Get Application Environment Instances (last 24h) call: admin-metrics.getapplicationenvironmentinstances with: appName: rest.appName environment: rest.environment outputParameters: - type: object mapping: $. - path: /v1/api/admin/metrics/rps name: api-admin-metrics-rps description: REST surface for api-admin-metrics-rps. operations: - method: GET name: getrequestspersecond description: Gets Usage Data call: admin-metrics.getrequestspersecond outputParameters: - type: object mapping: $. - path: /v1/api/admin/metrics/sdks/outdated name: api-admin-metrics-sdks-outdated description: REST surface for api-admin-metrics-sdks-outdated. operations: - method: GET name: getoutdatedsdks description: Get Outdated Sdks call: admin-metrics.getoutdatedsdks outputParameters: - type: object mapping: $. - path: /v1/api/admin/metrics/traffic name: api-admin-metrics-traffic description: REST surface for api-admin-metrics-traffic. operations: - method: GET name: gettrafficdatausageforperiod description: Get Aggregated Traffic Data for a Given Time Period. call: admin-metrics.gettrafficdatausageforperiod with: grouping: rest.grouping from: rest.from to: rest.to outputParameters: - type: object mapping: $. - type: mcp namespace: admin-metrics-mcp port: 9090 transport: http description: MCP adapter for Unleash Admin API — Metrics. One tool per consumed operation, routed inline through this capability's consumes block. tools: - name: last-hour-usage-and-list description: Last Hour of Usage and a List of Applications That Have Reported Seeing This Feature Flag hints: readOnly: true destructive: false idempotent: true call: admin-metrics.getfeatureusagesummary with: name: tools.name outputParameters: - type: object mapping: $. - name: get-feature-metrics description: Get Feature Metrics hints: readOnly: true destructive: false idempotent: true call: admin-metrics.getrawfeaturemetrics with: name: tools.name outputParameters: - type: object mapping: $. - name: get-stored-custom-metrics description: Get Stored Custom Metrics hints: readOnly: true destructive: false idempotent: true call: admin-metrics.getcustommetrics outputParameters: - type: object mapping: $. - name: get-metrics-prometheus-format description: Get Metrics in Prometheus Format hints: readOnly: true destructive: false idempotent: true call: admin-metrics.getprometheusmetrics outputParameters: - type: object mapping: $. - name: get-all-applications description: Get All Applications hints: readOnly: true destructive: false idempotent: true call: admin-metrics.getapplications with: query: tools.query offset: tools.offset limit: tools.limit sortBy: tools.sortBy sortOrder: tools.sortOrder outputParameters: - type: object mapping: $. - name: create-application-connect-reported-metrics description: Create an Application to Connect Reported Metrics hints: readOnly: false destructive: false idempotent: false call: admin-metrics.createapplication with: appName: tools.appName body: tools.body outputParameters: - type: object mapping: $. - name: delete-application description: Delete an Application hints: readOnly: false destructive: true idempotent: true call: admin-metrics.deleteapplication with: appName: tools.appName outputParameters: - type: object mapping: $. - name: get-application-data description: Get Application Data hints: readOnly: true destructive: false idempotent: true call: admin-metrics.getapplication with: appName: tools.appName outputParameters: - type: object mapping: $. - name: get-application-overview description: Get Application Overview hints: readOnly: true destructive: false idempotent: true call: admin-metrics.getapplicationoverview with: appName: tools.appName outputParameters: - type: object mapping: $. - name: get-application-environment-instances-last description: Get Application Environment Instances (last 24h) hints: readOnly: true destructive: false idempotent: true call: admin-metrics.getapplicationenvironmentinstances with: appName: tools.appName environment: tools.environment outputParameters: - type: object mapping: $. - name: gets-usage-data description: Gets Usage Data hints: readOnly: true destructive: false idempotent: true call: admin-metrics.getrequestspersecond outputParameters: - type: object mapping: $. - name: get-outdated-sdks description: Get Outdated Sdks hints: readOnly: true destructive: false idempotent: true call: admin-metrics.getoutdatedsdks outputParameters: - type: object mapping: $. - name: get-aggregated-traffic-data-given description: Get Aggregated Traffic Data for a Given Time Period. hints: readOnly: true destructive: false idempotent: true call: admin-metrics.gettrafficdatausageforperiod with: grouping: tools.grouping from: tools.from to: tools.to outputParameters: - type: object mapping: $.