Summary
Read the current document protection state including editing restrictions, write protection, and read-only recommendation.- Operation ID:
protection.get - API member path:
editor.doc.protection.get(...) - Mutates document:
no - Idempotency:
idempotent - Supports tracked mode:
no - Supports dry run:
no - Deterministic target resolution:
yes
Expected result
Returns a DocumentProtectionState with editingRestriction, writeProtection, and readOnlyRecommended fields.Input fields
No fields.Example request
Output fields
| Field | Type | Required | Description |
|---|---|---|---|
editingRestriction | object | yes | |
editingRestriction.enforced | boolean | yes | |
editingRestriction.formattingRestricted | boolean | yes | |
editingRestriction.mode | enum | yes | "none", "readOnly", "comments", "trackedChanges", "forms" |
editingRestriction.passwordProtected | boolean | yes | |
editingRestriction.runtimeEnforced | boolean | yes | |
readOnlyRecommended | boolean | yes | |
writeProtection | object | yes | |
writeProtection.enabled | boolean | yes | |
writeProtection.passwordProtected | boolean | yes |
Example response
Pre-apply throws
CAPABILITY_UNAVAILABLE
Non-applied failure codes
- None
Raw schemas
Raw input schema
Raw input schema
Raw output schema
Raw output schema

