Document apiReferenceProtection

protection.get

Read the current document protection state including editing restrictions, write protection, and read-only recommendation.

read-onlyidempotent
doc.protection.get(…)

Expected result

Returns a DocumentProtectionState with editingRestriction, writeProtection, and readOnlyRecommended fields.

Inputs

This operation takes no input fields.

Result

Output fields
editingRestrictionobjectrequired
Fields
mode"none" | "readOnly" | "comments" | "trackedChanges" | "forms"required
enforcedbooleanrequired
runtimeEnforcedbooleanrequired
passwordProtectedbooleanrequired
formattingRestrictedbooleanrequired
writeProtectionobjectrequired
Fields
enabledbooleanrequired
passwordProtectedbooleanrequired
readOnlyRecommendedbooleanrequired

Failures

Pre-apply throws

  • CAPABILITY_UNAVAILABLE

Raw schemas

Open the generated JSON artifact for the exact input, output, success, and failure schemas represented by this contract version.

View raw JSON schemas