{"components":{"securitySchemes":{"connection":{"flows":{"authorizationCode":{"authorizationUrl":"https://api.neuralcolumn.com/oauth/authorize","scopes":{"sites":"Everything except permanent erase.","sites:erase":"Permanent erase too. Granted only if the box on the sign-in page is ticked.","sites:read":"Read everything, and change nothing."},"tokenUrl":"https://api.neuralcolumn.com/oauth/token"}},"type":"oauth2"},"key":{"scheme":"bearer","type":"http"},"password":{"scheme":"basic","type":"http"}}},"info":{"description":"Static hosting through an API. Upload files, get a URL, and keep that URL as the files change. Whole-site uploads: send a .tar.gz, or one file with ?file=. Large files: send a JSON hash list to /uploads, PUT each missing file to its signed URL with exactly the headers given, then call /finish. Uploads go live unless ?draft=true. Publish with PATCH {\"slug\":\"name\",\"live\":N}. Every list uses ?limit= and ?cursor=, and returns {\"items\",\"next_cursor\"}. A page on any site can call this API, because it goes by the token a request carries. A page gets a token through the OAuth sign-in, asking for the scope sites:read if it only reads.","title":"NeuralColumn","version":"1"},"openapi":"3.1.0","paths":{"/health":{"get":{"responses":{"200":{"description":"Plain text."}},"security":[],"summary":"Is the process up? Always 200."}},"/ready":{"get":{"responses":{"200":{"description":"Plain text."}},"security":[],"summary":"Has the startup scan finished? 503 until it has."}},"/v1/account":{"get":{"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"email":{"type":"string"},"id":{"type":"string"},"sites":{"type":"integer"}},"required":["id","email","sites"],"type":"object"}}},"description":"Success."},"default":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"type":"object"}}},"description":"An error. code is stable, and hint says how to fix it."}},"security":[{"key":[]},{"connection":["sites:read"]}],"summary":"Show who this key belongs to and how many sites it has."}},"/v1/keys":{"get":{"parameters":[{"description":"Items per page, up to 1,000.","in":"query","name":"limit","required":false,"schema":{"type":"integer"}},{"description":"next_cursor from the previous page.","in":"query","name":"cursor","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"items":{"items":{"properties":{"client_host":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"id":{"type":"string"},"label":{"type":"string"},"last_used_at":{"format":"date-time","type":["string","null"]},"scopes":{"items":{"type":"string"},"type":"array"}},"required":["id","label","created_at","last_used_at"],"type":"object"},"type":"array"},"next_cursor":{"type":["string","null"]}},"required":["items","next_cursor"],"type":"object"}}},"description":"Success."},"default":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"type":"object"}}},"description":"An error. code is stable, and hint says how to fix it."}},"security":[{"key":[]},{"password":[]},{"connection":["sites:read"]}],"summary":"List keys and connected apps, without their secrets. Takes a key, or HTTP Basic email and password."},"post":{"requestBody":{"content":{"application/json":{"schema":{"properties":{"label":{"description":"A name for this key.","type":"string"}},"type":"object"}}},"required":false},"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"client_host":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"id":{"type":"string"},"key":{"type":"string"},"label":{"type":"string"},"last_used_at":{"format":"date-time","type":["string","null"]},"scopes":{"items":{"type":"string"},"type":"array"}},"required":["id","label","created_at","last_used_at","key"],"type":"object"}}},"description":"Success."},"default":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"type":"object"}}},"description":"An error. code is stable, and hint says how to fix it."}},"security":[{"password":[]}],"summary":"Create an API key, shown once. Authenticate with HTTP Basic email and password."}},"/v1/keys/{key}":{"delete":{"parameters":[{"in":"path","name":"key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success."},"default":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"type":"object"}}},"description":"An error. code is stable, and hint says how to fix it."}},"security":[{"key":[]},{"password":[]}],"summary":"Revoke a key or end a connected app. Takes a key, or HTTP Basic email and password."}},"/v1/openapi.json":{"get":{"responses":{"200":{"description":"Success."},"default":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"type":"object"}}},"description":"An error. code is stable, and hint says how to fix it."}},"security":[],"summary":"This description of the API."}},"/v1/sites":{"get":{"parameters":[{"description":"When creating, publish at this name. On the list, find the site with it.","in":"query","name":"slug","required":false,"schema":{"type":"string"}},{"description":"A name for your own reference.","in":"query","name":"name","required":false,"schema":{"type":"string"}},{"description":"Only sites with or without a slug.","in":"query","name":"public","required":false,"schema":{"type":"boolean"}},{"description":"Show deleted sites instead of the others.","in":"query","name":"deleted","required":false,"schema":{"type":"boolean"}},{"description":"Items per page, up to 1,000.","in":"query","name":"limit","required":false,"schema":{"type":"integer"}},{"description":"next_cursor from the previous page.","in":"query","name":"cursor","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"items":{"items":{"properties":{"created_at":{"format":"date-time","type":"string"},"deleted_at":{"format":"date-time","type":["string","null"]},"draft":{"type":["integer","null"]},"former_slugs":{"items":{"type":"string"},"type":"array"},"id":{"type":"string"},"live":{"type":["integer","null"]},"name":{"type":["string","null"]},"newest":{"type":"integer"},"slug":{"type":["string","null"]},"urls":{"properties":{"file":{"type":["string","null"]},"private":{"type":"string"},"public":{"type":["string","null"]}},"required":["private","public"],"type":"object"}},"required":["id","name","slug","former_slugs","live","draft","newest","created_at","deleted_at","urls"],"type":"object"},"type":"array"},"next_cursor":{"type":["string","null"]}},"required":["items","next_cursor"],"type":"object"}}},"description":"Success."},"default":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"type":"object"}}},"description":"An error. code is stable, and hint says how to fix it."}},"security":[{"key":[]},{"connection":["sites:read"]}],"summary":"List your sites, newest first."},"post":{"parameters":[{"description":"Treat the body as this one file, rather than a tarball.","in":"query","name":"file","required":false,"schema":{"type":"string"}},{"description":"A name for your own reference.","in":"query","name":"name","required":false,"schema":{"type":"string"}},{"description":"When creating, publish at this name. On the list, find the site with it.","in":"query","name":"slug","required":false,"schema":{"type":"string"}},{"description":"Leave live where it is, and make this the draft. true or false.","in":"query","name":"draft","required":false,"schema":{"type":"boolean"}},{"description":"A note saved with the revision, up to 1,000 encoded bytes.","in":"query","name":"message","required":false,"schema":{"type":"string"}},{"description":"The content type, overriding the one chosen from the extension.","in":"query","name":"type","required":false,"schema":{"type":"string"}},{"description":"Makes creating a site safe to retry. Repeating it returns the same site with created:false, and changes nothing.","in":"header","name":"Idempotency-Key","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/gzip":{"schema":{"description":"A gzip-compressed tar archive, or with ?file=, one file's bytes.","format":"binary","type":"string"}},"application/json":{"schema":{"properties":{"base":{"description":"Build on this revision: a number, live or draft. Then files only names what changes.","type":"string"},"draft":{"description":"Leave live where it is, and make this the draft.","type":"boolean"},"files":{"description":"The files to upload. Without base, this is the whole site.","items":{"properties":{"path":{"description":"Relative path with forward slashes, up to 900 bytes.","type":"string"},"sha256":{"description":"SHA-256 of the contents, as 64 lowercase hex characters.","type":"string"},"size":{"description":"Size in bytes, up to 5 GB.","type":"integer"},"type":{"description":"Content type. Defaults to one chosen from the extension.","type":"string"}},"required":["path","size","sha256"],"type":"object"},"type":"array"},"if_revision":{"description":"Fail with 409 site_moved if the newest revision isn't this one.","type":["integer","null"]},"message":{"description":"A note saved with the revision.","type":"string"},"remove":{"description":"With base, paths to leave out of the new revision.","items":{"type":"string"},"type":"array"}},"required":["files"],"type":"object"}},"application/octet-stream":{"schema":{"description":"A gzip-compressed tar archive, or with ?file=, one file's bytes.","format":"binary","type":"string"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"changes":{"properties":{"added":{"type":"integer"},"changed":{"type":"integer"},"removed":{"type":"integer"},"unchanged":{"type":"integer"}},"required":["added","changed","removed","unchanged"],"type":"object"},"created":{"type":"boolean"},"created_at":{"format":"date-time","type":"string"},"deleted_at":{"format":"date-time","type":["string","null"]},"draft":{"type":["integer","null"]},"draft_cleared":{"type":["integer","null"]},"former_slugs":{"items":{"type":"string"},"type":"array"},"id":{"type":"string"},"live":{"type":["integer","null"]},"name":{"type":["string","null"]},"newest":{"type":"integer"},"octet_stream":{"items":{"type":"string"},"type":"array"},"replaced_redirect":{"properties":{"site":{"type":"string"},"slug":{"type":"string"}},"required":["slug","site"],"type":["object","null"]},"revision":{"type":"integer"},"skipped":{"items":{"type":"string"},"type":"array"},"skipped_count":{"type":"integer"},"slug":{"type":["string","null"]},"urls":{"properties":{"file":{"type":["string","null"]},"private":{"type":"string"},"public":{"type":["string","null"]}},"required":["private","public"],"type":"object"},"warnings":{"items":{"type":"string"},"type":"array"}},"required":["id","name","slug","former_slugs","live","draft","newest","created_at","deleted_at","urls","revision","created","changes","skipped","skipped_count"],"type":"object"}}},"description":"Success."},"default":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"type":"object"}}},"description":"An error. code is stable, and hint says how to fix it."}},"security":[{"key":[]},{"connection":["sites"]}],"summary":"Create a site and upload its first revision: a .tar.gz, one file with ?file=, or a JSON hash list. A hash list returns an upload to finish instead."}},"/v1/sites/{id}":{"delete":{"parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}},{"description":"Destroy everything for good, instead of a delete that can be undone.","in":"query","name":"erase","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"created_at":{"format":"date-time","type":"string"},"deleted_at":{"format":"date-time","type":["string","null"]},"draft":{"type":["integer","null"]},"former_slugs":{"items":{"type":"string"},"type":"array"},"id":{"type":"string"},"live":{"type":["integer","null"]},"name":{"type":["string","null"]},"newest":{"type":"integer"},"slug":{"type":["string","null"]},"urls":{"properties":{"file":{"type":["string","null"]},"private":{"type":"string"},"public":{"type":["string","null"]}},"required":["private","public"],"type":"object"}},"required":["id","name","slug","former_slugs","live","draft","newest","created_at","deleted_at","urls"],"type":"object"}}},"description":"Success."},"default":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"type":"object"}}},"description":"An error. code is stable, and hint says how to fix it."}},"security":[{"key":[]},{"connection":["sites"]}],"summary":"Take every URL offline and free the slug, keeping the bytes. ?erase=true destroys everything, and returns 202 until it's done."},"get":{"parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"created_at":{"format":"date-time","type":"string"},"deleted_at":{"format":"date-time","type":["string","null"]},"draft":{"type":["integer","null"]},"former_slugs":{"items":{"type":"string"},"type":"array"},"id":{"type":"string"},"live":{"type":["integer","null"]},"name":{"type":["string","null"]},"newest":{"type":"integer"},"slug":{"type":["string","null"]},"urls":{"properties":{"file":{"type":["string","null"]},"private":{"type":"string"},"public":{"type":["string","null"]}},"required":["private","public"],"type":"object"}},"required":["id","name","slug","former_slugs","live","draft","newest","created_at","deleted_at","urls"],"type":"object"}}},"description":"Success."},"default":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"type":"object"}}},"description":"An error. code is stable, and hint says how to fix it."}},"security":[{"key":[]},{"connection":["sites:read"]}],"summary":"Show one site and its URLs."},"patch":{"parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"deleted":{"description":"Only false, which undoes a delete.","type":["boolean","null"]},"draft":{"description":"Make this revision the draft, or null to abandon the draft.","type":["integer","null"]},"former_slugs":{"description":"The old names to keep. This can only remove names.","items":{"type":"string"},"type":"array"},"if_revision":{"description":"Fail with 409 site_moved if the newest revision isn't this one.","type":["integer","null"]},"live":{"description":"Make this revision live.","type":["integer","null"]},"name":{"description":"A name for your own reference.","type":["string","null"]},"slug":{"description":"The public name. Renaming leaves a redirect. null takes the site down and frees the name.","type":["string","null"]}},"type":"object"}}},"required":false},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"created_at":{"format":"date-time","type":"string"},"deleted_at":{"format":"date-time","type":["string","null"]},"draft":{"type":["integer","null"]},"former_slugs":{"items":{"type":"string"},"type":"array"},"id":{"type":"string"},"live":{"type":["integer","null"]},"name":{"type":["string","null"]},"newest":{"type":"integer"},"replaced_redirect":{"properties":{"site":{"type":"string"},"slug":{"type":"string"}},"required":["slug","site"],"type":["object","null"]},"revived_links":{"items":{"properties":{"created_at":{"format":"date-time","type":"string"},"expires_at":{"format":"date-time","type":["string","null"]},"id":{"type":"string"},"label":{"type":"string"},"last_seen_at":{"format":"date-time","type":["string","null"]},"private":{"type":"boolean"},"revision":{"oneOf":[{"enum":["live","draft"],"type":"string"},{"type":"integer"}]},"url":{"type":"string"}},"required":["id","label","revision","private","url","created_at","expires_at","last_seen_at"],"type":"object"},"type":"array"},"slug":{"type":["string","null"]},"urls":{"properties":{"file":{"type":["string","null"]},"private":{"type":"string"},"public":{"type":["string","null"]}},"required":["private","public"],"type":"object"},"warnings":{"items":{"type":"string"},"type":"array"}},"required":["id","name","slug","former_slugs","live","draft","newest","created_at","deleted_at","urls"],"type":"object"}}},"description":"Success."},"default":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"type":"object"}}},"description":"An error. code is stable, and hint says how to fix it."}},"security":[{"key":[]},{"connection":["sites"]}],"summary":"Change live, draft, slug, name or former_slugs in one atomic write. {\"deleted\":false} undoes a delete."}},"/v1/sites/{id}/erase":{"post":{"parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"path":{"description":"The file's path.","type":"string"},"sha256":{"description":"The SHA-256 of the version to destroy.","type":"string"}},"required":["path","sha256"],"type":"object"}}},"required":false},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"erased_revisions":{"items":{"type":"integer"},"type":"array"},"erased_versions":{"type":"integer"},"path":{"type":"string"}},"required":["path","erased_revisions","erased_versions"],"type":"object"}}},"description":"Success."},"default":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"type":"object"}}},"description":"An error. code is stable, and hint says how to fix it."}},"security":[{"key":[]},{"connection":["sites:erase"]}],"summary":"Destroy one uploaded version of a file, and every revision that used it."}},"/v1/sites/{id}/files/{path}":{"delete":{"parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}},{"in":"path","name":"path","required":true,"schema":{"type":"string"}},{"description":"Leave live where it is, and make this the draft. true or false.","in":"query","name":"draft","required":false,"schema":{"type":"boolean"}},{"description":"The revision to build on: a number, live or draft.","in":"query","name":"base","required":false,"schema":{"type":"string"}},{"description":"A note saved with the revision, up to 1,000 encoded bytes.","in":"query","name":"message","required":false,"schema":{"type":"string"}},{"description":"Fail with 409 site_moved if the newest revision isn't this one.","in":"query","name":"if_revision","required":false,"schema":{"type":"integer"}}],"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"changes":{"properties":{"added":{"type":"integer"},"changed":{"type":"integer"},"removed":{"type":"integer"},"unchanged":{"type":"integer"}},"required":["added","changed","removed","unchanged"],"type":"object"},"created":{"type":"boolean"},"created_at":{"format":"date-time","type":"string"},"deleted_at":{"format":"date-time","type":["string","null"]},"draft":{"type":["integer","null"]},"draft_cleared":{"type":["integer","null"]},"former_slugs":{"items":{"type":"string"},"type":"array"},"id":{"type":"string"},"live":{"type":["integer","null"]},"name":{"type":["string","null"]},"newest":{"type":"integer"},"octet_stream":{"items":{"type":"string"},"type":"array"},"replaced_redirect":{"properties":{"site":{"type":"string"},"slug":{"type":"string"}},"required":["slug","site"],"type":["object","null"]},"revision":{"type":"integer"},"skipped":{"items":{"type":"string"},"type":"array"},"skipped_count":{"type":"integer"},"slug":{"type":["string","null"]},"urls":{"properties":{"file":{"type":["string","null"]},"private":{"type":"string"},"public":{"type":["string","null"]}},"required":["private","public"],"type":"object"},"warnings":{"items":{"type":"string"},"type":"array"}},"required":["id","name","slug","former_slugs","live","draft","newest","created_at","deleted_at","urls","revision","created","changes","skipped","skipped_count"],"type":"object"}}},"description":"Success."},"default":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"type":"object"}}},"description":"An error. code is stable, and hint says how to fix it."}},"security":[{"key":[]},{"connection":["sites"]}],"summary":"Remove one file, creating a new revision."},"put":{"parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}},{"in":"path","name":"path","required":true,"schema":{"type":"string"}},{"description":"Leave live where it is, and make this the draft. true or false.","in":"query","name":"draft","required":false,"schema":{"type":"boolean"}},{"description":"The revision to build on: a number, live or draft.","in":"query","name":"base","required":false,"schema":{"type":"string"}},{"description":"A note saved with the revision, up to 1,000 encoded bytes.","in":"query","name":"message","required":false,"schema":{"type":"string"}},{"description":"The content type, overriding the one chosen from the extension.","in":"query","name":"type","required":false,"schema":{"type":"string"}},{"description":"Fail with 409 site_moved if the newest revision isn't this one.","in":"query","name":"if_revision","required":false,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/gzip":{"schema":{"description":"The file's bytes.","format":"binary","type":"string"}},"application/octet-stream":{"schema":{"description":"The file's bytes.","format":"binary","type":"string"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"changes":{"properties":{"added":{"type":"integer"},"changed":{"type":"integer"},"removed":{"type":"integer"},"unchanged":{"type":"integer"}},"required":["added","changed","removed","unchanged"],"type":"object"},"created":{"type":"boolean"},"created_at":{"format":"date-time","type":"string"},"deleted_at":{"format":"date-time","type":["string","null"]},"draft":{"type":["integer","null"]},"draft_cleared":{"type":["integer","null"]},"former_slugs":{"items":{"type":"string"},"type":"array"},"id":{"type":"string"},"live":{"type":["integer","null"]},"name":{"type":["string","null"]},"newest":{"type":"integer"},"octet_stream":{"items":{"type":"string"},"type":"array"},"replaced_redirect":{"properties":{"site":{"type":"string"},"slug":{"type":"string"}},"required":["slug","site"],"type":["object","null"]},"revision":{"type":"integer"},"skipped":{"items":{"type":"string"},"type":"array"},"skipped_count":{"type":"integer"},"slug":{"type":["string","null"]},"urls":{"properties":{"file":{"type":["string","null"]},"private":{"type":"string"},"public":{"type":["string","null"]}},"required":["private","public"],"type":"object"},"warnings":{"items":{"type":"string"},"type":"array"}},"required":["id","name","slug","former_slugs","live","draft","newest","created_at","deleted_at","urls","revision","created","changes","skipped","skipped_count"],"type":"object"}}},"description":"Success."},"default":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"type":"object"}}},"description":"An error. code is stable, and hint says how to fix it."}},"security":[{"key":[]},{"connection":["sites"]}],"summary":"Add or replace one file, creating a new revision."}},"/v1/sites/{id}/history":{"get":{"parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}},{"description":"Items per page, up to 1,000.","in":"query","name":"limit","required":false,"schema":{"type":"integer"}},{"description":"next_cursor from the previous page.","in":"query","name":"cursor","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"items":{"items":{"properties":{"at":{"format":"date-time","type":"string"},"draft":{"type":["integer","null"]},"live":{"type":["integer","null"]},"slug":{"type":["string","null"]}},"required":["at","live","draft","slug"],"type":"object"},"type":"array"},"next_cursor":{"type":["string","null"]}},"required":["items","next_cursor"],"type":"object"}}},"description":"Success."},"default":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"type":"object"}}},"description":"An error. code is stable, and hint says how to fix it."}},"security":[{"key":[]},{"connection":["sites:read"]}],"summary":"List every change to live, the draft and the slug, newest first."}},"/v1/sites/{id}/links":{"get":{"parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}},{"description":"Items per page, up to 1,000.","in":"query","name":"limit","required":false,"schema":{"type":"integer"}},{"description":"next_cursor from the previous page.","in":"query","name":"cursor","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"items":{"items":{"properties":{"created_at":{"format":"date-time","type":"string"},"expires_at":{"format":"date-time","type":["string","null"]},"id":{"type":"string"},"label":{"type":"string"},"last_seen_at":{"format":"date-time","type":["string","null"]},"private":{"type":"boolean"},"revision":{"oneOf":[{"enum":["live","draft"],"type":"string"},{"type":"integer"}]},"url":{"type":"string"}},"required":["id","label","revision","private","url","created_at","expires_at","last_seen_at"],"type":"object"},"type":"array"},"next_cursor":{"type":["string","null"]}},"required":["items","next_cursor"],"type":"object"}}},"description":"Success."},"default":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"type":"object"}}},"description":"An error. code is stable, and hint says how to fix it."}},"security":[{"key":[]},{"connection":["sites:read"]}],"summary":"List every link with its URL, newest first."},"post":{"parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"expires_in":{"description":"Seconds until the URL stops working, up to 100 years. null removes an expiry.","type":["integer","null"]},"label":{"description":"Who or what it's for. Required when creating a link.","type":["string","null"]},"revision":{"description":"live, draft, or a revision number to pin. Defaults to live.","oneOf":[{"enum":["live","draft"],"type":"string"},{"type":"integer"}]}},"type":"object"}}},"required":false},"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"created_at":{"format":"date-time","type":"string"},"expires_at":{"format":"date-time","type":["string","null"]},"id":{"type":"string"},"label":{"type":"string"},"last_seen_at":{"format":"date-time","type":["string","null"]},"private":{"type":"boolean"},"revision":{"oneOf":[{"enum":["live","draft"],"type":"string"},{"type":"integer"}]},"url":{"type":"string"}},"required":["id","label","revision","private","url","created_at","expires_at","last_seen_at"],"type":"object"}}},"description":"Success."},"default":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"type":"object"}}},"description":"An error. code is stable, and hint says how to fix it."}},"security":[{"key":[]},{"connection":["sites"]}],"summary":"Create a capability URL."}},"/v1/sites/{id}/links/{link}":{"delete":{"parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}},{"in":"path","name":"link","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"private":{"properties":{"created_at":{"format":"date-time","type":"string"},"expires_at":{"format":"date-time","type":["string","null"]},"id":{"type":"string"},"label":{"type":"string"},"last_seen_at":{"format":"date-time","type":["string","null"]},"private":{"type":"boolean"},"revision":{"oneOf":[{"enum":["live","draft"],"type":"string"},{"type":"integer"}]},"url":{"type":"string"}},"required":["id","label","revision","private","url","created_at","expires_at","last_seen_at"],"type":["object","null"]},"revoked":{"type":"string"}},"required":["revoked"],"type":"object"}}},"description":"Success."},"default":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"type":"object"}}},"description":"An error. code is stable, and hint says how to fix it."}},"security":[{"key":[]},{"connection":["sites"]}],"summary":"Revoke a URL. The next request returns 404."},"patch":{"parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}},{"in":"path","name":"link","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"expires_in":{"description":"Seconds until the URL stops working, up to 100 years. null removes an expiry.","type":["integer","null"]},"label":{"description":"Who or what it's for. Required when creating a link.","type":["string","null"]},"revision":{"description":"live, draft, or a revision number to pin. Defaults to live.","oneOf":[{"enum":["live","draft"],"type":"string"},{"type":"integer"}]}},"type":"object"}}},"required":false},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"created_at":{"format":"date-time","type":"string"},"expires_at":{"format":"date-time","type":["string","null"]},"id":{"type":"string"},"label":{"type":"string"},"last_seen_at":{"format":"date-time","type":["string","null"]},"private":{"type":"boolean"},"revision":{"oneOf":[{"enum":["live","draft"],"type":"string"},{"type":"integer"}]},"url":{"type":"string"}},"required":["id","label","revision","private","url","created_at","expires_at","last_seen_at"],"type":"object"}}},"description":"Success."},"default":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"type":"object"}}},"description":"An error. code is stable, and hint says how to fix it."}},"security":[{"key":[]},{"connection":["sites"]}],"summary":"Change a link's target, label or expiry. Its URL stays the same."}},"/v1/sites/{id}/revisions":{"get":{"parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}},{"description":"Items per page, up to 1,000.","in":"query","name":"limit","required":false,"schema":{"type":"integer"}},{"description":"next_cursor from the previous page.","in":"query","name":"cursor","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"items":{"items":{"properties":{"changes":{"properties":{"added":{"type":"integer"},"changed":{"type":"integer"},"removed":{"type":"integer"},"unchanged":{"type":"integer"}},"required":["added","changed","removed","unchanged"],"type":"object"},"created_at":{"format":"date-time","type":"string"},"draft":{"type":"boolean"},"file_count":{"type":"integer"},"live":{"type":"boolean"},"message":{"type":["string","null"]},"revision":{"type":"integer"}},"required":["revision","created_at","message","file_count","changes","live","draft"],"type":"object"},"type":"array"},"next_cursor":{"type":["string","null"]}},"required":["items","next_cursor"],"type":"object"}}},"description":"Success."},"default":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"type":"object"}}},"description":"An error. code is stable, and hint says how to fix it."}},"security":[{"key":[]},{"connection":["sites:read"]}],"summary":"List revisions, newest first."},"post":{"parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}},{"description":"Treat the body as this one file, rather than a tarball.","in":"query","name":"file","required":false,"schema":{"type":"string"}},{"description":"Leave live where it is, and make this the draft. true or false.","in":"query","name":"draft","required":false,"schema":{"type":"boolean"}},{"description":"A note saved with the revision, up to 1,000 encoded bytes.","in":"query","name":"message","required":false,"schema":{"type":"string"}},{"description":"The content type, overriding the one chosen from the extension.","in":"query","name":"type","required":false,"schema":{"type":"string"}},{"description":"Fail with 409 site_moved if the newest revision isn't this one.","in":"query","name":"if_revision","required":false,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/gzip":{"schema":{"description":"A gzip-compressed tar archive, or with ?file=, one file's bytes.","format":"binary","type":"string"}},"application/octet-stream":{"schema":{"description":"A gzip-compressed tar archive, or with ?file=, one file's bytes.","format":"binary","type":"string"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"changes":{"properties":{"added":{"type":"integer"},"changed":{"type":"integer"},"removed":{"type":"integer"},"unchanged":{"type":"integer"}},"required":["added","changed","removed","unchanged"],"type":"object"},"created":{"type":"boolean"},"created_at":{"format":"date-time","type":"string"},"deleted_at":{"format":"date-time","type":["string","null"]},"draft":{"type":["integer","null"]},"draft_cleared":{"type":["integer","null"]},"former_slugs":{"items":{"type":"string"},"type":"array"},"id":{"type":"string"},"live":{"type":["integer","null"]},"name":{"type":["string","null"]},"newest":{"type":"integer"},"octet_stream":{"items":{"type":"string"},"type":"array"},"replaced_redirect":{"properties":{"site":{"type":"string"},"slug":{"type":"string"}},"required":["slug","site"],"type":["object","null"]},"revision":{"type":"integer"},"skipped":{"items":{"type":"string"},"type":"array"},"skipped_count":{"type":"integer"},"slug":{"type":["string","null"]},"urls":{"properties":{"file":{"type":["string","null"]},"private":{"type":"string"},"public":{"type":["string","null"]}},"required":["private","public"],"type":"object"},"warnings":{"items":{"type":"string"},"type":"array"}},"required":["id","name","slug","former_slugs","live","draft","newest","created_at","deleted_at","urls","revision","created","changes","skipped","skipped_count"],"type":"object"}}},"description":"Success."},"default":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"type":"object"}}},"description":"An error. code is stable, and hint says how to fix it."}},"security":[{"key":[]},{"connection":["sites"]}],"summary":"Replace the whole site with a new revision, from a .tar.gz or one file with ?file=."}},"/v1/sites/{id}/revisions/{n}":{"delete":{"parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}},{"in":"path","name":"n","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"deleted":{"type":"integer"},"removed_files":{"type":"integer"},"retained":{"items":{"properties":{"path":{"type":"string"},"used_by":{"items":{"type":"integer"},"type":"array"}},"required":["path","used_by"],"type":"object"},"type":"array"},"retained_count":{"type":"integer"}},"required":["deleted","removed_files","retained","retained_count"],"type":"object"}}},"description":"Success."},"default":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"type":"object"}}},"description":"An error. code is stable, and hint says how to fix it."}},"security":[{"key":[]},{"connection":["sites:erase"]}],"summary":"Remove a revision and any file versions only it used. The response lists what was retained."},"get":{"parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}},{"in":"path","name":"n","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"changes":{"properties":{"added":{"type":"integer"},"changed":{"type":"integer"},"removed":{"type":"integer"},"unchanged":{"type":"integer"}},"required":["added","changed","removed","unchanged"],"type":"object"},"created_at":{"format":"date-time","type":"string"},"draft":{"type":"boolean"},"file_count":{"type":"integer"},"live":{"type":"boolean"},"message":{"type":["string","null"]},"revision":{"type":"integer"}},"required":["revision","created_at","message","file_count","changes","live","draft"],"type":"object"}}},"description":"Success."},"default":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"type":"object"}}},"description":"An error. code is stable, and hint says how to fix it."}},"security":[{"key":[]},{"connection":["sites:read"]}],"summary":"Show one revision. {n} can be a number, live or draft."}},"/v1/sites/{id}/revisions/{n}/changes":{"get":{"parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}},{"in":"path","name":"n","required":true,"schema":{"type":"string"}},{"description":"The revision to compare with: a number, live or draft. Defaults to live.","in":"query","name":"against","required":false,"schema":{"type":"string"}},{"description":"Items per page, up to 1,000.","in":"query","name":"limit","required":false,"schema":{"type":"integer"}},{"description":"next_cursor from the previous page.","in":"query","name":"cursor","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"items":{"items":{"properties":{"change":{"type":"string"},"path":{"type":"string"}},"required":["path","change"],"type":"object"},"type":"array"},"next_cursor":{"type":["string","null"]}},"required":["items","next_cursor"],"type":"object"}}},"description":"Success."},"default":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"type":"object"}}},"description":"An error. code is stable, and hint says how to fix it."}},"security":[{"key":[]},{"connection":["sites:read"]}],"summary":"List paths that differ from another revision."}},"/v1/sites/{id}/revisions/{n}/files":{"get":{"parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}},{"in":"path","name":"n","required":true,"schema":{"type":"string"}},{"description":"Only paths starting with this.","in":"query","name":"prefix","required":false,"schema":{"type":"string"}},{"description":"Items per page, up to 1,000.","in":"query","name":"limit","required":false,"schema":{"type":"integer"}},{"description":"next_cursor from the previous page.","in":"query","name":"cursor","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"items":{"items":{"properties":{"path":{"type":"string"},"sha256":{"type":"string"},"size":{"type":"integer"},"type":{"type":"string"}},"required":["path","size","sha256","type"],"type":"object"},"type":"array"},"next_cursor":{"type":["string","null"]}},"required":["items","next_cursor"],"type":"object"}}},"description":"Success."},"default":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"type":"object"}}},"description":"An error. code is stable, and hint says how to fix it."}},"security":[{"key":[]},{"connection":["sites:read"]}],"summary":"List a revision's files, sorted by path."}},"/v1/sites/{id}/revisions/{n}/files/{path}":{"get":{"parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}},{"in":"path","name":"n","required":true,"schema":{"type":"string"}},{"in":"path","name":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success."},"default":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"type":"object"}}},"description":"An error. code is stable, and hint says how to fix it."}},"security":[{"key":[]},{"connection":["sites:read"]}],"summary":"Return a file's exact bytes, as a download."}},"/v1/sites/{id}/uploads":{"post":{"parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}},{"description":"Leave live where it is, and make this the draft. true or false.","in":"query","name":"draft","required":false,"schema":{"type":"boolean"}},{"description":"A note saved with the revision, up to 1,000 encoded bytes.","in":"query","name":"message","required":false,"schema":{"type":"string"}},{"description":"Fail with 409 site_moved if the newest revision isn't this one.","in":"query","name":"if_revision","required":false,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"base":{"description":"Build on this revision: a number, live or draft. Then files only names what changes.","type":"string"},"draft":{"description":"Leave live where it is, and make this the draft.","type":"boolean"},"files":{"description":"The files to upload. Without base, this is the whole site.","items":{"properties":{"path":{"description":"Relative path with forward slashes, up to 900 bytes.","type":"string"},"sha256":{"description":"SHA-256 of the contents, as 64 lowercase hex characters.","type":"string"},"size":{"description":"Size in bytes, up to 5 GB.","type":"integer"},"type":{"description":"Content type. Defaults to one chosen from the extension.","type":"string"}},"required":["path","size","sha256"],"type":"object"},"type":"array"},"if_revision":{"description":"Fail with 409 site_moved if the newest revision isn't this one.","type":["integer","null"]},"message":{"description":"A note saved with the revision.","type":"string"},"remove":{"description":"With base, paths to leave out of the new revision.","items":{"type":"string"},"type":"array"}},"required":["files"],"type":"object"}}},"required":false},"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"expires_at":{"format":"date-time","type":"string"},"id":{"type":"string"},"missing":{"items":{"properties":{"headers":{"additionalProperties":{"type":"string"},"type":"object"},"path":{"type":"string"},"url":{"type":"string"}},"required":["path","url","headers"],"type":"object"},"type":"array"},"revision":{"type":["integer","null"]},"site":{"type":"string"},"skipped":{"items":{"type":"string"},"type":"array"},"skipped_count":{"type":"integer"},"state":{"type":"string"}},"required":["id","site","state","expires_at","missing","skipped","skipped_count"],"type":"object"}}},"description":"Success."},"default":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"type":"object"}}},"description":"An error. code is stable, and hint says how to fix it."}},"security":[{"key":[]},{"connection":["sites"]}],"summary":"Start an upload from a JSON list of paths, sizes and hashes. Returns a signed URL for each file B2 doesn't have. PUT each with exactly the headers given, then finish."}},"/v1/sites/{id}/uploads/{upload}":{"delete":{"parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}},{"in":"path","name":"upload","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success."},"default":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"type":"object"}}},"description":"An error. code is stable, and hint says how to fix it."}},"security":[{"key":[]},{"connection":["sites"]}],"summary":"Cancel an upload, and remove any bytes it already sent."},"get":{"parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}},{"in":"path","name":"upload","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"expires_at":{"format":"date-time","type":"string"},"id":{"type":"string"},"missing":{"items":{"properties":{"headers":{"additionalProperties":{"type":"string"},"type":"object"},"path":{"type":"string"},"url":{"type":"string"}},"required":["path","url","headers"],"type":"object"},"type":"array"},"revision":{"type":["integer","null"]},"site":{"type":"string"},"skipped":{"items":{"type":"string"},"type":"array"},"skipped_count":{"type":"integer"},"state":{"type":"string"}},"required":["id","site","state","expires_at","missing","skipped","skipped_count"],"type":"object"}}},"description":"Success."},"default":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"type":"object"}}},"description":"An error. code is stable, and hint says how to fix it."}},"security":[{"key":[]},{"connection":["sites"]}],"summary":"Show an upload's state and what's missing, with fresh URLs."}},"/v1/sites/{id}/uploads/{upload}/finish":{"post":{"parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}},{"in":"path","name":"upload","required":true,"schema":{"type":"string"}}],"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"changes":{"properties":{"added":{"type":"integer"},"changed":{"type":"integer"},"removed":{"type":"integer"},"unchanged":{"type":"integer"}},"required":["added","changed","removed","unchanged"],"type":"object"},"created":{"type":"boolean"},"created_at":{"format":"date-time","type":"string"},"deleted_at":{"format":"date-time","type":["string","null"]},"draft":{"type":["integer","null"]},"draft_cleared":{"type":["integer","null"]},"former_slugs":{"items":{"type":"string"},"type":"array"},"id":{"type":"string"},"live":{"type":["integer","null"]},"name":{"type":["string","null"]},"newest":{"type":"integer"},"octet_stream":{"items":{"type":"string"},"type":"array"},"replaced_redirect":{"properties":{"site":{"type":"string"},"slug":{"type":"string"}},"required":["slug","site"],"type":["object","null"]},"revision":{"type":"integer"},"skipped":{"items":{"type":"string"},"type":"array"},"skipped_count":{"type":"integer"},"slug":{"type":["string","null"]},"urls":{"properties":{"file":{"type":["string","null"]},"private":{"type":"string"},"public":{"type":["string","null"]}},"required":["private","public"],"type":"object"},"warnings":{"items":{"type":"string"},"type":"array"}},"required":["id","name","slug","former_slugs","live","draft","newest","created_at","deleted_at","urls","revision","created","changes","skipped","skipped_count"],"type":"object"}}},"description":"Success."},"default":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"code":{"type":"string"},"hint":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"type":"object"}}},"description":"An error. code is stable, and hint says how to fix it."}},"security":[{"key":[]},{"connection":["sites"]}],"summary":"Check that every file landed and create the revision."}}},"security":[{"key":[]}],"servers":[{"url":"https://api.neuralcolumn.com"}]}
