naftiko: 1.0.0-alpha2 info: label: Cloudsmith API (v1) — metrics description: 'Cloudsmith API (v1) — metrics. 3 operations. Lead operation: View for listing entitlement token metrics, across an account.. Self-contained Naftiko capability covering one Cloudsmith business surface.' tags: - Cloudsmith - metrics created: '2026-05-19' modified: '2026-05-19' binds: - namespace: env keys: CLOUDSMITH_API_KEY: CLOUDSMITH_API_KEY capability: consumes: - type: http namespace: cloudsmith-metrics baseUri: https://api.cloudsmith.io description: Cloudsmith API (v1) — metrics business capability. Self-contained, no shared references. resources: - name: metrics-entitlements-owner path: /metrics/entitlements/{owner}/ operations: - name: metricsentitlementsaccountlist method: GET description: View for listing entitlement token metrics, across an account. outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: page in: query type: integer description: A page number within the paginated result set. - name: page_size in: query type: integer description: Number of results to return per page. - name: finish in: query type: string description: Include metrics upto and including this UTC date or UTC datetime. For example '2020-12-31' or '2021-12-13T00:00:00Z'. - name: start in: query type: string description: Include metrics from and including this UTC date or UTC datetime. For example '2020-12-31' or '2021-12-13T00:00:00Z'. - name: tokens in: query type: string description: A comma seperated list of tokens (slug perm) to include in the results. - name: metrics-entitlements-owner-repo path: /metrics/entitlements/{owner}/{repo}/ operations: - name: metricsentitlementsrepolist method: GET description: View for listing entitlement token metrics, for a repository. outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: page in: query type: integer description: A page number within the paginated result set. - name: page_size in: query type: integer description: Number of results to return per page. - name: finish in: query type: string description: Include metrics upto and including this UTC date or UTC datetime. For example '2020-12-31' or '2021-12-13T00:00:00Z'. - name: start in: query type: string description: Include metrics from and including this UTC date or UTC datetime. For example '2020-12-31' or '2021-12-13T00:00:00Z'. - name: tokens in: query type: string description: A comma seperated list of tokens (slug perm) to include in the results. - name: metrics-packages-owner-repo path: /metrics/packages/{owner}/{repo}/ operations: - name: metricspackageslist method: GET description: View for listing package usage metrics, for a repository. outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: page in: query type: integer description: A page number within the paginated result set. - name: page_size in: query type: integer description: Number of results to return per page. - name: finish in: query type: string description: Include metrics upto and including this UTC date or UTC datetime. For example '2020-12-31' or '2021-12-13T00:00:00Z'. - name: packages in: query type: string description: A comma seperated list of packages (slug perm) to include in the results. - name: start in: query type: string description: Include metrics from and including this UTC date or UTC datetime. For example '2020-12-31' or '2021-12-13T00:00:00Z'. exposes: - type: rest namespace: cloudsmith-metrics-rest port: 8080 description: REST adapter for Cloudsmith API (v1) — metrics. One Spectral-compliant resource per consumed operation, prefixed with /v1. resources: - path: /v1/metrics/entitlements/{owner} name: metrics-entitlements-owner description: REST surface for metrics-entitlements-owner. operations: - method: GET name: metricsentitlementsaccountlist description: View for listing entitlement token metrics, across an account. call: cloudsmith-metrics.metricsentitlementsaccountlist with: page: rest.page page_size: rest.page_size finish: rest.finish start: rest.start tokens: rest.tokens outputParameters: - type: object mapping: $. - path: /v1/metrics/entitlements/{owner}/{repo} name: metrics-entitlements-owner-repo description: REST surface for metrics-entitlements-owner-repo. operations: - method: GET name: metricsentitlementsrepolist description: View for listing entitlement token metrics, for a repository. call: cloudsmith-metrics.metricsentitlementsrepolist with: page: rest.page page_size: rest.page_size finish: rest.finish start: rest.start tokens: rest.tokens outputParameters: - type: object mapping: $. - path: /v1/metrics/packages/{owner}/{repo} name: metrics-packages-owner-repo description: REST surface for metrics-packages-owner-repo. operations: - method: GET name: metricspackageslist description: View for listing package usage metrics, for a repository. call: cloudsmith-metrics.metricspackageslist with: page: rest.page page_size: rest.page_size finish: rest.finish packages: rest.packages start: rest.start outputParameters: - type: object mapping: $. - type: mcp namespace: cloudsmith-metrics-mcp port: 9090 transport: http description: MCP adapter for Cloudsmith API (v1) — metrics. One tool per consumed operation, routed inline through this capability's consumes block. tools: - name: view-listing-entitlement-token-metrics description: View for listing entitlement token metrics, across an account. hints: readOnly: true destructive: false idempotent: true call: cloudsmith-metrics.metricsentitlementsaccountlist with: page: tools.page page_size: tools.page_size finish: tools.finish start: tools.start tokens: tools.tokens outputParameters: - type: object mapping: $. - name: view-listing-entitlement-token-metrics-2 description: View for listing entitlement token metrics, for a repository. hints: readOnly: true destructive: false idempotent: true call: cloudsmith-metrics.metricsentitlementsrepolist with: page: tools.page page_size: tools.page_size finish: tools.finish start: tools.start tokens: tools.tokens outputParameters: - type: object mapping: $. - name: view-listing-package-usage-metrics description: View for listing package usage metrics, for a repository. hints: readOnly: true destructive: false idempotent: true call: cloudsmith-metrics.metricspackageslist with: page: tools.page page_size: tools.page_size finish: tools.finish packages: tools.packages start: tools.start outputParameters: - type: object mapping: $.