Skip to main content

Queries

  • workspace — Read a workspace. Null if it doesn’t exist or expired.

Mutations

  • workspaceCommit — Save a workspace to its resource. STALE if the resource changed since the workspace started; INVALID while an ERROR diagnostic remains. The workspace stays open. For an automation, publish with automationPublish next. Null if the workspace is gone.
  • workspaceCreate — Open a working copy of a resource. Omit resourceId to start a new resource; committing creates it. Null if the resource doesn’t exist. Read the resource type’s guide in automationCatalog first.
  • workspaceDelete — Discard a workspace. The resource is unchanged. False if the workspace doesn’t exist.
  • workspaceUpdate — Apply text edits to a workspace, in order. Edits fail only mechanically (stale revision, text not found or ambiguous, more than 100 edits or 1 MB); text that doesn’t parse is reported in diagnostics. Changes only the working copy. Null if the workspace is gone.

Objects

  • Diagnostic — A problem in a document. Its message names a diagnostics/<code> page in automationCatalog that explains it.
  • DiagnosticFix — A suggested fix: edits to apply with workspaceUpdate.
  • TextEdit — Replace find, which occurs exactly once in the document, with replace. Pass it to workspaceUpdate as is.
  • Workspace — A working copy of one resource, as text. Edit it with workspaceUpdate, check diagnostics, then save it with workspaceCommit. Expires 7 days after its last change.

Input objects

  • TextEditInput — Replace find with replace. find must occur exactly once unless all is set. Omit find to replace the whole document.

Enums