【问题标题】:Get content with url confluence REST API使用 url confluence REST API 获取内容
【发布时间】:2015-02-06 01:04:08
【问题描述】:

您好,我注意到了几种使用 REST API 获取内容的方法。虽然我想知道是否有一种方法可以直接从 url 获取内容而不调用空格和标题。

意思是如果我有http://localhost:8080/display/TST/myPage 而不是这样做

curl -u admin:admin -X GET "http://localhost:8080/confluence/rest/api/content?title=myPage&spaceKey=TST" | python -mjson.tool

我可以在 rest api 上使用 url。 也许是这样的

curl -u admin:admin -X GET "http://localhost:8080/confluence/rest/api/content/display/TST/myPage" | python -mjson.tool

有没有办法做到这一点?

这是我看过的文档

https://docs.atlassian.com/atlassian-confluence/REST/latest/#d3e865

【问题讨论】:

    标签: rest curl confluence confluence-rest-api


    【解决方案1】:

    是的;在您链接到的部分的正下方,有对该请求版本的描述,该版本采用文章 ID:/rest/api/content/{id}。只要知道文章ID,这是最简单的方法。

    【讨论】:

    • 如何获取特定 wiki 页面的内容 ID?
    • 浏览到工具 -> 页面信息,您可以从目标 URL 中读取 ID。
    • 啊,谢谢。我已经在Page Info 上但没有找到它...我没有查看 URL。 :)
    • 但这不是获取附件。
    • @KeyurPatel - 请作为一个新问题提出。
    猜你喜欢
    • 2016-11-17
    • 2017-08-03
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2022-01-02
    • 2019-12-16
    • 1970-01-01
    相关资源
    最近更新 更多