getFolderDescendants
Get descendants of folder
Details
- Method:
GET - Path:
/folders/{id}/descendants - Operation ID:
getFolderDescendants
Parameters
{
"id": {
"description": "The ID of the folder.",
"required": true,
"location": "path",
"type": "integer",
"format": "int64"
},
"limit": {
"description": "Maximum number of items per result to return. If more results exist, call the endpoint with the cursor to fetch the next set of results.",
"required": false,
"location": "query",
"type": "integer",
"format": "int32"
},
"depth": {
"description": "Maximum depth of descendants to return. If more results are required, use the endpoint corresponding to the content type of the deepest descendant to fetch more descendants.",
"required": false,
"location": "query",
"type": "integer",
"format": "int32"
},
"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"
}
}Response Schema
{
"title": "MultiEntityResult<DescendantsResponse>",
"type": "object",
"properties": {
"results": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "ID of the descendant."
},
"status": {
"enum": [
"current",
"archived"
],
"type": "string",
"description": "The status of the content."
},
"title": {
"type": "string",
"description": "Title of the descendant."
},
"type": {
"type": "string",
"description": "Hierarchical content type (database/embed/folder/page/whiteboard)."
},
"parentId": {
"type": "string",
"description": "ID of the parent content."
},
"depth": {
"format": "int32",
"type": "integer",
"description": "Depth of the descendant in the content tree relative to the content specified in the request."
},
"childPosition": {
"format": "int32",
"type": "integer",
"nullable": true,
"description": "Numerical value indicating position of the content relative to its siblings (with the same parentId) within the content tree.\nIf the content is sorted by childPosition, it will reflect the default content ordering within the content 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('getFolderDescendants', {
# Add required parameters here
})