Open Context Protocol is live! 🚀 Read the launch post

getPageById

Get page by id

Details

  • Method: GET
  • Path: /pages/{id}
  • Operation ID: getPageById

Parameters

{
  "id": {
    "description": "The ID of the page to be returned. If you don't know the page ID, use Get pages and filter the results.",
    "required": true,
    "location": "path",
    "type": "integer",
    "format": "int64"
  },
  "body-format": {
    "description": "The content format types to be returned in the `body` field of the response. If available, the representation will be available under a response field of the same name under the `body` field.",
    "required": false,
    "location": "query",
    "type": "string",
    "enum": [
      "storage",
      "atlas_doc_format",
      "view",
      "export_view",
      "anonymous_export_view",
      "styled_view",
      "editor"
    ]
  },
  "get-draft": {
    "description": "Retrieve the draft version of this page.",
    "required": false,
    "location": "query",
    "type": "boolean"
  },
  "status": {
    "description": "Filter the page being retrieved by its status.",
    "required": false,
    "location": "query",
    "type": "array"
  },
  "version": {
    "description": "Allows you to retrieve a previously published version. Specify the previous version's number to retrieve its details.",
    "required": false,
    "location": "query",
    "type": "integer"
  },
  "include-labels": {
    "description": "Includes labels associated with this page in the response.\nThe number of results will be limited to 50 and sorted in the default sort order. \nA `meta` and `_links` property will be present to indicate if more results are available and a link to retrieve the rest of the results.",
    "required": false,
    "location": "query",
    "type": "boolean"
  },
  "include-properties": {
    "description": "Includes content properties associated with this page in the response.\nThe number of results will be limited to 50 and sorted in the default sort order. \nA `meta` and `_links` property will be present to indicate if more results are available and a link to retrieve the rest of the results.",
    "required": false,
    "location": "query",
    "type": "boolean"
  },
  "include-operations": {
    "description": "Includes operations associated with this page in the response, as defined in the `Operation` object.\nThe number of results will be limited to 50 and sorted in the default sort order. \nA `meta` and `_links` property will be present to indicate if more results are available and a link to retrieve the rest of the results.",
    "required": false,
    "location": "query",
    "type": "boolean"
  },
  "include-likes": {
    "description": "Includes likes associated with this page in the response.\nThe number of results will be limited to 50 and sorted in the default sort order. \nA `meta` and `_links` property will be present to indicate if more results are available and a link to retrieve the rest of the results.",
    "required": false,
    "location": "query",
    "type": "boolean"
  },
  "include-versions": {
    "description": "Includes versions associated with this page in the response.\nThe number of results will be limited to 50 and sorted in the default sort order. \nA `meta` and `_links` property will be present to indicate if more results are available and a link to retrieve the rest of the results.",
    "required": false,
    "location": "query",
    "type": "boolean"
  },
  "include-version": {
    "description": "Includes the current version associated with this page in the response.\nBy default this is included and can be omitted by setting the value to `false`.",
    "required": false,
    "location": "query",
    "type": "boolean"
  },
  "include-favorited-by-current-user-status": {
    "description": "Includes whether this page has been favorited by the current user.",
    "required": false,
    "location": "query",
    "type": "boolean"
  },
  "include-webresources": {
    "description": "Includes web resources that can be used to render page content on a client.",
    "required": false,
    "location": "query",
    "type": "boolean"
  },
  "include-collaborators": {
    "description": "Includes collaborators on the page.",
    "required": false,
    "location": "query",
    "type": "boolean"
  },
  "include-direct-children": {
    "description": "Includes direct children of the page, as defined in the `ChildrenResponse` object.",
    "required": false,
    "location": "query",
    "type": "boolean"
  }
}

Response Schema

{
  "allOf": [
    {
      "$ref": "#/components/schemas/PageSingle"
    },
    {
      "type": "object",
      "properties": {
        "_links": {
          "type": "object",
          "properties": {
            "base": {
              "type": "string",
              "description": "Base url of the Confluence site."
            }
          }
        }
      }
    }
  ]
}

Usage

from ocp_agent import OCPAgent

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

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