Content Block Data Model
Block containing a content value for a given content record.
This resource is a part of the Publishing Workflow.
Sample JSON Data
{
"data": {
"type": "content-blocks",
"id": "57e2bcc9-0581-4ea7-913c-321b33ed4afa",
"attributes": {
"mobiledoc": "{\"version\":\"0.3.0\",\"markups\":[],\"atoms\":[],\"cards\":[],\"sections\":[[1,\"p\",[[0,[],0,\"Hello world\"]]]]}",
"published-at": "2012-04-23T18:25:43.511Z",
"trashed-at": null,
"created-at": "2012-04-23T18:25:43.511Z",
"updated-at": "2012-04-23T18:25:43.511Z"
},
"relationships": {
"content": {
"data": {
"type": "contents",
"id": "a5d6a4b5-c9e5-4c25-95da-e96b40fa10dd"
}
},
"block": {
"data": {
"type": "blocks",
"id": "57d90c4c-e36d-45b6-8fd8-ef6407e320bc"
}
},
"draft": {
"data": [
{
"type": "drafts",
"id": "6ca98f5f-22b7-41a4-ba7d-4e6dcfee963a"
}
]
},
"asset": {
"data": null
},
"hyperlinks": {
"data": []
}
}
}
}
Attributes
| Attribute | Type | Required | Description |
|---|---|---|---|
mobiledoc |
string |
No |
If the associated block has a data-type of
text, this will contain a JSON-encoded string
containing Mobiledoc-formatted
rich text content.
|
published-at |
date |
Read-only |
Timestamp recording when content block was first published
(null if never published), localized to the current logged in user’s time
zone.
|
trashed-at |
date |
Read-only |
Timestamp recording when content block was added to the trash
(null if still active), localized to the current logged in user’s time
zone.
|
created-at |
date |
Read-only | Timestamp recording when content block was created, localized to the current logged in user’s time zone. |
updated-at |
date |
Read-only | Date and time content block record was last updated, localized to the current logged in user’s time zone. |
Relationships
| Title | Type | Required | Description |
|---|---|---|---|
content |
object |
Yes | Content record that this value is associated with. This value is required on create but read-only on update. |
block |
object |
Yes | Block defining type of data for this content block. This value is required on create but read-only on update. |
draft |
object |
Read-only | Draft of content block if there is one. |
asset |
object |
No |
If the associated block has a data-type of
image, video, audio, or file, this relationship must reference the
associated asset record that acts as a value for this content
block.
|
hyperlinks |
array |
No |
If the associated block has a data-type of
text, this is read-only and parsed based on the value provided by mobiledoc. If the
associated block has a data-type of image, this array may be modified to contain a single
hyperlink to link the asset to.
|