API V2 vs V1 Comparison
Major Changes
API V2 has the following important changes compared to V1:
1. Support for RESTful API Calls
V1 Version:
- Complex authentication
- Does not support RESTful style
V2 Version:
- Supports standard RESTful API calls
- Uses HTTP methods (GET, POST, PUT, DELETE) to indicate operation types
- Unified path format:
/api/v1/{product}/{action} - Can be called directly using HTTP clients (such as curl, Postman)
Example Comparison:
V1 calling method:
// Requires SDK support, complex authentication
client.CreateUSMSTemplate(req)
V2 calling method (RESTful):
curl -X POST "https://api.uspeedo.com/api/v1/usms/USMSTemplate" \
-H "Content-Type: application/json" \
-H "Authorization: Basic ..."
2. Simpler Authentication
V1 Version:
- Requires signature generation for authentication
- Requires AccountId parameter
- Relatively complex signature algorithm
V2 Version:
- Uses standard HTTP Basic authentication
- Only requires
ACCESSKEY_IDandACCESSKEY_SECRET - No AccountId needed
- Simpler and more secure authentication
Authentication Comparison:
V1 Authentication:
Requires:
- Signature
- AccountId (Project ID)
- Action (API name)
V2 Authentication:
Only requires:
- Authorization: Basic base64(ACCESSKEY_ID:ACCESSKEY_SECRET)
3. More Detailed API Documentation
V1 Version:
- Relatively simple documentation
- Mainly for SDK users
V2 Version:
- Provides complete RESTful API documentation
- Includes code examples in multiple languages (CURL, Golang, Java, Python, PHP)
- Detailed request parameter descriptions
- Complete response format descriptions
- Error code descriptions
4. Unified Path Format
V1 Version:
- Does not support RESTful-style path format
- Requires Action parameter to specify operations
V2 Version:
- Unified RESTful path format:
/api/v1/{product}/{action} - Uses HTTP methods to distinguish operation types:
- GET: Query
- POST: Create
- PUT: Update
- DELETE: Delete
5. Simplified Request Parameters
V1 Version:
- All requests require
ActionandAccountIdparameters - Complex parameter structure
V2 Version:
- No
Actionparameter needed (determined by path and method) - No
AccountIdparameter needed - Clear and concise parameter structure
Migration Recommendations
If you are currently using V1 API, we recommend migrating to V2 to get:
- ✅ Simpler authentication
- ✅ Standard RESTful API interfaces
- ✅ Better documentation support
- ✅ More flexible calling methods (supports direct HTTP calls)
Compatibility Notes
- V1 and V2 APIs can be used simultaneously
- V1 API will continue to be maintained, but new projects are recommended to use V2
- V2 API provides better developer experience and documentation support