API Reference

REST APIs for Cloudflare migration and MCP operations

Migration Pipeline

Three-step pipeline: export Cloudflare config, assess migration complexity, convert to Akamai PAPI format.

export CF Config
assess Analysis
convert PAPI JSON
Base URL
HarperDB Endpointclick to copy
https://ftsmcp.dev/CfApi/
GET /CfApi/ API documentation

Returns available actions and their parameters.

Response
{ "name": "Cloudflare Migration API", "version": "1.0.0", "endpoints": [...] }
POST /CfApi/ action: "export"

Export Cloudflare zone configuration. Supports live API, file import, or demo mode.

ParameterTypeDescription
actionstring"export" (required)
sourcestring"api" | "file" | "demo" (required)
domainstringDomain name (required for api/demo)
bearerTokenstringCF API token (required for api mode)
filePathstringPath to exported JSON dir (file mode)
Exampleclick to copy
curl -X POST /CfApi/ -H "Content-Type: application/json" \
  -d '{"action":"export","source":"demo","domain":"acmecorp.com"}'
Response

Returns zone, zones, zoneInventory, dnsRecords, hostnames, pagesProjects, workersScripts, rawZones.

POST /CfApi/ action: "assess"

Analyze a CF config and produce migration assessment with Akamai product recommendations.

ParameterTypeDescription
actionstring"assess" (required)
cloudflareConfigobjectOutput from export action (required)
Response

Returns complexityScore, recommendedProducts, featureMappings, dnsStrategy, certificateStrategy, wafStrategy, discoveryFindings.

POST /CfApi/ action: "convert"

Convert CF config to Akamai formats. Two modes: demo (simplified TS converter) or real (production Python tool with full behavior/criteria catalogs).

ParameterTypeDescription
actionstring"convert" (required)
cloudflareConfigobjectOutput from export action (required)
assessmentobjectOutput from assess action (required for demo mode)
modestring"demo" (default) | "real"
excludeIvmbooleanSkip Image & Video Manager rules (real mode)
productstringAkamai product: Fresca, Site_Accel, etc. (real mode)
Demo mode response

papiRuleTree, wafPolicy, dnsRecords, certEnrollment, pagesProjects, metadata

Real mode response

properties[] (full PAPI rule trees), clientLists (IP/ASN allow/block), csv (hostname mappings)

Base URL

The Python converter runs as a separate service. FastAPI Swagger UI available at /docs.

Converter Endpointclick to copy
http://localhost:8100
GET /health Health check
Response
{ "status": "ok" }
POST /convert Convert CF zones to PAPI JSON

Accepts CF zone configs and returns production-grade PAPI property JSON using the full behavior/criteria catalogs (40K+ mapping rules).

ParameterTypeDescription
zonesarrayArray of CF zone config objects (required)
exclude_ivmbooleanSkip Image & Video Manager rules (default: false)
productstringAkamai product name (default: "Fresca")
Exampleclick to copy
curl -X POST http://localhost:8100/convert \
  -H "Content-Type: application/json" \
  -d '{"zones": [{"name":"acmecorp.com", "zones_dns_records":[...], "zones_settings":[...]}]}'
Response
{
  "properties": [
    {
      "name": "acmecorp.com",
      "hostnames": ["acmecorp.com", "www.acmecorp.com", ...],
      "ruleTree": { "rules": { "name": "default", "children": [...] } },
      "comments": ["..."]
    }
  ],
  "clientLists": {
    "allowed_asn": [...],
    "allowed_ips": [...],
    "blocked_ips": [...]
  },
  "csv": [
    { "hostname": "acmecorp.com", "propertyName": "acmecorp.com", "product": "Fresca" }
  ]
}
GET /docs Swagger UI (auto-generated)

Interactive API documentation with try-it-out functionality. Auto-generated by FastAPI from Pydantic models.