AgentSkillsCN

api-reusability-analytics

检索 API 目录中 API 路径与模式复用模式的相关分析数据。适用于分析 API 的可重用性、检查哪些路径或模式被多个 API 共享、审计 API 设计的一致性,或生成复用报告时使用。当用户提及 API 重用性、路径复用、模式复用、API 目录分析,或需要评估整个产品组合中的 API 设计模式时触发。

SKILL.md
--- frontmatter
name: api-reusability-analytics
description: >
  Retrieve analytics about API path and schema reuse patterns across an API catalog.
  Use this skill when analyzing API reusability, checking which paths or schemas are
  shared across multiple APIs, auditing API design consistency, or generating reuse
  reports. Trigger when the user mentions API reusability, path reuse, schema reuse,
  API catalog analytics, or needs to assess API design patterns across a portfolio.

API Reusability Analytics

Retrieve analytics about API paths and schemas, including usage statistics and reuse patterns across an API catalog.

When to Use

  • Analyzing which API paths are reused across multiple APIs
  • Identifying shared schemas and their usage counts
  • Auditing API design consistency across a catalog
  • Generating reuse and standardization reports

Authentication

Use an API key in the X-API-Key header:

code
X-API-Key: <your_api_key>

Key Endpoints

EndpointMethodPurpose
/pathsGETList all API paths in the catalog
/paths/reuseGETGet path reuse statistics
/paths/allGETAll paths with additional metadata
/schemasGETList all schemas in the catalog
/schemas/reuseGETGet schema reuse statistics (with counts)
/schemas/allGETAll schemas with additional metadata
/catalogGETComplete analytics (paths + schemas + reuse)

Quick Start

For a comprehensive overview, use the /catalog endpoint which returns everything in one call: all paths, all schemas, and reuse statistics for both.

Response Patterns

Path reuse returns items with path and count (minimum count of 2):

json
{"reuse": [{"path": "/users", "count": 5}]}

Schema reuse returns items with schema and count:

json
{"reuse": [{"schema": "Error", "count": 12}, {"schema": "Meta", "count": 4}]}

API Reference

For complete schema details including all response fields and error codes, read references/openapi.yml.