Registry / devops / confluence-data-center-client

confluence-data-center-client

JSON →
library1.0.8jsnpmunverified

TypeScript client library (v1.0.8) for Confluence Server/Data Center REST API. Provides typed methods for content, spaces, users, and administration endpoints. Node.js >=22 required. Key differentiator: full TypeScript support with auto-generated types from Confluence API specs, unlike generic HTTP clients. Minimal dependencies, actively maintained.

npm install confluence-data-center-client
INSTALL
IMPORT
SIG · CONFLUENCE-DATA-CE
C
confluence-data-center-client
devopsjavascriptv1.0.8
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

ConfluenceClient
import { ConfluenceClient } from 'confluence-data-center-client'
const ConfluenceClient = require('confluence-data-center-client')
ESM-only package since v1.0.0.
Content
import { Content } from 'confluence-data-center-client'
import Content from 'confluence-data-center-client'
Content is a named type export, not default.
Space
import { Space } from 'confluence-data-center-client'
Type for space objects.

Creates a client, authenticates with basic auth, fetches a space by key.

import { ConfluenceClient } from 'confluence-data-center-client'; const client = new ConfluenceClient({ baseUrl: process.env.CONFLUENCE_BASE_URL ?? 'http://localhost:8090', auth: { username: process.env.CONFLUENCE_USERNAME ?? 'admin', password: process.env.CONFLUENCE_PASSWORD ?? 'admin' } }); async function getSpace(key: string) { try { const space = await client.space.getSpace({ spaceKey: key }); console.log('Space:', space); } catch (error) { console.error('Error fetching space:', error); } } getSpace('~admin');
Debug
Known issues
gotchaNode.js >=22 required. Older versions cause import errors.
fix
Update Node.js to v22 or later.
affects: <22.0.0
gotchaESM-only package. CommonJS require() will not work.
fix
Use import syntax or enable ESM in your project.
affects: >=1.0.0
gotchaBasic auth uses username and password, not personal access tokens.
fix
Ensure your auth object contains username/password fields.
affects: >=1.0.0
Errors
Common errors & fixes
ERR_MODULE_NOT_FOUND: Cannot find module 'confluence-data-center-client'
Using CommonJS require() on an ESM-only package.
fix
Use import syntax: import { ConfluenceClient } from 'confluence-data-center-client'
Upgrade
Version history
1.0.8latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
10 hits · last 30 days
node
10
Resources
confluence-data-center-client — npm install confluence-data-center-client · libregistry