41 lines
794 B
Markdown
41 lines
794 B
Markdown
|
|
# API Migration Guide: v1 → v2
|
||
|
|
|
||
|
|
## Overview
|
||
|
|
This guide helps migrate from API v1 to v2.
|
||
|
|
|
||
|
|
## Breaking Changes
|
||
|
|
|
||
|
|
### Plans Endpoint
|
||
|
|
**v1**: `POST /api/plans`
|
||
|
|
**v2**: `POST /api/v2/plans`
|
||
|
|
|
||
|
|
**Changes**:
|
||
|
|
- Response format updated
|
||
|
|
- Additional validation fields
|
||
|
|
- New error codes
|
||
|
|
|
||
|
|
### Execution Endpoint
|
||
|
|
**v1**: `POST /api/plans/:planId/execute`
|
||
|
|
**v2**: `POST /api/v2/plans/:planId/execute`
|
||
|
|
|
||
|
|
**Changes**:
|
||
|
|
- Execution response includes additional metadata
|
||
|
|
- Webhook events structure updated
|
||
|
|
|
||
|
|
## Migration Steps
|
||
|
|
|
||
|
|
1. Update base URL to use `/api/v2` prefix
|
||
|
|
2. Update error handling for new error codes
|
||
|
|
3. Update response parsing for new formats
|
||
|
|
4. Test thoroughly in staging environment
|
||
|
|
|
||
|
|
## Timeline
|
||
|
|
|
||
|
|
- **v1 Deprecation**: 2025-07-01
|
||
|
|
- **v1 Sunset**: 2025-12-31
|
||
|
|
|
||
|
|
---
|
||
|
|
|
||
|
|
**Last Updated**: 2025-01-15
|
||
|
|
|