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 withautomationPublishnext. Null if the workspace is gone.workspaceCreate— Open a working copy of a resource. OmitresourceIdto start a new resource; committing creates it. Null if the resource doesn’t exist. Read the resource type’s guide inautomationCatalogfirst.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 indiagnostics. Changes only the working copy. Null if the workspace is gone.
Objects
Diagnostic— A problem in a document. Its message names adiagnostics/<code>page inautomationCatalogthat explains it.DiagnosticFix— A suggested fix: edits to apply withworkspaceUpdate.TextEdit— Replacefind, which occurs exactly once in the document, withreplace. Pass it toworkspaceUpdateas is.Workspace— A working copy of one resource, as text. Edit it withworkspaceUpdate, checkdiagnostics, then save it withworkspaceCommit. Expires 7 days after its last change.
Input objects
TextEditInput— Replacefindwithreplace.findmust occur exactly once unlessallis set. Omitfindto replace the whole document.
Enums
DiagnosticSeverity— How much a diagnostic matters.WorkspaceCommitStatus— What a commit did.WorkspaceResourceType— A kind of resource a workspace can edit.