Files
igny8/igny8-wp-integration-plugin/docs/missing-saas-api-endpoints.md
2025-11-21 19:18:24 +05:00

2.7 KiB
Raw Blame History

IGNY8 SaaS Missing / Pending API Endpoints

These endpoints are referenced in the WordPress bridge plan but are not currently available (or confirmed) in the SaaS API set. The SaaS team should implement or confirm them so the bridge can automate end-to-end flows.

ID Purpose Proposed Endpoint Method Payload / Notes
M1 Pull recommended WordPress integration settings (post types, module toggles) after authentication /system/sites/{id}/settings/ GET Returns flags such as enable_products, allow_wp_edits, feature rollouts.
M2 Lightweight health check for diagnostics panel /system/ping/ GET Responds with {success:true, time, version} so WP can show “connected” without hitting data-heavy routes.
M3 Retrieve writer brief/outlines linked to a task /writer/tasks/{id}/brief/ GET Should return structured brief content, tone, keywords, outline items.
M4 Trigger planner refresh for a post/cluster from WP /planner/tasks/{id}/refresh/ POST Body includes wordpress_post_id, reason ("reoptimize"), optional notes.
M5 Upload WordPress internal link graph for Linker module /linker/link-map/ POST Payload: list of {source_url, target_url, anchor} records plus site ID. Should accept batches.
M6 Push Linker recommendations back to WordPress Webhook to WP POST SaaS calls WP endpoint with {action:"insert_link", post_id, anchor, target_url}. Requires ability to configure per-site shared secret.
M7 Create Optimizer job (e.g., re-audit a post) initiated from WP /optimizer/jobs/ POST Body: {post_id, task_id, job_type, priority} returning job ID + status.
M8 Fetch Optimizer job status/results for UI /optimizer/jobs/{id}/ GET Response should include status, score_changes, recommendations.
M9 Report per-site sync status back to WP for monitoring /system/sites/{id}/status/ GET Returns last processed webhook, queued jobs, outstanding recommendations.
M10 Notify WP when a new Writer task is ready (to avoid polling) Webhook to WP POST Payload: {task_id, cluster_id, title, status}; WP responds 200 and enqueues ingestion. Provide retry/backoff headers.

Webhook Security Requirements

  1. SaaS must send X-IGNY8-Signature (HMAC-SHA256 over body using shared secret).
  2. Includes X-IGNY8-Timestamp to prevent replay.
  3. WordPress bridge will validate signature before enqueuing actions.

Next Steps for SaaS Team

  1. Confirm which endpoints already exist (rename if different) and document response schemas.
  2. Implement missing endpoints/webhooks and expose them via API documentation.
  3. Provide sample payloads + Postman collection so WP bridge devs can test without full app context.