Skip to main content

Export & Eject

Fascia gives you full ownership of your design. Export your specs in multiple formats for documentation, migration, or complete independence from the platform.

Data Portability

You're never locked in. Every spec you create can be exported at any time in the format you need.

Available Formats

FormatEndpointDescription
JSON BundleGET /export/bundleRaw spec bundle — all Entities, Tools, and Policies as JSON
OpenAPIGET /export/openapiOpenAPI 3.0 document for your entire API surface
DDLGET /export/ddlPostgreSQL DDL statements for all Entity tables
TypeScript TypesGET /export/typesTypeScript interfaces for all Entities
Eject ZIPPOST /export/ejectComplete standalone project with specs, DDL, types, and documentation
llms.txtGET /docs/llms.txtAI-native documentation following the llmstxt.org standard

Using Export

All export endpoints require authentication and a staff, admin, or owner role.

JSON Bundle

Get the complete spec bundle for your workspace:

curl https://api.fascia.run/api/v1/export/bundle \
-H "Authorization: Bearer $TOKEN"

Returns all Entity specs, Tool specs, and Policy specs as structured JSON. Use this to back up your workspace or migrate to another environment.

OpenAPI Document

Generate a full OpenAPI 3.0 specification:

curl https://api.fascia.run/api/v1/export/openapi \
-H "Authorization: Bearer $TOKEN"

Use this to:

  • Generate client SDKs in any language (via OpenAPI Generator)
  • Import into Postman, Insomnia, or other API testing tools
  • Share your API contract with frontend teams or external partners

Database DDL

Export PostgreSQL DDL for all entities:

curl https://api.fascia.run/api/v1/export/ddl \
-H "Authorization: Bearer $TOKEN"

Returns CREATE TABLE statements with columns, constraints, and indexes derived from your Entity specs. Useful for reviewing the generated schema or migrating to a self-managed database.

You can also export DDL for a single entity:

curl https://api.fascia.run/api/v1/export/entity/Reservation/ddl \
-H "Authorization: Bearer $TOKEN"

TypeScript Types

Generate TypeScript interfaces for all entities:

curl https://api.fascia.run/api/v1/export/types \
-H "Authorization: Bearer $TOKEN"

Use these types in your frontend code for type-safe API calls. Single entity export is also available:

curl https://api.fascia.run/api/v1/export/entity/Reservation/typescript \
-H "Authorization: Bearer $TOKEN"

llms.txt (AI-Native Documentation)

Generate documentation optimized for LLM consumption, following the llmstxt.org standard:

# Concise summary
curl https://api.fascia.run/api/v1/docs/llms.txt \
-H "Authorization: Bearer $TOKEN"

# Full documentation
curl https://api.fascia.run/api/v1/docs/llms-full.txt \
-H "Authorization: Bearer $TOKEN"

Use this to give AI coding assistants (Claude, Cursor, etc.) context about your backend when building the frontend.

Eject

Eject creates a complete, standalone project package as a ZIP file. This is the "emergency exit" — if you ever want to leave Fascia entirely, eject gives you everything you need.

curl -X POST https://api.fascia.run/api/v1/export/eject \
-H "Authorization: Bearer $TOKEN" \
--output fascia-eject.zip
Admin or Owner Required

Eject requires admin or owner role, as it exports the complete workspace.

What's in the Eject Package

The ZIP contains:

  • specs/ — All Entity, Tool, and Policy specs as JSON files
  • ddl/ — PostgreSQL DDL for every Entity
  • types/ — TypeScript interfaces for every Entity
  • openapi.json — Full OpenAPI 3.0 document
  • llms.txt — AI-native documentation
  • README.md — Overview and instructions

With this package, you have all the information needed to rebuild your backend using any technology stack.

Access Control

EndpointRequired Role
All export endpointsstaff, admin, or owner
Ejectadmin or owner only

All export operations are recorded in the audit log.