Storyden
Nodes

Node Version Update

Update the node's single draft checkpoint. This operation is for draft autosave and editing only. It does not change version status and cannot apply a version to the target node. The version must still have draft status and the caller must be the draft author or have `MANAGE_LIBRARY`. Fields omitted from the request are left unchanged on the draft snapshot. Explicit null values clear nullable fields. Properties are a complete desired-state list for the target node properties: when the version is applied, the list replaces the node's existing property set rather than merging with it.

PATCH/nodes/{node_slug}/versions/{version_id}

Update the node's single draft checkpoint.

This operation is for draft autosave and editing only. It does not change version status and cannot apply a version to the target node. The version must still have draft status and the caller must be the draft author or have MANAGE_LIBRARY.

Fields omitted from the request are left unchanged on the draft snapshot. Explicit null values clear nullable fields. Properties are a complete desired-state list for the target node properties: when the version is applied, the list replaces the node's existing property set rather than merging with it.

Authorization

storyden-session<token>

In: cookie

Path Parameters

node_slug*string

Unique node Slug.

Formatxid
version_id*string

Node version ID.

Formatxid

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Updates to a draft checkpoint snapshot. This does not change version status. Omitted fields keep the current draft value. 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 PATCH "https://example.com/nodes/string/versions/string" \  -H "Content-Type: application/json" \  -d '{}'
{  "id": "string",  "created_at": "2019-08-24T14:15:22Z",  "updated_at": "2019-08-24T14:15:22Z",  "node_id": "string",  "author": {    "id": "string",    "joined": "2019-08-24T14:15:22Z",    "suspended": "2019-08-24T14:15:22Z",    "handle": "string",    "name": "string",    "signature": "string",    "roles": [      {        "badge": true,        "default": true,        "id": "string",        "name": "string",        "colour": "string",        "meta": {}      }    ]  },  "status": "draft",  "previous": {    "id": "string",    "created_at": "2019-08-24T14:15:22Z",    "updated_at": "2019-08-24T14:15:22Z",    "author": {      "id": "string",      "joined": "2019-08-24T14:15:22Z",      "suspended": "2019-08-24T14:15:22Z",      "handle": "string",      "name": "string",      "signature": "string",      "roles": [        {          "badge": true,          "default": true,          "id": "string",          "name": "string",          "colour": "string",          "meta": {}        }      ]    },    "status": "draft"  },  "name": "string",  "slug": "string",  "description": "string",  "content": "string",  "properties": [    {      "fid": "string",      "name": "string",      "value": "string",      "type": "text",      "sort": "string"    }  ],  "meta": {}}