REST API Reference
FluidGrids provides a comprehensive REST API that enables programmatic access to all platform features. This reference guide details the available endpoints, authentication methods, and usage patterns.
Authentication
API Keys Authenticate API requests:
# API Key Header
Authorization: Bearer YOUR_API_KEY
OAuth 2.0 Implement OAuth flow:
# OAuth Token Header
Authorization: Bearer YOUR_OAUTH_TOKEN
Workflow API
Create Workflow Create a new workflow:
POST /api/v1/workflows
Content-Type: application/json
{
"name": "example-workflow",
"description": "Example workflow",
"nodes": [
{
"id": "trigger",
"type": "http-trigger"
}
]
}
List Workflows Retrieve workflows:
GET /api/v1/workflows
Get Workflow Retrieve specific workflow:
GET /api/v1/workflows/{workflow_id}
Execution API
Start Execution Trigger workflow execution:
POST /api/v1/workflows/{workflow_id}/execute
Content-Type: application/json
{
"input": {
"key": "value"
}
}
Get Execution Status Check execution status:
GET /api/v1/executions/{execution_id}
Node API
Create Node Create custom node:
POST /api/v1/nodes
Content-Type: application/json
{
"name": "custom-node",
"type": "processing",
"config": {
"input_schema": {},
"output_schema": {}
}
}
Update Node Update existing node:
PUT /api/v1/nodes/{node_id}
Content-Type: application/json
{
"config": {
"updated_field": "value"
}
}
Integration API
Create Integration Set up new integration:
POST /api/v1/integrations
Content-Type: application/json
{
"type": "aws",
"config": {
"region": "us-west-2",
"credentials": {}
}
}
Test Integration Validate integration:
POST /api/v1/integrations/{integration_id}/test
Error Handling
Error Response Format Standard error structure:
{
"error": {
"code": "VALIDATION_ERROR",
"message": "Invalid input format",
"details": {
"field": "name",
"issue": "required"
}
}
}
Common Error Codes Standard error codes:
- 400: Bad Request
- 401: Unauthorized
- 403: Forbidden
- 404: Not Found
- 429: Too Many Requests
- 500: Internal Error
Rate Limiting
Rate Limit Headers Response headers:
X-RateLimit-Limit: 1000
X-RateLimit-Remaining: 999
X-RateLimit-Reset: 1623456789
Versioning
API Versioning Version selection:
# Version Header
X-API-Version: 2023-01-01
# URL Path Version
/api/v1/resource
Best Practices
API Usage Guidelines Follow these practices:
- Use appropriate HTTP methods
- Include proper headers
- Handle rate limits
- Implement retry logic
- Log API responses
Getting Started
Begin using the API:
- Review Authentication Guide
- Explore Example Requests
- Check SDK Documentation
For API support, contact our API Team.