← All types
In Input object

UpsertWorkspaceInput

Input for upsertWorkspace: create a workspace or overwrite its open draft, keyed on the workspace id inside sourceXML.

Fields

Optional observed authoring revision; rejects stale updates and recreation after deletion.

source

String!Required

Author-owned cococo-workspace-source/1 JSON envelope containing sourceXML and serverLua. Compilation and AST are server-owned; read back source for IaC comparison.

Distribution scope to apply. Defaults to INSTANCE on create when omitted; keeps the existing scope on update. TEAM/INSTANCE require workspace:write; PERSONAL (owned by the caller) is self-service.

Possible values (3)
PERSONAL

Owned by one user and visible only to them. Self-service: authoring it needs workspace:personal rather than workspace:write, and workspace:write is not a backdoor into someone else's personal workspace.

TEAM

Offered to the members of the teams it is assigned to; at least one team is required. Authoring it needs workspace:write.

INSTANCE

Offered to everyone in the tenant whose permissions cover its requiredDomains. The default scope when none is given; authoring it needs workspace:write.

teamIds

[TeamID!]Optional

TypeIDs (prefix tea) of the teams to assign; ignored unless scope is TEAM. Replaces the current assignments, so omitting it clears them — and a TEAM-scoped workspace must end up with at least one existing team.

Referenced by (1)
Exact type SDL
"""
Input for `upsertWorkspace`: create a workspace or overwrite its open draft, keyed on the workspace id inside sourceXML.
"""
input UpsertWorkspaceInput {
  """
  Optional observed authoring revision; rejects stale updates and recreation after deletion.
  """
  expectedRevision: String
  """
  Author-owned cococo-workspace-source/1 JSON envelope containing sourceXML and serverLua. Compilation and AST are server-owned; read back source for IaC comparison.
  """
  source: String!
  """
  Distribution scope to apply. Defaults to INSTANCE on create when omitted; keeps the existing scope on update. TEAM/INSTANCE require workspace:write; PERSONAL (owned by the caller) is self-service.
  """
  scope: WorkspaceScope
  """
  TypeIDs (prefix `tea`) of the teams to assign; ignored unless `scope` is TEAM. Replaces the current assignments, so omitting it clears them — and a TEAM-scoped workspace must end up with at least one existing team.
  """
  teamIds: [TeamID!]
}