confl_content {conflr}R Documentation

REST Wrapper for the ContentService

Description

REST Wrapper for the ContentService

Usage

confl_list_pages(
  type = c("page", "blogpost", "comment", "attachment"),
  limit = 10,
  start = 0,
  spaceKey = NULL,
  title = NULL,
  expand = NULL
)

confl_get_page(id, expand = "body.storage")

confl_post_page(
  type = c("page", "blogpost"),
  spaceKey,
  title,
  body,
  ancestors = NULL
)

confl_update_page(id, title, body)

confl_delete_page(id)

Arguments

type

The content type to return. Default value: page. Valid values: page, blogpost.

limit

The limit of the number of items to return, this may be restricted by fixed system limits.

start

The start point of the collection to return.

spaceKey

The space key to find content under.

title

The title of the page to find. Required for page type.

expand

A comma separated list of properties to expand. To refer the nested contents, use periods. (e.g. ⁠body.storage,history⁠).

id

ID of the content.

body

The HTML source of the page.

ancestors

The page ID of the parent pages.

Value

The API response as a list.

See Also

https://docs.atlassian.com/ConfluenceServer/rest/latest/

Examples

## Not run: 
# Create a page titled "title1" on a space named "space1"
result <- confl_post_page(
  type = "page",
  spaceKey = "space1",
  title = "title1",
  body = "<h2>example</h2><p>This is example</p>"
)

# Jump to the result page
browseURL(paste0(result$`_links`$base, result$`_links`$webui))

# List pages under space "space1" up to 10 pages
confl_list_pages(spaceKey = "space1")

## End(Not run)


[Package conflr version 0.1.1 Index]