{"openapi":"3.0.3","info":{"title":"AppPages REST API","version":"0.1.0","description":"Use an API token. Markdown is the canonical page format."},"servers":[{"url":"/"}],"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer"}}},"security":[{"BearerAuth":[]}],"paths":{"/api/v1/projects":{"get":{"summary":"List projects","responses":{"200":{"description":"Project list"}}},"post":{"summary":"Create project","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["name","slug"],"properties":{"name":{"type":"string"},"slug":{"type":"string"},"defaultLocale":{"type":"string"},"contactEmail":{"type":"string"}}}}}},"responses":{"201":{"description":"Project created"},"409":{"description":"Slug already exists"}}}},"/api/v1/projects/{slug}":{"get":{"summary":"Get project including page status","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Project"}}},"patch":{"summary":"Update project metadata and theme","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object"}}}},"responses":{"200":{"description":"Updated"}}}},"/api/v1/projects/{slug}/pages/privacy/{locale}":{"get":{"summary":"Get Markdown draft","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string"}},{"name":"locale","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Page"}}},"put":{"summary":"Upsert Markdown draft. Supply expectedVersion for optimistic concurrency.","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string"}},{"name":"locale","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["markdown"],"properties":{"markdown":{"type":"string"},"expectedVersion":{"type":"integer"}}}}}},"responses":{"200":{"description":"Saved"},"409":{"description":"Version conflict"}}}},"/api/v1/projects/{slug}/publish/{locale}":{"post":{"summary":"Publish current draft as versioned static HTML","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string"}},{"name":"locale","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"expectedVersion":{"type":"integer"}}}}}},"responses":{"200":{"description":"Published"}}}},"/api/v1/projects/{slug}/revisions/{locale}":{"get":{"summary":"Get published revision history","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string"}},{"name":"locale","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Revisions"}}}},"/api/v1/projects/{slug}/rollback/{locale}":{"post":{"summary":"Restore an earlier published revision as a new publication","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string"}},{"name":"locale","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["version"],"properties":{"version":{"type":"integer"}}}}}},"responses":{"200":{"description":"Rolled back"}}}}}}