getCustomContentByTypeInPage
Get custom content by type in page
Details
- Method:
GET - Path:
/pages/{id}/custom-content - Operation ID:
getCustomContentByTypeInPage
Parameters
{
"id": {
"description": "The ID of the page for which custom content should be returned.",
"required": true,
"location": "path",
"type": "integer",
"format": "int64"
},
"type": {
"description": "The type of custom content being requested. See: https://developer.atlassian.com/cloud/confluence/custom-content/ for additional details on custom content.",
"required": true,
"location": "query",
"type": "string"
},
"sort": {
"description": "Used to sort the result by a particular field.",
"required": false,
"location": "query",
"type": "string",
"enum": [
"id",
"-id",
"created-date",
"-created-date",
"modified-date",
"-modified-date",
"title",
"-title"
]
},
"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"
},
"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.\n\nNote: If the custom content body type is `storage`, the `storage` and `atlas_doc_format` body formats are able to be returned. If the custom content body type is `raw`, only the `raw` body format is able to be returned.",
"required": false,
"location": "query",
"type": "string",
"enum": [
"raw",
"storage",
"atlas_doc_format"
]
}
}Response Schema
{
"title": "MultiEntityResult<CustomContent>",
"type": "object",
"properties": {
"results": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "ID of the custom content."
},
"type": {
"type": "string",
"description": "The type of custom content."
},
"status": {
"enum": [
"current",
"draft",
"archived",
"historical",
"trashed",
"deleted",
"any"
],
"type": "string",
"description": "The status of the content."
},
"title": {
"type": "string",
"description": "Title of the custom content."
},
"spaceId": {
"type": "string",
"description": "ID of the space the custom content is in.\n\nNote: This is always returned, regardless of if the custom content has a container that is a space."
},
"pageId": {
"type": "string",
"description": "ID of the containing page.\n\nNote: This is only returned if the custom content has a container that is a page."
},
"blogPostId": {
"type": "string",
"description": "ID of the containing blog post.\n\nNote: This is only returned if the custom content has a container that is a blog post."
},
"customContentId": {
"type": "string",
"description": "ID of the containing custom content.\n\nNote: This is only returned if the custom content has a container that is custom content."
},
"authorId": {
"type": "string",
"description": "The account ID of the user who created this custom content originally."
},
"createdAt": {
"type": "string",
"format": "date-time",
"description": "Date and time when the custom content was created. In format \"YYYY-MM-DDTHH:mm:ss.sssZ\"."
},
"version": {
"type": "object",
"properties": {
"createdAt": {
"type": "string",
"format": "date-time",
"description": "Date and time when the version was created. In format \"YYYY-MM-DDTHH:mm:ss.sssZ\"."
},
"message": {
"type": "string",
"description": "Message associated with the current version."
},
"number": {
"format": "int32",
"type": "integer",
"description": "The version number."
},
"minorEdit": {
"type": "boolean",
"description": "Describes if this version is a minor version. Email notifications and activity stream updates are not created for minor versions."
},
"authorId": {
"type": "string",
"description": "The account ID of the user who created this version."
}
}
},
"body": {
"type": "object",
"description": "Contains fields for each representation type requested.",
"properties": {
"raw": {
"type": "object",
"properties": {
"representation": {
"type": "string",
"description": "Type of content representation used for the value field."
},
"value": {
"type": "string",
"description": "Body of the content, in the format found in the representation field."
}
}
},
"storage": {
"type": "object",
"properties": {
"representation": {
"type": "string",
"description": "Type of content representation used for the value field."
},
"value": {
"type": "string",
"description": "Body of the content, in the format found in the representation field."
}
}
},
"atlas_doc_format": {
"type": "object",
"properties": {
"representation": {
"type": "string",
"description": "Type of content representation used for the value field."
},
"value": {
"type": "string",
"description": "Body of the content, in the format found in the representation field."
}
}
}
}
},
"_links": {
"type": "object",
"properties": {
"webui": {
"type": "string",
"description": "Web UI link of the content."
}
}
}
}
}
},
"_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('getCustomContentByTypeInPage', {
# Add required parameters here
})