Skip to content

Postman / API collection

An importable Postman collection exercises the control-plane API end to end: one POST /jobs request per intent with a realistic example spec, plus GET /jobs/{job_id}, the SSE events stream, and the operator task-retry endpoint.

Download / repo path: postman/cms-ai-forge.postman_collection.json (Collection format v2.1).

What's in it

Folder Requests
Health GET /api/status
Jobs by intent POST /jobs for site_scaffold, article_batch, single_article, wp_import, cms_copy, seo_enrich, settings_tune, content_refresh, wp_site_import, template_variant, page_type_variant, plus POST /migrate_from_wp (the whole-site import entry point)
Jobs - generate_* granulars POST /jobs for generate_settings, generate_logo, generate_taxonomy, generate_style, generate_template, generate_page_types
Job status & control GET /jobs (list, plus a state=partial variant for jobs that lost work), GET /jobs/{{job_id}}, GET /jobs/{{job_id}}/tasks/{{task_id}}, GET /jobs/{{job_id}}/events (SSE), POST /jobs/{{job_id}}/tasks/{{task_id}}/retry, POST /jobs/{{job_id}}/retry-failed, POST /jobs/{{job_id}}/cancel, POST /jobs/{{job_id}}/tasks/{{task_id}}/regenerate

Every POST /jobs request has a test script that asserts 201 and stores the returned job_id in a collection variable. GET /jobs/{{job_id}} likewise captures the first task_id, so the retry request targets the last-submitted job with no manual copy-paste: submit an intent, then run status/retry straight after.

Variables

The collection ships with defaults pointing at the stage host and the FRDEV dev site. Override them in a Postman environment for another target.

Variable Default Meaning
base_url http://cms-ai-forge-stg.skyneto.com Control-plane host (stage)
control_plane_token (empty -- set it) Required. The service credential every request but Health sends as Authorization: Bearer {{control_plane_token}} (AISD-317). Read it from Secrets Manager /<env>/cms-ai-forge/control-plane; never commit it into the collection.
site FRDEV Site key (resolved to a numeric cms-api site_id)
site_id 207 Numeric cms-api site id for FRDEV
account_id 3468 OpenAI account_id from the harvester ai_accounts table (stage)
author_id 1 cms-api author for ContentCreate (defaults.author_id)
job_id (captured) Set automatically by each POST /jobs test script
task_id (captured) Set automatically by GET /jobs/{{job_id}}

Import steps

  1. In Postman: Import → File, and select docs/postman/cms-ai-forge.postman_collection.json.
  2. Set control_plane_token (collection variable, or an environment) to the service credential from Secrets Manager. Without it every request but Health returns 401.
  3. (Optional) Create an environment overriding base_url / account_id / site_id for your target; otherwise the built-in collection variables apply.
  4. Run a POST /jobs request (e.g. site_scaffold). The test script captures job_id.
  5. Run GET /jobs/{{job_id}} to see the task tree; it captures the first task_id.
  6. If a task is dead/failed, run the retry request to re-drive it.

Real generation costs money

Against a deployed environment (stage/prd) providers generate for real by default. Any intent that calls an AI provider needs an account_id (3468 on stage) and real jobs cost money. Set FORGE_PROVIDER_STUBS=1 on the service for a no-cost deterministic run. content_refresh is normally fired by Celery beat on a schedule -- the collection's request is a manual one-off. See Configuration.