Comprehensive API

Configuration to S3 tenant delivery

The integration path for taking Cloud Elephants CMS configurations, building a static directory, uploading it to S3, and serving it through CloudFront wildcard tenant subdomains.

tenant_slugs3://CloudFront
Production path

Configuration in, tenant URL out

default contract
configuration or CMS snapshotPOST /api/ensemble/cms/publishgenerated static directorys3://<tenant-sites-bucket>/sites/<tenant_slug>https://<tenant_slug>.mysite.cloudelephants.com
System surfaces

Where each integration lives

5 surfaces
API

Public discovery

Docs, blocks, recipes, themes, templates, quality metadata, sitemap, and llms.txt on ensemble.cloudelephants.com.

API

Website builder

Reads public APIs, selects clone-ready templates, and produces tenant configuration for the Cloud Elephants CMS.

API

Cloud Elephants CMS

Stores the tenant configuration, exposes /ensemble/v1/snapshot, and submits signed publish requests.

API

Private build service

Accepts POST /api/ensemble/cms/publish, builds a static directory, and uploads it to the tenant S3 prefix.

API

Tenant delivery

CloudFront rewrites wildcard tenant subdomains to s3://<bucket>/sites/<tenant_slug> object keys.

Public discovery

Builder-facing machine APIs

clone-ready
/api/ensemble/templates/pages/api/ensemble/templates/sites/api/ensemble/templates/example-sites/api/ensemble/quality
Private API

Build service routes

HMAC signed
GET /healthzGET /readyzGET /openapi.jsonPOST /api/ensemble/cms/publishPOST /api/build/ensembleGET /receipts/<request_id>

Production requests should provide tenant_id, tenant_slug, snapshot_id, content_api_base_uri, requested_paths, and publish_environment. With tenant S3 publishing configured, the build service derives publish_uri and publish_url from tenant_slug.

Derived tenant target

S3 prefix and public URL rules

sites/<tenant_slug>
ENSEMBLE_TENANT_PUBLISH_TARGET=s3ENSEMBLE_TENANT_PUBLISH_BUCKET=<bucket>ENSEMBLE_TENANT_PUBLISH_PREFIX=sitesENSEMBLE_TENANT_PUBLIC_BASE_DOMAIN=mysite.cloudelephants.com

For tenant_slug=acme-roofing, Ensemble derives s3://<bucket>/sites/acme-roofing and https://acme-roofing.mysite.cloudelephants.com.

Generated output

Receipts and static directories

ENSEMBLE_GENERATED_ROOT
generated/build-webhooks/<request_id>.jsongenerated/build-webhooks/<request_id>.loggenerated/snapshots/<snapshot_id>/snapshot.jsongenerated/builds/<tenant_slug>/<request_id>/static-sitegenerated/tenant-builds/<tenant_id>/<request_id>.json
S3 object layout

What CloudFront reads

private bucket
sites/<tenant_slug>/index.htmlsites/<tenant_slug>/_next/static/...sites/<tenant_slug>/ensemble-static-build.jsonsites/<tenant_slug>/ensemble-route-manifest.jsonsites/<tenant_slug>/ensemble-publish-target.jsonsites/<tenant_slug>/ensemble-static-checksums.txt

The CloudFront Function extracts the tenant slug from <tenant_slug>.mysite.cloudelephants.com and rewrites requests to /sites/<tenant_slug>/ in the private S3 origin.

Lifecycle

End-to-end publish sequence

8 steps
1

Builder discovers public templates, blocks, themes, recipes, and quality gates.

2

Builder writes tenant configuration into the Cloud Elephants CMS.

3

CMS exposes an ensemble.snapshot.v0 document for the tenant revision.

4

CMS sends the HMAC-signed publish request to the private build service.

5

Build service validates tenant_slug, source governance, preflight, and publish derivation.

6

Build service exports a static directory under ENSEMBLE_GENERATED_ROOT.

7

Publish adapter uploads the static directory to s3://<bucket>/sites/<tenant_slug>.

8

CloudFront serves https://<tenant_slug>.mysite.cloudelephants.com from that prefix.

Related docs

Implementation handoffs

public docs