A comprehensive framework for Google Apigee API development that provides commonly used policies, shared flows, and best practices for building robust API proxies.
- 🔒 Security Policies: CORS, OAuth2, API Key validation
- 🚦 Traffic Management: Rate limiting, spike arrest
- 🔄 Data Transformation: JSON/XML conversion
- 📊 Monitoring: Response caching, comprehensive logging
⚠️ Error Handling: Standardized error responses- 🔍 Logging: Audit logging with sensitive data masking
- 📚 Documentation: Complete developer guides and examples
- 🛠️ Tools: Deployment scripts and API proxy templates
framework/
├── policies/ # Common policies
│ ├── security/ # Security-related policies
│ ├── traffic/ # Traffic management policies
│ ├── transformation/ # Data transformation policies
│ └── monitoring/ # Monitoring and analytics policies
├── shared-flows/ # Reusable shared flows
│ ├── logging/ # Logging and audit flows
│ ├── error-handling/ # Error handling flows
│ ├── authentication/ # Authentication flows
│ └── utilities/ # Utility flows
├── examples/ # Example API proxies
├── templates/ # API proxy templates
├── scripts/ # Deployment and utility scripts
└── docs/ # Documentation
-
Clone the framework
git clone <repository-url> cd apigee-framework
-
Deploy shared flows
./framework/scripts/deploy-framework.sh -o your-org -e prod -u username -p password
-
Create a new API proxy
./framework/scripts/create-api-proxy.sh -n my-api -d "My API" -b /my-api -t https://api.example.com -r resource -o ./my-api
-
Use in your API proxy
<PreFlow name="PreFlow"> <Request> <Step> <Name>security-cors-v1</Name> <Condition>request.verb == "OPTIONS"</Condition> </Step> <Step> <Name>authentication-oauth2-v1</Name> </Step> <Step> <Name>logging-audit-v1</Name> </Step> </Request> </PreFlow>
- Developer Guide - Complete usage guide
- Naming Standards - Framework conventions
- Examples - Sample implementations
- Security:
security-cors-v1
,security-oauth2-v1
,security-api-key-v1
- Traffic:
traffic-rate-limit-v1
,traffic-spike-arrest-v1
- Transformation:
transformation-json-to-xml-v1
,transformation-xml-to-json-v1
- Monitoring:
monitoring-response-cache-v1
- Logging:
logging-audit-v1
- Comprehensive logging with sensitive data masking - Error Handling:
error-handling-standard-v1
- Standardized error responses - Authentication:
authentication-oauth2-v1
- OAuth2 authentication flow - Utilities:
utilities-request-validation-v1
- Request validation utilities
- Sensitive Data Masking: Automatically masks passwords, tokens, credit cards, SSNs, emails
- OAuth2 Support: Complete OAuth2 token validation
- CORS Handling: Configurable cross-origin resource sharing
- API Key Validation: Secure API key management
- Comprehensive Logging: Request/response logging with structured format
- Sensitive Data Protection: Automatic masking of sensitive information
- External Integration: Send logs to external systems
- Performance Monitoring: Response time tracking and caching
- Consistent naming conventions
- Standardized error handling
- Comprehensive logging
- Security-first approach
- Performance optimization
- Documentation-driven development
MIT License - see LICENSE file for details.
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests and documentation
- Submit a pull request
For questions and support:
- Check the documentation
- Review examples
- Open an issue on GitHub
Built with ❤️ for the Apigee community