惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Martin Fowler
Martin Fowler
有赞技术团队
有赞技术团队
博客园_首页
H
Help Net Security
GbyAI
GbyAI
aimingoo的专栏
aimingoo的专栏
V
Visual Studio Blog
The Cloudflare Blog
腾讯CDC
Jina AI
Jina AI
Last Week in AI
Last Week in AI
月光博客
月光博客
博客园 - 叶小钗
Google DeepMind News
Google DeepMind News
B
Blog RSS Feed
Blog — PlanetScale
Blog — PlanetScale
人人都是产品经理
人人都是产品经理
Engineering at Meta
Engineering at Meta
Y
Y Combinator Blog
Hugging Face - Blog
Hugging Face - Blog
博客园 - 聂微东
爱范儿
爱范儿
N
Netflix TechBlog - Medium
F
Fortinet All Blogs

OneUptime Blog

How to Monitor Azure App Services (PaaS) with OpenTelemetry Grafana Stack vs OneUptime: DIY Observability or Unified Platform? Your AI Workloads Are About to Blow Up Your Observability Bill The Great Observability Consolidation Is Here How to Write Custom Object Classes for Ceph How to Write Custom Ceph Manager Modules How to Write a ceph.conf Configuration File How to Use Rook-Ceph with OpenShift How to Use Rook-Ceph with Longhorn for Comparison How to Configure Volume Snapshot Class for RBD in Rook How to Configure VolumeReplicationClass Scheduling Intervals in Rook How to Set Up Volume Replication with Rook-Ceph How to Create Volume Group Snapshots with Rook CSI How to Visualize Ceph Network Performance in Grafana How to Enable Virtual Host-Style Bucket Access in Rook How to View Runtime Configuration via Admin Socket How to View Quota Settings and Update Stats in Ceph RGW How to View PG Scaling Recommendations with autoscale-status How to View PG Distribution via Admin Socket How to View Performance Metrics in the Ceph Dashboard How to View OSD Performance Counters in Ceph How to View Connection Status via Admin Socket How to View Ceph Cluster Summary Dashboard via CLI How to Version Control Rook-Ceph Configuration How to Version Control Ceph Infrastructure with Terraform How to Verify Kubernetes Node Requirements for Rook-Ceph Deployment How to Verify Health Before and After Rook Upgrades How to Verify Data Integrity with Deep Scrubbing How to Verify Complete Rook-Ceph Cleanup How to Verify Backup Integrity from Ceph Snapshots
How to Use the Admin Ops API with Ceph RGW
Nawaz Dhandala · 2026-03-31 · via OneUptime Blog

Overview

The Ceph RGW Admin Ops API is a REST API that exposes administrative operations over HTTP. It mirrors the functionality of radosgw-admin but is accessible programmatically, making it suitable for automation, dashboards, and integrations. The API requires a system-level user for authentication.

Enabling the Admin API

The Admin Ops API is available at the /admin path on the RGW endpoint. Ensure the admin URL is accessible:

# Test admin API access
curl -v "http://rgw-host:80/admin/info" \
  --aws-sigv4 "aws:amz:us-east-1:s3" \
  --user "ADMINKEY:ADMINSECRET"

Creating a System User for Admin API

# Create a system user
radosgw-admin user create \
  --uid=rgw-admin \
  --display-name="RGW Admin User" \
  --system \
  --access-key=ADMINACCESSKEY \
  --secret=ADMINSECRETKEY

User Management via Admin API

# Get user info
curl -X GET "http://rgw-host:80/admin/user?uid=alice" \
  --aws-sigv4 "aws:amz:us-east-1:s3" \
  --user "ADMINACCESSKEY:ADMINSECRETKEY"

# Create a user
curl -X PUT "http://rgw-host:80/admin/user?uid=bob&display-name=Bob+Smith" \
  --aws-sigv4 "aws:amz:us-east-1:s3" \
  --user "ADMINACCESSKEY:ADMINSECRETKEY"

# Delete a user
curl -X DELETE "http://rgw-host:80/admin/user?uid=bob&purge-data=true" \
  --aws-sigv4 "aws:amz:us-east-1:s3" \
  --user "ADMINACCESSKEY:ADMINSECRETKEY"

Bucket Operations via Admin API

# Get bucket info
curl -X GET "http://rgw-host:80/admin/bucket?bucket=mybucket" \
  --aws-sigv4 "aws:amz:us-east-1:s3" \
  --user "ADMINACCESSKEY:ADMINSECRETKEY"

# Link bucket to user
curl -X PUT "http://rgw-host:80/admin/bucket?bucket=mybucket&uid=alice" \
  --aws-sigv4 "aws:amz:us-east-1:s3" \
  --user "ADMINACCESSKEY:ADMINSECRETKEY"

# Get bucket usage stats
curl -X GET "http://rgw-host:80/admin/bucket?bucket=mybucket&stats=true" \
  --aws-sigv4 "aws:amz:us-east-1:s3" \
  --user "ADMINACCESSKEY:ADMINSECRETKEY"

Quota Management

# Set user quota
curl -X PUT \
  "http://rgw-host:80/admin/user?quota&uid=alice&quota-type=user" \
  -d '{"max_size_kb": 10485760, "max_objects": 100000, "enabled": true}' \
  -H "Content-Type: application/json" \
  --aws-sigv4 "aws:amz:us-east-1:s3" \
  --user "ADMINACCESSKEY:ADMINSECRETKEY"

Using Python with the Admin API

import requests
from botocore.auth import SigV4Auth
from botocore.awsrequest import AWSRequest
from botocore.credentials import Credentials

def admin_api_request(method, path, params=None):
    url = f"http://rgw-host:80/admin/{path}"
    credentials = Credentials('ADMINACCESSKEY', 'ADMINSECRETKEY')

    request = AWSRequest(method=method, url=url, params=params)
    SigV4Auth(credentials, 's3', 'us-east-1').add_auth(request)

    response = requests.request(
        method,
        url,
        headers=dict(request.headers),
        params=params
    )
    return response.json()

# Get user info
user = admin_api_request('GET', 'user', {'uid': 'alice'})
print(user)

Summary

The Ceph RGW Admin Ops REST API enables programmatic access to all administrative operations. It requires a system user for authentication and uses the same AWS Signature V4 signing as the S3 API. Use it to build automation workflows, monitoring dashboards, or integrate RGW management into existing infrastructure platforms. Python scripts using SigV4 authentication provide a clean way to interact with the API without the CLI.