Liking cljdoc? Tell your friends :D

atlassian.confluence.client

Confluence client handle + the request seam every atlassian.confluence.* endpoint namespace is built on.

Confluence Cloud exposes two REST surfaces on the same site, both authed with the same API token as Jira (Basic email:token):

:v2 (default) -> /wiki/api/v2 modern, cursor-paginated, recommended :v1 -> /wiki/rest/api legacy, still supported, has CQL search etc.

Endpoint namespaces are split by version (atlassian.confluence.v2.* and atlassian.confluence.v1.*) and never build URLs themselves — they call request with a path RELATIVE to the chosen API root:

(require '[atlassian.confluence.client :as confluence]) (def c (confluence/client)) (confluence/request c {:method :get :path "/pages" :query {:limit 25}}) ; v2 (confluence/request c {:api :v1 :method :get :path "/search" :query {:cql "type=page"}})

Pagination: v2 returns {:results [...] :_links {:next "/wiki/api/v2/...?cursor=..."}}. Pass the cursor query param from the next link to page; next-cursor extracts it.

Confluence client handle + the `request` seam every atlassian.confluence.*
endpoint namespace is built on.

Confluence Cloud exposes two REST surfaces on the same site, both authed with
the same API token as Jira (Basic email:token):

  :v2  (default)  -> /wiki/api/v2   modern, cursor-paginated, recommended
  :v1             -> /wiki/rest/api  legacy, still supported, has CQL search etc.

Endpoint namespaces are split by version (atlassian.confluence.v2.* and
atlassian.confluence.v1.*) and never build URLs themselves — they call
`request` with a path RELATIVE to the chosen API root:

  (require '[atlassian.confluence.client :as confluence])
  (def c (confluence/client))
  (confluence/request c {:method :get :path "/pages" :query {:limit 25}})          ; v2
  (confluence/request c {:api :v1 :method :get :path "/search" :query {:cql "type=page"}})

Pagination: v2 returns `{:results [...] :_links {:next "/wiki/api/v2/...?cursor=..."}}`.
Pass the `cursor` query param from the next link to page; `next-cursor` extracts it.
raw docstring

clientclj

(client)
(client cfg)

Build a Confluence client handle. With no args resolves config from the environment (falling back to the Jira vars, since it's the same site/token) and throws a clear ex-info if required credentials are missing. Pass an explicit Confluence config map to bypass the environment.

Build a Confluence client handle. With no args resolves config from the
environment (falling back to the Jira vars, since it's the same site/token)
and throws a clear ex-info if required credentials are missing. Pass an
explicit Confluence config map to bypass the environment.
sourceraw docstring

next-cursorclj

(next-cursor response)

Extract the cursor query value from a v2 paginated response's :_links :next (or nil when there is no next page). Feed it back as the :cursor query param to fetch the following page.

Extract the `cursor` query value from a v2 paginated response's
`:_links :next` (or nil when there is no next page). Feed it back as the
`:cursor` query param to fetch the following page.
sourceraw docstring

requestclj

(request client {:keys [path api] :as opts})

Perform a Confluence request and return the parsed, keywordized JSON body on 2xx.

opts: :method - :get :post :put :delete (default :get) :path - path relative to the chosen API root, e.g. "/pages/123" :api - :v2 (default) | :v1 :query - query-param map (sequential values -> repeated pairs) :body - EDN value, JSON-encoded into the request body :headers - extra request headers :throw? - throw ex-info on non-2xx (default true)

Delegates to atlassian.client/request; see it for error semantics.

Perform a Confluence request and return the parsed, keywordized JSON body on
2xx.

opts:
  :method  - :get :post :put :delete (default :get)
  :path    - path relative to the chosen API root, e.g. "/pages/123"
  :api     - :v2 (default) | :v1
  :query   - query-param map (sequential values -> repeated pairs)
  :body    - EDN value, JSON-encoded into the request body
  :headers - extra request headers
  :throw?  - throw ex-info on non-2xx (default true)

Delegates to `atlassian.client/request`; see it for error semantics.
sourceraw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close