Storyden
Nodes

Node Version Create

Create the single mutable draft checkpoint for a node. This operation requires either `SUBMIT_LIBRARY_NODE_CHANGES` or `MANAGE_LIBRARY` permission. The draft starts as a full snapshot of the node's current versioned page fields. Fields supplied in the request overlay that snapshot, omitted fields keep the snapshotted value, and explicit null values clear nullable fields. A node can have only one draft. If a draft already exists for the node, this operation returns a conflict. Drafts do not mutate the target node until the draft is applied through the version status endpoint by a member with `MANAGE_LIBRARY`.

POST/nodes/{node_slug}/versions

Create the single mutable draft checkpoint for a node.

This operation requires either SUBMIT_LIBRARY_NODE_CHANGES or MANAGE_LIBRARY permission. The draft starts as a full snapshot of the node's current versioned page fields. Fields supplied in the request overlay that snapshot, omitted fields keep the snapshotted value, and explicit null values clear nullable fields.

A node can have only one draft. If a draft already exists for the node, this operation returns a conflict. Drafts do not mutate the target node until the draft is applied through the version status endpoint by a member with MANAGE_LIBRARY.

storyden-session<token>

In: cookie

Path Parameters

node_slug*string

Unique node Slug.

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Initial overlay for a draft checkpoint. Omitted fields keep the target node's current value in the new draft snapshot. Nullable fields can be set to null to clear them. Properties are replace-all and are not merged with existing values when the version is applied.

Response Body

application/json

application/json

curl -X POST "https://example.com/nodes/cc5lnd2s1s4652adtu50/versions" \  -H "Content-Type: application/json" \  -d '{}'
{
  "id": "cc5lnd2s1s4652adtu50",
  "created_at": "2019-08-24T14:15:22Z",
  "updated_at": "2019-08-24T14:15:22Z",
  "node_id": "cc5lnd2s1s4652adtu50",
  "author": {
    "id": "cc5lnd2s1s4652adtu50",
    "joined": "2019-08-24T14:15:22Z",
    "suspended": "2019-08-24T14:15:22Z",
    "handle": "Southclaws",
    "name": "Barnaby Keene",
    "signature": "<body><p>Sent with love from London!</p></body>",
    "roles": [
      {
        "badge": true,
        "default": true,
        "id": "cc5lnd2s1s4652adtu50",
        "name": "string",
        "colour": "string",
        "meta": {}
      }
    ]
  },
  "status": "draft",
  "previous": {
    "id": "cc5lnd2s1s4652adtu50",
    "created_at": "2019-08-24T14:15:22Z",
    "updated_at": "2019-08-24T14:15:22Z",
    "author": {
      "id": "cc5lnd2s1s4652adtu50",
      "joined": "2019-08-24T14:15:22Z",
      "suspended": "2019-08-24T14:15:22Z",
      "handle": "Southclaws",
      "name": "Barnaby Keene",
      "signature": "<body><p>Sent with love from London!</p></body>",
      "roles": [
        {
          "badge": true,
          "default": true,
          "id": "cc5lnd2s1s4652adtu50",
          "name": "string",
          "colour": "string",
          "meta": {}
        }
      ]
    },
    "status": "draft"
  },
  "name": "string",
  "slug": "string",
  "description": "string",
  "content": "string",
  "properties": [
    {
      "fid": "cc5lnd2s1s4652adtu50",
      "name": "string",
      "value": "string",
      "type": "text",
      "sort": "string"
    }
  ],
  "meta": {}
}
Empty
Empty
Empty
Empty
{
  "type": "string",
  "title": "string",
  "detail": "string",
  "trace_id": "string",
  "metadata": {}
}