This section describes the public JSON formats of workspaces. Note that business users see workspaces in the Experience Manager interface as projects.
Properties in the JSON file:
Property |
Value |
Description |
---|---|---|
ecr:type |
workspace-root |
Required. Root document of all workspaces |
ecr:createDate |
yyyy-MM-dd'T'HH:mm:ss.SSSX |
Optional. Date and time that this item was created. Defaults to creation date of the JCR. |
Example:
{ "ecr:createDate": "2015-08-11T15:47:28.961Z", "ecr:type": "workspace-root", "ecr:permissions": {"endeca:siteGroup:Discover": "all"} }
Properties in the JSON file:
Property |
Value |
Description |
---|---|---|
ecr:type |
workspace |
Required. The root document of an individual workspace |
ecr:createDate |
yyyy-MM-dd'T'HH:mm:ss.SSSX |
Optional. Date and time that this item was created. Defaults to creation date of the JCR. |
displayName |
string |
Required. Workspace name that appears in Workbench interface. Although the property is required, the string can be empty. |
status |
string |
Required. Determines if workspace is in draft or published mode. |
ecr:lastModified |
yyyy-MM-dd'T'HH:mm:ss.SSSX |
The last time this workspace document was modified. Defaults to the time when this workspace was imported into Workbench. |
ecr:lastModifiedBy |
string |
The user who last modified this workspace document. |
Example:
{ "displayName": "Holiday Project", "status": "draft", "ecr:lastModified": "2015-08-31T10:30:00.000Z", "ecr:lastModifiedBy": "Melanie Martin", "ecr:createDate": "2015-03-11T15:47:31.963Z", "ecr:type": "workspace", "status": "draft" }
The following properties are specific to workspace behavior and only
appear in documents within in the workspace tree. For example,
/ifcr/sites/Discover/workspaces
would be the
workspace tree for the Discover Electronics reference application. Only
documents within
/workspaces
would use these properties.
Property |
Value |
Description |
---|---|---|
ecr:operation |
The ecr:operation is required on all workspace documents. Workspaces only contain the documents that were added or modified for that workspace. This workspace must be merged with the published documents to produce the complete set of documents. The operation defines how the workspace document is merged with the published documents to produce the final set of documents that are available in the user interface. | |
add-or-replace |
In either case, the workspace document appears after the operation is applied. | |
delete-or-ignore |
| |
ignore-or-add |
Represents a document placeholder that is used solely for representing the ancestors to a document that is being updated in the workspace. If the
| |
ecr:branchPoint |
A UTC-formatted date/time string. yyyy-MM-dd'T'HH:mm:ss.SSSX |
This property enforces an optimistic locking strategy for updates and deletions. For documents being updated or deleted by the workspace, the branchPoint is set to the lastModified value of the published document being updated or deleted. Later, it is checked against the lastModified value of the deleted or updated published document to ensure that the published document has not been updated since being branched into the workspace.
|
ecr:movedToLocation |
string |
Specifies an absolute path to a published
document. For example:
The
|
ecr:moveSource |
string |
This property correlates two documents in
the workspace as originating from a move operation. Specifically, it correlates
one
This property appears on the
|
ecr:moveTarget |
string |
This property correlates two documents in
the workspace as originating from a move operation. Specifically, it correlates
one
This property appears on the
|
ecr:moveChild |
string for the path location |
This property appears on all descendant
documents that were moved as a result of moving the parent document. Its value
is the absolute path to the document's source location. The workspace isolation
code uses this property to distinguish the descendants that were added to the
workspace as a result of the move from those manually added by an Experience
Manager user after the move. For example, if a user moves a content folder, all
of its content items or folders are also moved. The value of
|
ecr:branchedPath |
string |
This property contains the original path of a document when it was first branched into the project. The value never changes from its original value. For example, if /a/b/c is branched for update and then moved to /a/d/c in the same project, the ecr:branchedPath value remains /a/b/c. This property appears only on project documents. |
The following example shows an exported content folder and content item of a workspace where a content item was updated. It has the same basic format as a published content plus the additional properties that you would find only within a workspace:
Here is the JSON for the exported workspace content folder at
/MyContentFolder
:
{
"ecr:operation": "ignore-or-add",
"ecr:createDate": "2015-01-11T15:48:12.240Z",
"ecr:type": "content-collection-folder"
}
Here is the JSON for the exported workspace content item at
/MyContentFolder/MyContentItem
:
{ "workflowState": "ACTIVE", "priority": 10, "triggers": [{ "exactLocation": true, "dvalIDs": ["100972"]}], "ecr:operation": "add-or-replace", "ecr:branchPoint": "2015-02-31T10:30:00.000Z", "ecr:lastModified": "2015-03-01T10:30:00.000Z", "ecr:lastModifiedBy": "Melanie Martin", "ecr:branchedPath": /sites/Discover/content/MyContentFolder/MyContentItem "ecr:createDate": "2015-01-11T15:54:59.237Z", "ecr:type": "content-item" }
The following example shows an exported content folder and content
item of a workspace where a content item was moved between content folders --
from the
holiday_sale
folder to the
summer_special
folder. It has the same format as a
published content plus the additional properties that you would find only
within a workspace:
Here is the JSON for the exported workspace source content folder at
/holiday_sale
:
{ "ecr:type": "content-collection-folder", "ecr:operation": "ignore-or-add", "ecr:createDate": "2014-12-31T10:30:00.000Z", "ecr:createdBy": "Melanie Martin", "ecr:branchedPath": /sites/Discover/content/holiday_sale }
Here is the JSON for the exported workspace content item at
/holiday_sale/MyContentItem
:
{ "ecr:type": "content-item", "ecr:operation": "delete-or-ignore", "ecr:branchPoint": "2014-12-29T10:30:00.000Z", "ecr:createDate": "2014-12-31T10:30:00.000Z", "ecr:createdBy": "Melanie Martin", "ecr:moveTarget": "/sites/Discover/content/summer_special/MyContentItem", "ecr:branchedPath": /sites/Discover/content/holiday_sale/MyContentItem }
Here is the JSON for the exported workspace target content folder at
/summer_special
:
{ "ecr:operation": "ignore-or-add", "ecr:branchedPath": /sites/Discover/content/summer_special, "ecr:createDate": "2014-12-31T10:30:00.000Z", "ecr:type": "content-collection-folder" }
Here is the JSON for the exported workspace content item at
/summer_special/MyContentItem
:
{ "workflowState": "ACTIVE", "priority": 10, "triggers": [{ "exactLocation": true, "dvalIDs": ["100972"]}], "ecr:operation": "add-or-replace", "ecr:lastModified": "2014-01-01T10:30:00.000Z", "ecr:lastModifiedBy": "Melanie Martin", "ecr:moveSource": "/sites/Discover/content/holiday_sale/MyContentItem", "ecr:branchedPath": "/sites/Discover/content/holiday_sale/MyContentItem", "ecr:createDate": "2014-12-31T10:30:00.000Z", "ecr:type": "content-item" }