Open Context Protocol is live! 🚀 Read the launch post

postRedactPage

Redact Content in a Confluence Page

Details

  • Method: POST
  • Path: /pages/{id}/redact
  • Operation ID: postRedactPage

Parameters

{
  "id": {
    "description": "The ID of the page to redact content from.",
    "required": true,
    "location": "path",
    "type": "integer",
    "format": "int64"
  }
}

Response Schema

{
  "type": "object",
  "properties": {
    "body": {
      "type": "object",
      "properties": {
        "redactions": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "pointer": {
                "type": "string",
                "description": "JSON pointer indicating where the redaction was applied"
              },
              "from": {
                "type": "integer",
                "description": "Starting character index where redaction was applied"
              },
              "to": {
                "type": "integer",
                "description": "Ending character index where redaction was applied"
              },
              "reason": {
                "type": "string",
                "description": "Reason for the redaction"
              },
              "redactionId": {
                "type": "string",
                "format": "uuid",
                "description": "Unique identifier for this redaction. Can be used to restore the redacted content later.\n"
              }
            }
          },
          "description": "List of redactions that were applied to this section"
        }
      }
    },
    "title": {
      "type": "object",
      "properties": {
        "redactions": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "pointer": {
                "type": "string",
                "description": "JSON pointer indicating where the redaction was applied"
              },
              "from": {
                "type": "integer",
                "description": "Starting character index where redaction was applied"
              },
              "to": {
                "type": "integer",
                "description": "Ending character index where redaction was applied"
              },
              "reason": {
                "type": "string",
                "description": "Reason for the redaction"
              },
              "redactionId": {
                "type": "string",
                "format": "uuid",
                "description": "Unique identifier for this redaction. Can be used to restore the redacted content later.\n"
              }
            }
          },
          "description": "List of redactions that were applied to this section"
        }
      }
    }
  },
  "description": "Response containing details of all redactions that were applied to the content.\nEach redaction includes a unique ID for restoration, except that code block redactions cannot be restored.\n"
}

Usage

from ocp_agent import OCPAgent

agent = OCPAgent()
await agent.register_api('confluence')

# Call this tool
result = await agent.call_tool('postRedactPage', {
    # Add required parameters here
})