Open Context Protocol is live! 🚀 Read the launch post

getChildPages

Get child pages

Details

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

Parameters

{
  "id": {
    "description": "The ID of the parent page. If you don't know the page ID, use Get pages and filter the results.",
    "required": true,
    "location": "path",
    "type": "integer",
    "format": "int64"
  },
  "cursor": {
    "description": "Used for pagination, this opaque cursor will be returned in the `next` URL in the `Link` response header. Use the relative URL in the `Link` header to retrieve the `next` set of results.",
    "required": false,
    "location": "query",
    "type": "string"
  },
  "limit": {
    "description": "Maximum number of pages per result to return. If more results exist, use the `Link` header to retrieve a relative URL that will return the next set of results.",
    "required": false,
    "location": "query",
    "type": "integer",
    "format": "int32"
  },
  "sort": {
    "description": "Used to sort the result by a particular field.",
    "required": false,
    "location": "query",
    "type": "string"
  }
}

Response Schema

{
  "title": "MultiEntityResult<ChildPage>",
  "type": "object",
  "properties": {
    "results": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "ID of the page."
          },
          "status": {
            "enum": [
              "current",
              "archived"
            ],
            "type": "string",
            "description": "The status of the content."
          },
          "title": {
            "type": "string",
            "description": "Title of the page."
          },
          "spaceId": {
            "type": "string",
            "description": "ID of the space the page is in."
          },
          "childPosition": {
            "format": "int32",
            "type": "integer",
            "nullable": true,
            "description": "Position of child page within the given parent page tree."
          }
        }
      }
    },
    "_links": {
      "type": "object",
      "properties": {
        "next": {
          "type": "string",
          "description": "Used for pagination. Contains the relative URL for the next set of results, using a cursor query parameter.\nThis property will not be present if there is no additional data available."
        },
        "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('getChildPages', {
    # Add required parameters here
})