Skip to main content

Summary

Enable Word-style editing restriction on the document. Only readOnly mode is supported in v1.
  • Operation ID: protection.setEditingRestriction
  • API member path: editor.doc.protection.setEditingRestriction(...)
  • Mutates document: yes
  • Idempotency: idempotent
  • Supports tracked mode: no
  • Supports dry run: yes
  • Deterministic target resolution: yes

Expected result

Returns a ProtectionMutationResult with the updated protection state on success.

Input fields

FieldTypeRequiredDescription
formattingRestrictedbooleanno
modeenumyes"readOnly"

Example request

{
  "formattingRestricted": true,
  "mode": "readOnly"
}

Output fields

No fields.

Example response

{}

Pre-apply throws

  • INVALID_INPUT
  • CAPABILITY_UNAVAILABLE

Non-applied failure codes

  • NO_OP

Raw schemas

{
  "additionalProperties": false,
  "properties": {
    "formattingRestricted": {
      "type": "boolean"
    },
    "mode": {
      "enum": [
        "readOnly"
      ],
      "type": "string"
    }
  },
  "required": [
    "mode"
  ],
  "type": "object"
}
{
  "type": "object"
}
{
  "type": "object"
}
{
  "type": "object"
}