Workspace version schema
See Management API schema for every domain, the endpoint and authentication.
Queries
workspaceDiff
Compares two workspace snapshots and lists the entities added, removed and modified. Each side is
a workspace at its current content or a published version, and both sides must belong to one
project.
Scope: ORGANIZATION_WORKSPACE_READ.
workspaceDiff(input: WorkspaceDiffInput!): WorkspaceDiffPayload! @authTypes
WorkspaceVersion
"""
An immutable snapshot of a workspace, made when the workspace is published. Read its contents
through `workspaceDiff`.
"""
type WorkspaceVersion {
"""The ID of the version."""
id: ID!
"""The ID of the workspace the version was published from."""
workspaceId: ID!
"""The workspace the version was published from."""
workspace: Workspace!
"""
The ID of the version's snapshot workspace. Null when the version has none.
"""
snapshotWorkspaceId: ID
"""
The hidden copy of the workspace made when the version was published, which restoring the
version opens. Null when the version has none or the copy was deleted.
"""
snapshotWorkspace: Workspace
"""When the version was published."""
publishedAt: DateTime!
}WorkspaceVersionEdge
"""A workspace version in a page of results."""
type WorkspaceVersionEdge {
"""The cursor of this edge."""
cursor: String!
"""The item."""
node: WorkspaceVersion!
}WorkspaceVersionConnection
"""A page of workspace versions."""
type WorkspaceVersionConnection {
"""The edges in this page."""
edges: [WorkspaceVersionEdge!]!
"""Where this page sits in the list."""
pageInfo: PageInfo!
"""The number of items across all pages."""
totalCount: Int!
}WorkspaceDiffInput
"""
The input of `workspaceDiff`. Each side is a workspace, at its current content, or a published
version. Set exactly one field per side.
"""
input WorkspaceDiffInput {
"""The workspace to compare from."""
baseWorkspaceId: ID
"""The version to compare from."""
baseWorkspaceVersionId: ID
"""The workspace to compare to."""
compareWorkspaceId: ID
"""The version to compare to."""
compareWorkspaceVersionId: ID
}WorkspaceDiffPayload
"""The result of `workspaceDiff`."""
type WorkspaceDiffPayload {
"""The diff. Null when a `userError` was returned."""
diff: WorkspaceDiff
"""
The problems that stopped the diff, with codes `INVALID_INPUT`, `WORKSPACE_NOT_FOUND`,
`WORKSPACE_VERSION_NOT_FOUND`, `PROJECT_NOT_FOUND` and `CROSS_PROJECT_COMPARISON_UNSUPPORTED`.
A side the caller cannot read gets the not-found code a missing ID gets. Empty on success.
"""
userErrors: [UserError!]!
}WorkspaceSnapshotSummary
"""One side of a diff."""
type WorkspaceSnapshotSummary {
"""The ID of the workspace the side belongs to."""
workspaceId: ID!
"""
The ID of the version. Null when the side is a workspace's current content.
"""
workspaceVersionId: ID
"""
When the version was published. Null when the side is a workspace's current content.
"""
publishedAt: DateTime
}WorkspaceDiff
"""
What differs between two workspace snapshots, one section per kind of entity. Each section lists
the entities added, removed and modified.
"""
type WorkspaceDiff {
"""The side compared from."""
base: WorkspaceSnapshotSummary!
"""The side compared to."""
compare: WorkspaceSnapshotSummary!
"""Whether any section lists an entity."""
hasChanges: Boolean!
"""The feature flags that differ."""
features: FeatureDiff!
"""The steps that differ."""
steps: StepDiff!
"""The fields that differ."""
fields: FieldDiff!
"""The actions that differ."""
actions: ActionDiff!
"""The conditions that differ."""
conditions: ConditionDiff!
"""The experiences that differ."""
experiences: ExperienceDiff!
"""The Content Models that differ."""
contentModels: ContentModelDiff!
"""The Content Blocks that differ."""
contentBlocks: ContentBlockDiff!
"""The content entries that differ."""
contentEntries: ContentEntryDiff!
"""The workflows that differ."""
workflows: WorkflowDiff!
}PropertyChange
"""A property whose value differs between the two snapshots."""
type PropertyChange {
"""The property's name, such as `name` or `weight`."""
property: String!
"""The value in the base snapshot."""
base: JSON
"""The value in the compare snapshot."""
compare: JSON
}LogicChange
"""
A JSON subtree that differs between the two snapshots, such as a condition's `logic` or a field's
`validation`, given whole from each side.
"""
type LogicChange {
"""The subtree's name, such as `logic` or `validation`."""
property: String!
"""The subtree in the base snapshot."""
base: JSON
"""The subtree in the compare snapshot."""
compare: JSON
}FieldOptionSummary
"""A field option, as a diff lists it."""
type FieldOptionSummary {
"""The option's value, which identifies it across snapshots."""
value: String!
"""The option's label."""
label: String!
}FieldOptionModification
"""A field option whose label differs between the two snapshots."""
type FieldOptionModification {
"""The option's value."""
value: String!
"""The label in the base snapshot."""
baseLabel: String!
"""The label in the compare snapshot."""
compareLabel: String!
}FieldOptionsChange
"""How a field's options differ, matched by `value`."""
type FieldOptionsChange {
"""Options present only in the compare snapshot."""
added: [FieldOptionSummary!]!
"""Options present only in the base snapshot."""
removed: [FieldOptionSummary!]!
"""Options whose label differs."""
modified: [FieldOptionModification!]!
}DiffStepRef
"""A step, as a diff refers to it."""
type DiffStepRef {
"""The ID of the step."""
id: ID!
"""Its name in the snapshot."""
name: String!
"""Its key in the snapshot."""
key: String!
}DiffFieldRef
"""A field, as a diff refers to it."""
type DiffFieldRef {
"""The ID of the field."""
id: ID!
"""Its name in the snapshot."""
name: String!
"""Its key in the snapshot."""
key: String!
}DiffActionRef
"""An action, as a diff refers to it."""
type DiffActionRef {
"""The ID of the action."""
id: ID!
"""Its name in the snapshot."""
name: String!
"""Its key in the snapshot."""
key: String!
}DiffConditionRef
"""A condition, as a diff refers to it."""
type DiffConditionRef {
"""The ID of the condition."""
id: ID!
"""Its name in the snapshot."""
name: String!
"""Its key in the snapshot."""
key: String!
}FlowStepRefsChange
"""The steps added to or removed from an experience's flow."""
type FlowStepRefsChange {
"""Steps only the compare snapshot's flow uses."""
added: [DiffStepRef!]!
"""Steps only the base snapshot's flow uses."""
removed: [DiffStepRef!]!
}FlowActionRefsChange
"""The actions added to or removed from an experience's flow."""
type FlowActionRefsChange {
"""Actions only the compare snapshot's flow uses."""
added: [DiffActionRef!]!
"""Actions only the base snapshot's flow uses."""
removed: [DiffActionRef!]!
}FlowConditionRefsChange
"""The conditions added to or removed from an experience's flow."""
type FlowConditionRefsChange {
"""Conditions only the compare snapshot's flow uses."""
added: [DiffConditionRef!]!
"""Conditions only the base snapshot's flow uses."""
removed: [DiffConditionRef!]!
}FieldRefsChange
"""How a step's fields differ."""
type FieldRefsChange {
"""Fields only the compare snapshot's step holds."""
added: [DiffFieldRef!]!
"""Fields only the base snapshot's step holds."""
removed: [DiffFieldRef!]!
"""Whether the step holds the same fields in a different order."""
reordered: Boolean!
}ExperienceFlowChange
"""How an experience's flow differs."""
type ExperienceFlowChange {
"""The steps the flow added or removed. Null when they are the same."""
stepRefsChange: FlowStepRefsChange
"""The actions the flow added or removed. Null when they are the same."""
actionRefsChange: FlowActionRefsChange
"""The conditions the flow added or removed. Null when they are the same."""
conditionRefsChange: FlowConditionRefsChange
"""
Whether the nodes or edges were rearranged while the flow uses the same steps, actions and
conditions. Node and edge IDs are ignored.
"""
structureChanged: Boolean!
}FeatureDiffEntry
"""A feature flag whose properties differ."""
type FeatureDiffEntry {
"""The ID of the feature flag."""
id: ID!
"""Its name in the compare snapshot."""
name: String!
"""The properties that differ."""
propertyChanges: [PropertyChange!]!
}FeatureDiff
"""The feature flags that differ between two snapshots."""
type FeatureDiff {
"""Feature flags present only in the compare snapshot."""
added: [JSON!]!
"""Feature flags present only in the base snapshot."""
removed: [JSON!]!
"""Feature flags present in both snapshots, with differing properties."""
modified: [FeatureDiffEntry!]!
}StepDiffEntry
"""A step whose properties or fields differ."""
type StepDiffEntry {
"""The ID of the step."""
id: ID!
"""Its name in the compare snapshot."""
name: String!
"""Its key in the compare snapshot."""
key: String!
"""The properties that differ."""
propertyChanges: [PropertyChange!]!
"""How the step's fields differ. Null when they are the same."""
fieldRefsChange: FieldRefsChange
}StepDiff
"""The steps that differ between two snapshots."""
type StepDiff {
"""Steps present only in the compare snapshot."""
added: [JSON!]!
"""Steps present only in the base snapshot."""
removed: [JSON!]!
"""Steps present in both snapshots, with differing properties."""
modified: [StepDiffEntry!]!
}FieldDiffEntry
"""A field whose properties, validation, condition or options differ."""
type FieldDiffEntry {
"""The ID of the field."""
id: ID!
"""Its name in the compare snapshot."""
name: String!
"""Its key in the compare snapshot."""
key: String!
"""The properties that differ."""
propertyChanges: [PropertyChange!]!
"""How the validation differs. Null when it is the same."""
validationChange: LogicChange
"""How the visibility condition differs. Null when it is the same."""
conditionChange: LogicChange
"""How the options differ. Null when they are the same."""
optionsChange: FieldOptionsChange
}FieldDiff
"""The fields that differ between two snapshots."""
type FieldDiff {
"""Fields present only in the compare snapshot."""
added: [JSON!]!
"""Fields present only in the base snapshot."""
removed: [JSON!]!
"""Fields present in both snapshots, with differing properties."""
modified: [FieldDiffEntry!]!
}ActionDiffEntry
"""An action whose properties differ."""
type ActionDiffEntry {
"""The ID of the action."""
id: ID!
"""Its name in the compare snapshot."""
name: String!
"""Its key in the compare snapshot."""
key: String!
"""The properties that differ."""
propertyChanges: [PropertyChange!]!
}ActionDiff
"""The actions that differ between two snapshots."""
type ActionDiff {
"""Actions present only in the compare snapshot."""
added: [JSON!]!
"""Actions present only in the base snapshot."""
removed: [JSON!]!
"""Actions present in both snapshots, with differing properties."""
modified: [ActionDiffEntry!]!
}ConditionDiffEntry
"""A condition whose properties or logic differ."""
type ConditionDiffEntry {
"""The ID of the condition."""
id: ID!
"""Its name in the compare snapshot."""
name: String!
"""Its key in the compare snapshot."""
key: String!
"""The properties that differ."""
propertyChanges: [PropertyChange!]!
"""How the logic differs. Null when it is the same."""
logicChange: LogicChange
}ConditionDiff
"""The conditions that differ between two snapshots."""
type ConditionDiff {
"""Conditions present only in the compare snapshot."""
added: [JSON!]!
"""Conditions present only in the base snapshot."""
removed: [JSON!]!
"""Conditions present in both snapshots, with differing properties."""
modified: [ConditionDiffEntry!]!
}ExperienceDiffEntry
"""An experience whose properties, targeting or flow differ."""
type ExperienceDiffEntry {
"""The ID of the experience."""
id: ID!
"""Its name in the compare snapshot."""
name: String!
"""Its key in the compare snapshot."""
key: String!
"""The properties that differ."""
propertyChanges: [PropertyChange!]!
"""How the targeting differs. Null when it is the same."""
targetChange: LogicChange
"""How the flow differs. Null when it is the same."""
flowChange: ExperienceFlowChange
}ExperienceDiff
"""The experiences that differ between two snapshots."""
type ExperienceDiff {
"""Experiences present only in the compare snapshot."""
added: [JSON!]!
"""Experiences present only in the base snapshot."""
removed: [JSON!]!
"""Experiences present in both snapshots, with differing properties."""
modified: [ExperienceDiffEntry!]!
}ContentModelDiffEntry
"""A Content Model whose properties or schema differ."""
type ContentModelDiffEntry {
"""The ID of the Content Model."""
id: ID!
"""Its name in the compare snapshot."""
name: String!
"""The properties that differ."""
propertyChanges: [PropertyChange!]!
"""How the schema differs. Null when it is the same."""
schemaChange: LogicChange
}ContentModelDiff
"""The Content Models that differ between two snapshots."""
type ContentModelDiff {
"""Content Models present only in the compare snapshot."""
added: [JSON!]!
"""Content Models present only in the base snapshot."""
removed: [JSON!]!
"""Content Models present in both snapshots, with differing properties."""
modified: [ContentModelDiffEntry!]!
}ContentBlockDiffEntry
"""A Content Block whose properties or schema differ."""
type ContentBlockDiffEntry {
"""The ID of the Content Block."""
id: ID!
"""Its name in the compare snapshot."""
name: String!
"""The properties that differ."""
propertyChanges: [PropertyChange!]!
"""How the schema differs. Null when it is the same."""
schemaChange: LogicChange
}ContentBlockDiff
"""The Content Blocks that differ between two snapshots."""
type ContentBlockDiff {
"""Content Blocks present only in the compare snapshot."""
added: [JSON!]!
"""Content Blocks present only in the base snapshot."""
removed: [JSON!]!
"""Content Blocks present in both snapshots, with differing properties."""
modified: [ContentBlockDiffEntry!]!
}ContentEntryDiffEntry
"""A content entry whose properties or data differ."""
type ContentEntryDiffEntry {
"""The ID of the content entry."""
id: ID!
"""The ID of its Content Model in the compare snapshot."""
contentModelId: ID!
"""The properties that differ."""
propertyChanges: [PropertyChange!]!
"""How the data differs. Null when it is the same."""
dataChange: LogicChange
}ContentEntryDiff
"""The content entries that differ between two snapshots."""
type ContentEntryDiff {
"""Content entries present only in the compare snapshot."""
added: [JSON!]!
"""Content entries present only in the base snapshot."""
removed: [JSON!]!
"""Content entries present in both snapshots, with differing properties."""
modified: [ContentEntryDiffEntry!]!
}WorkflowDiffTrigger
"""
A workflow's trigger, as a diff reports it. An `ACTION` trigger's action is read from the
workflow's own snapshot, so a removed workflow still shows its action.
"""
type WorkflowDiffTrigger {
"""The kind of trigger."""
type: WorkflowTriggerType!
"""The event that starts the run. Set for an `EVENT` trigger only."""
eventName: WorkflowEventName
"""
The ID of the action whose run starts the workflow. Set for an `ACTION` trigger only.
"""
actionId: ID
"""
The action `actionId` names. Null for an `EVENT` trigger, and for an `ACTION` trigger whose
action neither snapshot holds.
"""
action: DiffActionRef
}WorkflowDiffNodeRef
"""A node in a workflow graph, as a diff lists it."""
type WorkflowDiffNodeRef {
"""The ID of the node, unique in its graph."""
id: ID!
"""
The node's kind: `ORIGIN`, `TOOL`, `CONDITION` or `SLEEP`, or `UNKNOWN` when it has none.
"""
type: String!
"""
What tells the node apart from others of its kind: the tool name, or the sleep duration. Null for other kinds.
"""
label: String
}WorkflowGraphChange
"""
How a workflow's graph differs between two snapshots. Nodes are matched by ID; moving a node on the
canvas never makes it a modified node.
"""
type WorkflowGraphChange {
"""The number of nodes in the base snapshot's graph."""
baseNodeCount: Int!
"""The number of nodes in the compare snapshot's graph."""
compareNodeCount: Int!
"""The number of edges in the base snapshot's graph."""
baseEdgeCount: Int!
"""The number of edges in the compare snapshot's graph."""
compareEdgeCount: Int!
"""Nodes present only in the compare snapshot."""
addedNodes: [WorkflowDiffNodeRef!]!
"""Nodes present only in the base snapshot."""
removedNodes: [WorkflowDiffNodeRef!]!
"""Nodes present in both snapshots, with differing configuration."""
modifiedNodes: [WorkflowDiffNodeRef!]!
"""
Whether the graph differs with no node added, removed or reconfigured: edges were rewired, or nodes moved.
"""
structureChanged: Boolean!
}WorkflowDiffSummary
"""A workflow present in one snapshot only."""
type WorkflowDiffSummary {
"""The ID of the workflow."""
id: ID!
"""The workflow's name."""
name: String!
"""The trigger. Null when it cannot be read."""
trigger: WorkflowDiffTrigger
"""The number of nodes in the workflow's graph."""
nodeCount: Int!
"""The number of edges in the workflow's graph."""
edgeCount: Int!
}WorkflowDiffEntry
"""A workflow whose properties, trigger or graph differ."""
type WorkflowDiffEntry {
"""The ID of the workflow."""
id: ID!
"""Its name in the compare snapshot."""
name: String!
"""The trigger in the compare snapshot. Null when it cannot be read."""
trigger: WorkflowDiffTrigger
"""The properties that differ."""
propertyChanges: [PropertyChange!]!
"""How the trigger differs. Null when it is the same."""
triggerChange: LogicChange
"""How the graph differs. Null when it is the same."""
graphChange: WorkflowGraphChange
}WorkflowDiff
"""
The workflows that differ between two snapshots. A version's workflows are the copies frozen when
it was published.
"""
type WorkflowDiff {
"""Workflows present only in the compare snapshot."""
added: [WorkflowDiffSummary!]!
"""Workflows present only in the base snapshot."""
removed: [WorkflowDiffSummary!]!
"""
Workflows present in both snapshots, with differing properties, trigger or graph.
"""
modified: [WorkflowDiffEntry!]!
}