Skip to main content

radosgw-admin

Node.js SDK for the Ceph RADOS Gateway Admin Ops API. Manage users, buckets, quotas, rate limits and access keys programmatically — with modern TypeScript support.

npm install radosgw-admin

Why this package?

There was no actively maintained Node.js SDK for the Ceph RGW Admin Ops API. Meanwhile, Ceph adoption in Kubernetes (Rook-Ceph, OpenShift Data Foundation) keeps growing and teams need to automate RGW admin tasks from Node.js. This package fills that gap.

Featureradosgw-admin
API coverage8 modules, 45+ methods across all Admin Ops endpoints
AuthAWS SigV4 signing via node:crypto (zero deps)
Error handlingTyped error class hierarchy — RGWNotFoundError, RGWAuthError, etc.
TypeScriptFull strict types, no any
Module formatESM + CJS dual build
Response shapeAuto camelCase conversion

Quick example

import { RadosGWAdminClient } from 'radosgw-admin';

const rgw = new RadosGWAdminClient({
host: 'http://ceph-rgw.example.com',
port: 8080,
accessKey: process.env.RGW_ACCESS_KEY!,
secretKey: process.env.RGW_SECRET_KEY!,
});

// Create a user
const user = await rgw.users.create({
uid: 'alice',
displayName: 'Alice',
email: 'alice@example.com',
maxBuckets: 100,
});

// Set a quota
await rgw.quota.setUserQuota({
uid: 'alice',
maxSizeKb: 10 * 1024 * 1024, // 10 GB
maxObjects: 1_000_000,
enabled: true,
});

// Delete the user
await rgw.users.delete({ uid: 'alice' });

What's covered

ModuleOperations
rgw.userscreate, get, modify, delete, list, suspend, enable, getStats, getByAccessKey
rgw.keysgenerate, revoke
rgw.subuserscreate, modify, remove
rgw.bucketsget, list, delete, transferOwnership, removeOwnership, verifyIndex
rgw.quotagetUserQuota, setUserQuota, getBucketQuota, setBucketQuota, enable/disable
rgw.rateLimitgetUser, setUser, getBucket, setBucket, getGlobal, setGlobal
rgw.usageget, trim
rgw.infoget

Next steps