1---2name: legacy-api-modernization3enabled: true4description: |5 Use when performing legacy api modernization — guides the modernization of6 legacy APIs (SOAP, XML-RPC, proprietary protocols) to modern RESTful or7 GraphQL interfaces. Covers API discovery, contract analysis, versioning8 strategy, backward compatibility, consumer migration, and deprecation9 planning.10required_connections:11 - prefix: api-gateway12 label: "API Gateway"13config_fields:14 - key: legacy_api_type15 label: "Legacy API Type"16 required: true17 placeholder: "e.g., SOAP, XML-RPC, proprietary REST"18 - key: target_api_style19 label: "Target API Style"20 required: true21 placeholder: "e.g., REST, GraphQL, gRPC"22 - key: consumer_count23 label: "Number of API Consumers"24 required: false25 placeholder: "e.g., 15"26features:27 - CLOUD_MIGRATION28 - API29 - MODERNIZATION30metadata:31 source: https://skillmd.com/skills/cloudthinker-ai/legacy-api-modernization32---3334# Legacy API Modernization Plan3536## Phase 1: API Discovery & Analysis371. Catalog all legacy API endpoints38 - [ ] Endpoint URLs and methods39 - [ ] Request/response schemas (WSDL, XSD, etc.)40 - [ ] Authentication mechanisms41 - [ ] Rate limits and SLAs42 - [ ] Error handling patterns432. Identify all API consumers and their usage patterns443. Document business logic embedded in API layer454. Measure current traffic volumes and latency baselines4647### Consumer Impact Matrix4849| Consumer | Endpoints Used | Traffic Volume | Migration Difficulty | Priority |50|----------|---------------|----------------|---------------------|----------|51| | | req/day | Low/Med/High | 1-5 |5253## Phase 2: Modern API Design541. Design resource-oriented API structure (REST) or schema (GraphQL)552. Define OpenAPI / GraphQL schema specification563. Plan versioning strategy (URL path, header, query param)574. Design authentication flow (OAuth 2.0, API keys, JWT)585. Define rate limiting and throttling policies596. Plan pagination, filtering, and sorting patterns6061### Endpoint Mapping6263| Legacy Endpoint | Modern Endpoint | Method | Breaking Change | Adapter Needed |64|----------------|-----------------|--------|-----------------|----------------|65| | | | Yes/No | Yes/No |6667## Phase 3: Adapter Layer Implementation681. Build adapter/facade layer between legacy and modern APIs692. Implement request/response transformation logic703. Handle data format conversion (XML to JSON, etc.)714. Maintain backward compatibility through the adapter725. Add comprehensive logging for both old and new paths7374## Phase 4: Modern API Implementation751. Implement modern API endpoints762. Write comprehensive API tests (unit, integration, contract)773. Set up API documentation (Swagger UI, GraphQL Playground)784. Configure API gateway routing795. Implement monitoring and alerting8081## Phase 5: Consumer Migration821. Publish migration guide and updated SDK/client libraries832. Provide sandbox environment for consumer testing843. Migrate consumers in waves, starting with internal teams854. Monitor error rates per consumer during migration865. Provide support window for each migration wave8788## Phase 6: Deprecation & Decommission891. Announce deprecation timeline for legacy endpoints902. Add deprecation headers to legacy API responses913. Monitor remaining legacy traffic924. Remove adapter layer after all consumers migrated935. Decommission legacy API infrastructure9495## Counter-Rationalizations9697| Shortcut | Counter | Why |98|----------|---------|-----|99| "We can skip some steps for this case" | Adapt the workflow steps, don't skip them | Skipped steps are where incidents and oversights originate |100| "The user seems to already know what to do" | Complete all workflow phases with the user | The workflow catches blind spots that experience alone misses |101| "This is a minor case, full process is overkill" | Scale the process down, don't turn it off | Minor cases become major when unstructured; the process scales, not disappears |102| "I'll fill in the details later" | Complete each section before moving on | Deferred details are forgotten; real-time capture is more accurate |103| "The template output isn't necessary" | Always produce the structured output format | Structured output enables comparison, audit trails, and handoff to other teams |104105## Output Format106- **API Inventory**: Complete catalog of legacy endpoints and consumers107- **Modern API Specification**: OpenAPI/GraphQL schema document108- **Migration Guide**: Consumer-facing documentation for migration109- **Adapter Architecture**: Design for backward-compatible transition110- **Deprecation Timeline**: Phased schedule with milestones111112## Action Items113- [ ] Complete legacy API discovery and consumer mapping114- [ ] Design and review modern API specification115- [ ] Build adapter layer with backward compatibility116- [ ] Deploy modern API to staging for consumer testing117- [ ] Migrate consumers in planned waves118- [ ] Enforce deprecation dates and decommission legacy API