Advanced Features
This guide covers advanced features and upcoming functionality in FG API.
Coming Soon Features
Step 3: Validation Rules
Purpose: Set up advanced data validation for your API fields.
What you'll be able to configure:
Field Length Limits
Minimum and maximum character counts for text fields
Custom error messages for length violations
Format Validation
Email format validation
Phone number format validation
URL format validation
Custom regex patterns
Range Validation
Minimum and maximum values for number fields
Date range validation
Custom validation rules
Custom Validation Rules
Write custom validation logic
Cross-field validation
Conditional validation based on other fields
Example Configuration:
Field: email
Validation Rules:
- Required: Yes
- Format: Email
- Max Length: 100 characters
- Error Message: "Please enter a valid email address"
Field: age
Validation Rules:
- Required: Yes
- Type: Number
- Min Value: 18
- Max Value: 120
- Error Message: "Age must be between 18 and 120"Step 4: Response Mapping
Purpose: Configure how your API responds to requests.
What you'll be able to configure:
Response Format
JSON response structure
Success and error response formats
Custom response headers
Data Transformation
Transform incoming data before storage
Format outgoing data in responses
Add computed fields
Response Messages
Custom success messages
Detailed error messages
Status codes for different scenarios
Example Response Configuration:
{
"success": true,
"message": "Contact form submitted successfully",
"data": {
"id": "auto-generated-id",
"submitted_at": "2024-01-15T10:30:00Z",
"user_data": {
"name": "transformed-name",
"email": "user-email"
}
}
}Step 5: Testing & Preview
Purpose: Test your API before going live.
What you'll be able to do:
Interactive Testing
Send test requests to your API
Preview responses in real-time
Test different field combinations
Validation Testing
Test validation rules
Verify error messages
Check required field behavior
Performance Testing
Test API response times
Check for bottlenecks
Optimize field configurations
Testing Interface:
Test Request:
POST /api/contact-form
{
"name": "John Doe",
"email": "john@example.com",
"message": "Test message"
}
Expected Response:
{
"success": true,
"message": "Contact form submitted successfully",
"data": { ... }
}Step 6: Deployment & Settings
Purpose: Deploy and configure your live API.
What you'll be able to configure:
Deployment Settings
Environment configuration
Database setup
Security settings
API Documentation
Auto-generated documentation
Interactive API explorer
Code examples in multiple languages
Access Controls
API key management
Rate limiting configuration
IP whitelisting
Monitoring & Analytics
Request logging
Usage analytics
Performance monitoring
Error tracking
Current Advanced Features
Field Management
Field Types
Text Fields: Single-line text input
Select Fields: Dropdown menus with predefined options
Date Fields: Date picker with validation
Number Fields: Numeric input with validation
Boolean Fields: True/false checkboxes
Field Configuration
Required vs optional fields
Active/inactive field states
Custom field names and descriptions
API Management
Endpoint Management
Create, edit, and delete endpoints
View endpoint details and statistics
Monitor API usage
Data Management
View submitted data
Export data in various formats
Search and filter submissions
Security Features
Authentication
JWT-based authentication
Refresh token system
User approval workflow
Rate Limiting
Configurable rate limits
IP-based and user-based limiting
Automatic rate limit handling
Input Validation
Built-in data type validation
Required field validation
Basic format validation
Best Practices for Advanced Usage
Field Design
Choose Appropriate Field Types
✅ Good: Use single_select for categories
❌ Bad: Use text field for categories (no validation)
✅ Good: Use number for quantities
❌ Bad: Use string for quantities (no math operations)Plan for Validation
✅ Good: Design fields with validation in mind
❌ Bad: Create fields without considering validation needsAPI Design
Consistent Naming
✅ Good: user_name, email_address, phone_number
❌ Bad: name, email, phone (inconsistent patterns)Logical Field Order
✅ Good: name, email, message (logical flow)
❌ Bad: message, name, email (confusing order)Data Management
Regular Monitoring
Check API usage regularly
Monitor for errors and issues
Review submitted data quality
Backup and Export
Export important data regularly
Keep backups of field configurations
Document API changes
Integration Examples
Web Forms
<form action="https://your-api.com/api/contact-form" method="POST">
<input type="text" name="name" required>
<input type="email" name="email" required>
<select name="category" required>
<option value="General">General</option>
<option value="Support">Support</option>
</select>
<textarea name="message" required></textarea>
<button type="submit">Submit</button>
</form>JavaScript Integration
const formData = {
name: "John Doe",
email: "john@example.com",
category: "Support",
message: "I need help with my account"
};
fetch('https://your-api.com/api/contact-form', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify(formData)
})
.then(response => response.json())
.then(data => console.log('Success:', data))
.catch(error => console.error('Error:', error));cURL Examples
curl -X POST https://your-api.com/api/contact-form \
-H "Content-Type: application/json" \
-d '{
"name": "John Doe",
"email": "john@example.com",
"category": "Support",
"message": "I need help with my account"
}'Troubleshooting
Common Issues
Field Not Accepting Data
Check if field is marked as "Active"
Verify field name matches API request
Ensure data type matches field configuration
Validation Errors
Check required field settings
Verify data format matches field type
Review field configuration for errors
API Not Responding
Check endpoint URL
Verify API is deployed and active
Check for rate limiting issues
Getting Help
Documentation
Check this documentation for detailed guides
Review API reference for technical details
Look at examples and use cases
Support
Contact support through the platform
Check the FAQ for common questions
Join community discussions
Roadmap
Short Term (Next 3 months)
✅ Step 3: Validation Rules
✅ Step 4: Response Mapping
✅ Enhanced field types
Medium Term (3-6 months)
✅ Step 5: Testing & Preview
✅ Step 6: Deployment & Settings
✅ API documentation generator
Long Term (6+ months)
✅ Webhook support
✅ Advanced analytics
✅ Team collaboration features
✅ API versioning