Confluence REST API-按标题检索页面时扩展页面正文 [英] Confluence REST API - expanding page body when retrieving page by title

查看:305
本文介绍了Confluence REST API-按标题检索页面时扩展页面正文的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用最新的REST API按其标题访问Confluence页面。为了检索某些字段的更多详细信息,我传递了 expand 参数(请参阅汇合文档):

I'm accessing a Confluence page by its title using the latest REST API. To retrieve more details on certain fields, I'm passing the expand parameter (see Confluence Docs):

https://xyz.atlassian.net/wiki/rest/api/content/?title=Architecture&spaceKey=XX&expand=body

https://xyz.atlassian.net/wiki/rest/api/content/?title=Architecture&spaceKey=XX&expand=body.view

但结果不

请注意,这仅适用于使用页面ID的请求。使用标题检索页面的方式类似于搜索结果,因此扩展功能似乎无法正常工作。根据文档,它应该按照我的示例工作。我缺少什么吗?

Note, this is working fine with requests using a page id only. Using the title to retrieve the page is threaded similar to search results, hence the expand feature seems not to work the same. According to the documentation it should work as per my example. Am I missing something?

推荐答案

您需要在扩展参数中指定所需的主体类型。

You need to specify which type of "body" you want in the expansion parameter.

在您的情况下,如下所示:

In your case, something like this:

https://xyz.atlassian.net/wiki/rest/api/content/?title=Architecture&spaceKey = XX& expand = body.view

https://xyz.atlassian.net/wiki/rest/api/content/?title=Architecture&spaceKey= XX& expand = body.export_view

可能的值是:


  • 编辑器

  • export_view

  • anonymous_export_view

  • view

  • 存储

  • editor
  • export_view
  • anonymous_export_view
  • view
  • storage

这篇关于Confluence REST API-按标题检索页面时扩展页面正文的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆