Draft & publish

Discard draft changes (all, or only what you name)

Throws away staged changes and brings the draft back to what is live. Only the draft is touched: the live site and its published version stay as they are. Name keys and/or routes to discard part of the draft, or send key for one content file. Send an empty body to discard everything, which cannot be undone.

post/api/v1/sites/{slug}/revert

Request

  • Base URL: https://api.dotsy.ai
  • URL: https://api.dotsy.ai/api/v1/sites/{slug}/revert
  • Auth: one of:
    • HTTP bearer
    • HTTP bearer

Path parameters

slugstring required
Example:acme-studio

Site slug or site id (UUID). An old slug answers 301/308 and a site id 307 to the canonical slug path.

Request body

keystring

Discard the draft of this one content key. Ignored when keys or routes is non-empty.

keysstring[]

Discard the drafts of these content keys. Unknown keys are ignored.

routesstring[]

Discard the drafts of these route paths. Unknown paths are ignored. Combine with keys for a page and its route.

Example request

{
  "key": "blog/launch.html",
  "keys": [
    "blog/launch.html"
  ],
  "routes": [
    "/blog/launch"
  ]
}

Response

Discarded.

oktrue required
revertedinteger required

How many staged items were discarded. 0 when nothing matched.

Changes

No recorded changes to this operation across all 1 revision of this API.