Open Context Protocol is live! 🚀 Read the launch post

viewsPublish

Publish a static view for a User.

Details

  • Method: GET
  • Path: /views.publish
  • Operation ID: views_publish

Parameters

{
  "token": {
    "description": "Authentication token. Requires scope: `none`",
    "required": true,
    "location": "header",
    "type": "string"
  },
  "user_id": {
    "description": "`id` of the user you want publish a view to.",
    "required": true,
    "location": "query",
    "type": "string"
  },
  "view": {
    "description": "A [view payload](/reference/surfaces/views). This must be a JSON-encoded string.",
    "required": true,
    "location": "query",
    "type": "string"
  },
  "hash": {
    "description": "A string that represents view state to protect against possible race conditions.",
    "required": false,
    "location": "query",
    "type": "string"
  }
}

Response Schema

{
  "additionalProperties": true,
  "description": "This method either only returns a brief _OK_ response or a verbose schema is not available for this method.",
  "properties": {
    "ok": {
      "enum": [
        true
      ],
      "title": "default success response",
      "type": "boolean"
    }
  },
  "required": [
    "ok"
  ],
  "title": "Default success template",
  "type": "object"
}

Usage

from ocp_agent import OCPAgent

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

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