Remove obsolete migration and workflow files; delete Site Builder Wizard references and related components. Update documentation to reflect the removal of the WorkflowState model and streamline the site building process.
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
|
||||
**Base URL**: `https://api.igny8.com/api/v1/`
|
||||
**Version**: 1.0.0
|
||||
**Last Updated**: 2025-01-XX
|
||||
**Last Updated**: 2025-01-XX (Added 6 missing modules: Linker, Optimizer, Publisher, Site Builder, Automation, Integration)
|
||||
**Status**: ✅ **100% IMPLEMENTED** - All endpoints use unified format
|
||||
|
||||
**Purpose**: Complete, unified reference for IGNY8 API covering authentication, endpoints, response formats, error handling, rate limiting, permissions, and integration examples.
|
||||
@@ -97,6 +97,12 @@ Development: http://localhost:8000/api/v1/
|
||||
├── auth/ # Authentication and user management
|
||||
├── planner/ # Keywords, clusters, content ideas
|
||||
├── writer/ # Tasks, content, images
|
||||
├── linker/ # Internal linking operations
|
||||
├── optimizer/ # Content optimization and scoring
|
||||
├── publisher/ # Publishing records and site deployment
|
||||
├── site-builder/ # Site blueprint management
|
||||
├── automation/ # Automation rules and scheduled tasks
|
||||
├── integration/ # External platform integrations
|
||||
├── system/ # Settings, prompts, integrations
|
||||
└── billing/ # Credits, transactions, usage
|
||||
```
|
||||
@@ -219,6 +225,7 @@ Content-Type: application/json
|
||||
- `GET /api/v1/auth/industries/` - List industries
|
||||
- `GET /api/v1/system/status/` - System health check
|
||||
- `GET /api/v1/system/ping/` - Health check endpoint
|
||||
- `GET /api/v1/publisher/sites/{site_id}/definition/` - Get site definition for Sites Renderer
|
||||
|
||||
**All other endpoints require JWT authentication.**
|
||||
|
||||
@@ -988,6 +995,414 @@ class KeywordViewSet(SiteSectorModelViewSet):
|
||||
- `GET /api/v1/system/ping/` - Health check endpoint (AllowAny)
|
||||
- `GET /api/v1/system/request-metrics/{request_id}/` - Get request metrics for debugging
|
||||
|
||||
### Linker Module Endpoints
|
||||
|
||||
**Base Path**: `/api/v1/linker/`
|
||||
**Permission**: IsAuthenticatedAndActive + HasTenantAccess
|
||||
|
||||
#### Process Content for Internal Linking
|
||||
|
||||
- `POST /api/v1/linker/process/` - Process single content item for internal linking
|
||||
|
||||
**Request:**
|
||||
```json
|
||||
{
|
||||
"content_id": 123
|
||||
}
|
||||
```
|
||||
|
||||
**Response:**
|
||||
```json
|
||||
{
|
||||
"success": true,
|
||||
"data": {
|
||||
"content_id": 123,
|
||||
"suggested_links": [
|
||||
{
|
||||
"target_content_id": 456,
|
||||
"target_title": "Related Article",
|
||||
"anchor_text": "relevant keyword",
|
||||
"confidence": 0.85
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
#### Batch Process Content
|
||||
|
||||
- `POST /api/v1/linker/batch_process/` - Process multiple content items for linking
|
||||
|
||||
**Request:**
|
||||
```json
|
||||
{
|
||||
"content_ids": [123, 456, 789]
|
||||
}
|
||||
```
|
||||
|
||||
### Optimizer Module Endpoints
|
||||
|
||||
**Base Path**: `/api/v1/optimizer/`
|
||||
**Permission**: IsAuthenticatedAndActive + HasTenantAccess
|
||||
|
||||
#### Optimize Content
|
||||
|
||||
- `POST /api/v1/optimizer/optimize/` - Optimize content (auto-detects entry point)
|
||||
|
||||
**Request:**
|
||||
```json
|
||||
{
|
||||
"ids": [123, 456],
|
||||
"entry_point": "seo" // Optional: "seo", "readability", "engagement"
|
||||
}
|
||||
```
|
||||
|
||||
**Response:**
|
||||
```json
|
||||
{
|
||||
"success": true,
|
||||
"data": {
|
||||
"optimized_content": "...",
|
||||
"seo_score": 85,
|
||||
"readability_score": 78,
|
||||
"engagement_score": 82
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
#### Batch Optimize Content
|
||||
|
||||
- `POST /api/v1/optimizer/batch_optimize/` - Batch optimize multiple content items
|
||||
|
||||
**Request:**
|
||||
```json
|
||||
{
|
||||
"ids": [123, 456, 789],
|
||||
"entry_point": "seo" // Optional
|
||||
}
|
||||
```
|
||||
|
||||
#### Analyze Content
|
||||
|
||||
- `POST /api/v1/optimizer/analyze/` - Analyze content without optimization
|
||||
|
||||
**Request:**
|
||||
```json
|
||||
{
|
||||
"id": 123
|
||||
}
|
||||
```
|
||||
|
||||
**Response:**
|
||||
```json
|
||||
{
|
||||
"success": true,
|
||||
"data": {
|
||||
"seo_score": 75,
|
||||
"readability_score": 70,
|
||||
"engagement_score": 68,
|
||||
"recommendations": [
|
||||
"Add more internal links",
|
||||
"Improve heading structure"
|
||||
]
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### Publisher Module Endpoints
|
||||
|
||||
**Base Path**: `/api/v1/publisher/`
|
||||
**Permission**: IsAuthenticatedAndActive + HasTenantAccess
|
||||
|
||||
#### Publishing Records
|
||||
|
||||
**Base Path**: `/api/v1/publisher/publishing-records/`
|
||||
**Inherits**: SiteSectorModelViewSet
|
||||
|
||||
**Standard CRUD:**
|
||||
- `GET /api/v1/publisher/publishing-records/` - List publishing records (paginated)
|
||||
- `POST /api/v1/publisher/publishing-records/` - Create publishing record
|
||||
- `GET /api/v1/publisher/publishing-records/{id}/` - Get publishing record
|
||||
- `PUT /api/v1/publisher/publishing-records/{id}/` - Update publishing record
|
||||
- `DELETE /api/v1/publisher/publishing-records/{id}/` - Delete publishing record
|
||||
|
||||
**Filtering:**
|
||||
- `status` - Filter by publishing status
|
||||
- `destination_type` - Filter by destination (wordpress, sites_renderer, etc.)
|
||||
- `site_id` - Filter by site
|
||||
- `sector_id` - Filter by sector
|
||||
|
||||
#### Deployment Records
|
||||
|
||||
**Base Path**: `/api/v1/publisher/deployments/`
|
||||
**Inherits**: SiteSectorModelViewSet
|
||||
|
||||
**Standard CRUD:**
|
||||
- `GET /api/v1/publisher/deployments/` - List deployment records (paginated)
|
||||
- `POST /api/v1/publisher/deployments/` - Create deployment record
|
||||
- `GET /api/v1/publisher/deployments/{id}/` - Get deployment record
|
||||
- `PUT /api/v1/publisher/deployments/{id}/` - Update deployment record
|
||||
- `DELETE /api/v1/publisher/deployments/{id}/` - Delete deployment record
|
||||
|
||||
#### Publishing Actions
|
||||
|
||||
- `POST /api/v1/publisher/publish/` - Publish content to destination
|
||||
|
||||
**Request:**
|
||||
```json
|
||||
{
|
||||
"content_id": 123,
|
||||
"destination_type": "wordpress",
|
||||
"destination_id": 1
|
||||
}
|
||||
```
|
||||
|
||||
- `POST /api/v1/publisher/deploy/` - Deploy site blueprint
|
||||
|
||||
**Request:**
|
||||
```json
|
||||
{
|
||||
"blueprint_id": 456,
|
||||
"environment": "production"
|
||||
}
|
||||
```
|
||||
|
||||
- `POST /api/v1/publisher/check_readiness/` - Check deployment readiness
|
||||
|
||||
**Request:**
|
||||
```json
|
||||
{
|
||||
"blueprint_id": 456
|
||||
}
|
||||
```
|
||||
|
||||
#### Public Endpoint (No Authentication)
|
||||
|
||||
- `GET /api/v1/publisher/sites/{site_id}/definition/` - Get site definition for Sites Renderer
|
||||
|
||||
**Response:**
|
||||
```json
|
||||
{
|
||||
"success": true,
|
||||
"data": {
|
||||
"site_id": 1,
|
||||
"slug": "example-site",
|
||||
"blueprints": [...],
|
||||
"pages": [...]
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### Site Builder Module Endpoints
|
||||
|
||||
**Base Path**: `/api/v1/site-builder/`
|
||||
**Permission**: IsAuthenticatedAndActive + HasTenantAccess
|
||||
|
||||
#### Site Blueprints
|
||||
|
||||
**Base Path**: `/api/v1/site-builder/blueprints/`
|
||||
**Inherits**: SiteSectorModelViewSet
|
||||
|
||||
**Standard CRUD:**
|
||||
- `GET /api/v1/site-builder/blueprints/` - List site blueprints (paginated)
|
||||
- `POST /api/v1/site-builder/blueprints/` - Create site blueprint
|
||||
- `GET /api/v1/site-builder/blueprints/{id}/` - Get blueprint details
|
||||
- `PUT /api/v1/site-builder/blueprints/{id}/` - Update blueprint
|
||||
- `DELETE /api/v1/site-builder/blueprints/{id}/` - Delete blueprint
|
||||
|
||||
**Custom Actions:**
|
||||
- `POST /api/v1/site-builder/blueprints/{id}/generate_structure/` - Generate site structure using AI
|
||||
- `POST /api/v1/site-builder/blueprints/{id}/generate_all_pages/` - Generate all pages for blueprint
|
||||
- `POST /api/v1/site-builder/blueprints/{id}/create_tasks/` - Create Writer tasks for pages
|
||||
- `GET /api/v1/site-builder/blueprints/{id}/progress/` - Get cluster-level completion status
|
||||
- `POST /api/v1/site-builder/blueprints/{id}/clusters/attach/` - Attach planner clusters
|
||||
- `POST /api/v1/site-builder/blueprints/{id}/clusters/detach/` - Detach clusters
|
||||
- `GET /api/v1/site-builder/blueprints/{id}/taxonomies/` - List taxonomies
|
||||
- `POST /api/v1/site-builder/blueprints/{id}/taxonomies/` - Create taxonomy
|
||||
- `POST /api/v1/site-builder/blueprints/{id}/taxonomies/import/` - Import taxonomies
|
||||
- `POST /api/v1/site-builder/blueprints/bulk_delete/` - Bulk delete blueprints
|
||||
|
||||
**Filtering:**
|
||||
- `status` - Filter by blueprint status
|
||||
- `site_id` - Filter by site
|
||||
- `sector_id` - Filter by sector
|
||||
|
||||
#### Page Blueprints
|
||||
|
||||
**Base Path**: `/api/v1/site-builder/pages/`
|
||||
**Inherits**: SiteSectorModelViewSet
|
||||
|
||||
**Standard CRUD:**
|
||||
- `GET /api/v1/site-builder/pages/` - List page blueprints (paginated)
|
||||
- `POST /api/v1/site-builder/pages/` - Create page blueprint
|
||||
- `GET /api/v1/site-builder/pages/{id}/` - Get page details
|
||||
- `PUT /api/v1/site-builder/pages/{id}/` - Update page
|
||||
- `DELETE /api/v1/site-builder/pages/{id}/` - Delete page
|
||||
|
||||
**Custom Actions:**
|
||||
- `POST /api/v1/site-builder/pages/{id}/generate_content/` - Generate content for page
|
||||
- `POST /api/v1/site-builder/pages/{id}/regenerate/` - Regenerate page content
|
||||
|
||||
**Filtering:**
|
||||
- `site_blueprint_id` - Filter by site blueprint
|
||||
- `status` - Filter by page status
|
||||
|
||||
#### Site Assets
|
||||
|
||||
- `GET /api/v1/site-builder/assets/` - List files for site
|
||||
|
||||
**Query Parameters:**
|
||||
- `site_id` - Filter by site
|
||||
- `file_type` - Filter by file type
|
||||
|
||||
- `POST /api/v1/site-builder/assets/` - Upload file
|
||||
|
||||
**Request:** Multipart form data
|
||||
```json
|
||||
{
|
||||
"file": "<file>",
|
||||
"site_id": 1,
|
||||
"file_type": "image"
|
||||
}
|
||||
```
|
||||
|
||||
- `DELETE /api/v1/site-builder/assets/` - Delete file
|
||||
|
||||
**Request:**
|
||||
```json
|
||||
{
|
||||
"file_path": "path/to/file.jpg",
|
||||
"site_id": 1
|
||||
}
|
||||
```
|
||||
|
||||
#### Site Builder Metadata
|
||||
|
||||
- `GET /api/v1/site-builder/metadata/` - Get metadata (business types, audience profiles, etc.)
|
||||
|
||||
**Response:**
|
||||
```json
|
||||
{
|
||||
"success": true,
|
||||
"data": {
|
||||
"business_types": [...],
|
||||
"audience_profiles": [...],
|
||||
"brand_personalities": [...],
|
||||
"hero_imagery_directions": [...]
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### Automation Module Endpoints
|
||||
|
||||
**Base Path**: `/api/v1/automation/`
|
||||
**Permission**: IsAuthenticatedAndActive + HasTenantAccess
|
||||
|
||||
#### Automation Rules
|
||||
|
||||
**Base Path**: `/api/v1/automation/rules/`
|
||||
**Inherits**: SiteSectorModelViewSet
|
||||
|
||||
**Standard CRUD:**
|
||||
- `GET /api/v1/automation/rules/` - List automation rules (paginated)
|
||||
- `POST /api/v1/automation/rules/` - Create automation rule
|
||||
- `GET /api/v1/automation/rules/{id}/` - Get rule details
|
||||
- `PUT /api/v1/automation/rules/{id}/` - Update rule
|
||||
- `DELETE /api/v1/automation/rules/{id}/` - Delete rule
|
||||
|
||||
**Custom Actions:**
|
||||
- `POST /api/v1/automation/rules/{id}/execute/` - Manually execute automation rule
|
||||
|
||||
**Filtering:**
|
||||
- `status` - Filter by rule status (active, inactive)
|
||||
- `trigger_type` - Filter by trigger type
|
||||
- `site_id` - Filter by site
|
||||
- `sector_id` - Filter by sector
|
||||
|
||||
#### Scheduled Tasks
|
||||
|
||||
**Base Path**: `/api/v1/automation/scheduled-tasks/`
|
||||
**Inherits**: AccountModelViewSet
|
||||
|
||||
**Standard CRUD:**
|
||||
- `GET /api/v1/automation/scheduled-tasks/` - List scheduled tasks (paginated)
|
||||
- `POST /api/v1/automation/scheduled-tasks/` - Create scheduled task
|
||||
- `GET /api/v1/automation/scheduled-tasks/{id}/` - Get task details
|
||||
- `PUT /api/v1/automation/scheduled-tasks/{id}/` - Update task
|
||||
- `DELETE /api/v1/automation/scheduled-tasks/{id}/` - Delete task
|
||||
|
||||
**Filtering:**
|
||||
- `status` - Filter by task status
|
||||
- `task_type` - Filter by task type
|
||||
- `next_run_date` - Filter by next run date
|
||||
|
||||
### Integration Module Endpoints
|
||||
|
||||
**Base Path**: `/api/v1/integration/`
|
||||
**Permission**: IsAuthenticatedAndActive + HasTenantAccess
|
||||
|
||||
#### Site Integrations
|
||||
|
||||
**Base Path**: `/api/v1/integration/integrations/`
|
||||
**Inherits**: SiteSectorModelViewSet
|
||||
|
||||
**Standard CRUD:**
|
||||
- `GET /api/v1/integration/integrations/` - List site integrations (paginated)
|
||||
- `POST /api/v1/integration/integrations/` - Create integration
|
||||
- `GET /api/v1/integration/integrations/{id}/` - Get integration details
|
||||
- `PUT /api/v1/integration/integrations/{id}/` - Update integration
|
||||
- `DELETE /api/v1/integration/integrations/{id}/` - Delete integration
|
||||
|
||||
**Custom Actions:**
|
||||
- `POST /api/v1/integration/integrations/{id}/test_connection/` - Test connection to integrated platform
|
||||
|
||||
**Request:**
|
||||
```json
|
||||
{}
|
||||
```
|
||||
|
||||
**Response:**
|
||||
```json
|
||||
{
|
||||
"success": true,
|
||||
"data": {
|
||||
"connected": true,
|
||||
"message": "Connection successful"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
- `POST /api/v1/integration/integrations/{id}/sync/` - Sync content with integrated platform
|
||||
|
||||
**Request:**
|
||||
```json
|
||||
{
|
||||
"content_ids": [123, 456],
|
||||
"sync_type": "full" // or "incremental"
|
||||
}
|
||||
```
|
||||
|
||||
- `GET /api/v1/integration/integrations/{id}/sync_health/` - Get sync health status
|
||||
|
||||
**Response:**
|
||||
```json
|
||||
{
|
||||
"success": true,
|
||||
"data": {
|
||||
"last_sync": "2025-01-XXT...",
|
||||
"sync_status": "healthy",
|
||||
"pending_items": 0,
|
||||
"failed_items": 0
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
**Filtering:**
|
||||
- `platform_type` - Filter by platform (wordpress, shopify, etc.)
|
||||
- `status` - Filter by integration status
|
||||
- `site_id` - Filter by site
|
||||
- `sector_id` - Filter by sector
|
||||
|
||||
### Billing Module Endpoints
|
||||
|
||||
**Base Path**: `/api/v1/billing/`
|
||||
@@ -1386,7 +1801,7 @@ All API changes are documented in `CHANGELOG.md` with:
|
||||
|
||||
---
|
||||
|
||||
**Last Updated**: 2025-01-XX
|
||||
**Last Updated**: 2025-01-XX (Added 6 missing modules: Linker, Optimizer, Publisher, Site Builder, Automation, Integration)
|
||||
**API Version**: 1.0.0
|
||||
**Status**: ✅ **100% IMPLEMENTED**
|
||||
**Status**: ✅ **100% IMPLEMENTED** - All 10 modules documented with complete endpoint reference
|
||||
|
||||
|
||||
Reference in New Issue
Block a user