Draft Data Model

Drafted items in the current site.

This resource is a part of the Publishing Workflow.

Sample JSON Data

      {
        "data": {
          "type": "drafts",
          "id": "16e09781-83c5-498f-98c5-78b3095e85ea",
          "attributes": {
            "event": "update",
            "object-changes": {
              "path": [
                "/donuts_and_pastries",
                "/donuts-and-pastries"
              ],
              "title": [
                "Donuts and Pastries",
                "Donuts and Pastries - Coffee Shop"
              ]
            },
            "created-at": "2012-04-23T18:25:43.511Z",
            "updated-at": "2012-04-23T18:25:43.511Z"
          },
          "relationships": {
            "item": {
              "data": {
                "type": "pages",
                "id": "5316dc5b-8aa1-4498-8314-fab7094f023e"
              }
            },
            "user": {
              "data": {
                "type": "users",
                "id": "bad77d72-7ffc-4134-9d5a-80c079e9aef4"
              }
            },
            "publication-dependencies": {
              "data": [
                {
                  "type": "drafts",
                  "id": "21752c4f-06e4-4f76-9ea2-80580e3be061"
                }
              ]
            },
            "reversion-dependencies": {
              "data": [
                {
                  "type": "drafts",
                  "id": "40d142b0-e8bc-420d-9427-9737f73f8545"
                }
              ]
            },
            "hyperlinks": {
              "data": []
            }
          }
        }
      }

Attributes

Attribute Type Required Description
event string Read-only Type of draft. Can be create, update, or delete.
object-changes object Read-only Object containing drafted changes to the item. Each key in the object represents an attribute with changed values. The key contains an array, whose first value is the original value and whose second value is the drafted value.
created-at date Read-only Records when draft was created, localized to the current logged in user’s time zone.
updated-at date Read-only Records when draft was last updated, localized to the current logged in user’s time zone.

Relationships

Title Type Required Description
item object Read-only Drafted item.
user object Read-only User who drafted the changes.
publication-dependencies array Read-only Draft records that must be published along with this draft.
reversion-dependencies array Read-only Draft records that must be reverted along with this draft.
hyperlinks array Read-only Lists associated hyperlinks if this draft’s item is a content block.

Related