是否可以从 REST Api 获取 Confluence Space 的全部内容?
我试试这个例子 curl -u admin:admin http://localhost:8080/confluence/rest/api/content/3965072?expand=body.storage
但这只是首页内容。
是否可以从 REST Api 获取 Confluence Space 的全部内容?
我试试这个例子 curl -u admin:admin http://localhost:8080/confluence/rest/api/content/3965072?expand=body.storage
但这只是首页内容。
在我使用的 Confluence RestAPI 中,重要的是要认识到每个页面在概念上都类似于 Space,因为它也可能包含其他页面。还有一些东西的集合,比如附件,它们挂在页面上。我记得这个过程大致是这样的:
请注意我之前关于确保您参考特定版本的正确 Confluence RestAPI 文档的评论。这对我来说是一个很大的困惑。
是的,需要做这样的事情:
http://localhost:8080/confluence/rest/api/space/ SPACE_KEY /content?expand=body.storage
您还可以获得特定类型的内容项(页面或博客文章),如下所示:
http://localhost:8080/confluence/rest/api/space/SPACE_KEY/content/ page ?expand=body.storage
http://localhost:8080/confluence/rest/api/space/SPACE_KEY/content/ blogpost ? expand=body.storage
您需要考虑分页: https ://developer.atlassian.com/confdev/confluence-rest-api/pagination-in-the-rest-api