Integrate OpenAPI/Swagger documentation using drf-spectacular, enhancing API documentation with comprehensive guides and schema generation. Add multiple documentation files covering authentication, error codes, rate limiting, and migration strategies. Update settings and URLs to support new documentation endpoints and schema configurations.
This commit is contained in:
113
docs/README.md
Normal file
113
docs/README.md
Normal file
@@ -0,0 +1,113 @@
|
||||
# IGNY8 API Documentation
|
||||
|
||||
**Version**: 1.0.0
|
||||
**Last Updated**: 2025-11-16
|
||||
|
||||
Complete documentation for the IGNY8 Unified API Standard v1.0.
|
||||
|
||||
---
|
||||
|
||||
## Documentation Index
|
||||
|
||||
### Getting Started
|
||||
|
||||
1. **[API Documentation](API-DOCUMENTATION.md)** - Complete API reference with examples
|
||||
- Quick start guide
|
||||
- Endpoint reference
|
||||
- Code examples (Python, JavaScript, cURL)
|
||||
- Response format details
|
||||
|
||||
2. **[Authentication Guide](AUTHENTICATION-GUIDE.md)** - Authentication and authorization
|
||||
- JWT Bearer token authentication
|
||||
- Token management
|
||||
- Code examples
|
||||
- Security best practices
|
||||
|
||||
3. **[Error Codes Reference](ERROR-CODES.md)** - Complete error code reference
|
||||
- HTTP status codes
|
||||
- Field-specific errors
|
||||
- Error handling best practices
|
||||
- Common error scenarios
|
||||
|
||||
4. **[Rate Limiting Guide](RATE-LIMITING.md)** - Rate limiting and throttling
|
||||
- Rate limit scopes
|
||||
- Handling rate limits
|
||||
- Best practices
|
||||
- Code examples
|
||||
|
||||
### Integration Guides
|
||||
|
||||
5. **[Migration Guide](MIGRATION-GUIDE.md)** - Migrating to API v1.0
|
||||
- What changed
|
||||
- Step-by-step migration
|
||||
- Code examples
|
||||
- Breaking changes
|
||||
|
||||
6. **[WordPress Plugin Integration](WORDPRESS-PLUGIN-INTEGRATION.md)** - WordPress integration
|
||||
- PHP API client
|
||||
- Authentication
|
||||
- Error handling
|
||||
- Best practices
|
||||
|
||||
### Interactive Documentation
|
||||
|
||||
- **Swagger UI**: `https://api.igny8.com/api/docs/`
|
||||
- **ReDoc**: `https://api.igny8.com/api/redoc/`
|
||||
- **OpenAPI Schema**: `https://api.igny8.com/api/schema/`
|
||||
|
||||
---
|
||||
|
||||
## Quick Start
|
||||
|
||||
### 1. Get Access Token
|
||||
|
||||
```bash
|
||||
curl -X POST https://api.igny8.com/api/v1/auth/login/ \
|
||||
-H "Content-Type: application/json" \
|
||||
-d '{"email":"user@example.com","password":"password"}'
|
||||
```
|
||||
|
||||
### 2. Use Token
|
||||
|
||||
```bash
|
||||
curl -X GET https://api.igny8.com/api/v1/planner/keywords/ \
|
||||
-H "Authorization: Bearer YOUR_TOKEN" \
|
||||
-H "Content-Type: application/json"
|
||||
```
|
||||
|
||||
### 3. Handle Response
|
||||
|
||||
All responses follow unified format:
|
||||
|
||||
```json
|
||||
{
|
||||
"success": true,
|
||||
"data": {...},
|
||||
"request_id": "uuid"
|
||||
}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## API Standard Features
|
||||
|
||||
- ✅ **Unified Response Format** - Consistent JSON structure
|
||||
- ✅ **Layered Authorization** - Authentication → Tenant → Role → Site/Sector
|
||||
- ✅ **Centralized Error Handling** - All errors in unified format
|
||||
- ✅ **Scoped Rate Limiting** - Different limits per operation type
|
||||
- ✅ **Tenant Isolation** - Account/site/sector scoping
|
||||
- ✅ **Request Tracking** - Unique request ID for debugging
|
||||
|
||||
---
|
||||
|
||||
## Support
|
||||
|
||||
- **Interactive Docs**: [Swagger UI](https://api.igny8.com/api/docs/)
|
||||
- **Error Reference**: [Error Codes](ERROR-CODES.md)
|
||||
- **Contact**: Include `request_id` from responses when contacting support
|
||||
|
||||
---
|
||||
|
||||
**Last Updated**: 2025-11-16
|
||||
**API Version**: 1.0.0
|
||||
|
||||
Reference in New Issue
Block a user