PHPackages                             lbausch/ceph-radosgw-admin - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. lbausch/ceph-radosgw-admin

ActiveLibrary[API Development](/categories/api)

lbausch/ceph-radosgw-admin
==========================

PHP Ceph Radosgw Admin

v0.3.0(1y ago)422.5k↓46.2%3[1 PRs](https://github.com/lbausch/php-ceph-radosgw-admin/pulls)MITPHPPHP ^8.2CI failing

Since Sep 6Pushed 1y ago1 watchersCompare

[ Source](https://github.com/lbausch/php-ceph-radosgw-admin)[ Packagist](https://packagist.org/packages/lbausch/ceph-radosgw-admin)[ RSS](/packages/lbausch-ceph-radosgw-admin/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (3)Dependencies (4)Versions (6)Used By (0)

PHP Ceph Radosgw Admin
=======================

[](#php-ceph-radosgw-admin-)

[![sca](https://github.com/lbausch/php-ceph-radosgw-admin/actions/workflows/sca.yml/badge.svg)](https://github.com/lbausch/php-ceph-radosgw-admin/actions/workflows/sca.yml/badge.svg) [![tests](https://github.com/lbausch/php-ceph-radosgw-admin/actions/workflows/tests.yml/badge.svg)](https://github.com/lbausch/php-ceph-radosgw-admin/actions/workflows/tests.yml/badge.svg) [![codecov](https://camo.githubusercontent.com/1c5eb7d8aebf3a1c671049c7c85f67c3bdc13ce4898705e96bfd8ff53f472d8b/68747470733a2f2f636f6465636f762e696f2f67682f6c6261757363682f7068702d636570682d7261646f7367772d61646d696e2f6272616e63682f6d61737465722f67726170682f62616467652e737667)](https://camo.githubusercontent.com/1c5eb7d8aebf3a1c671049c7c85f67c3bdc13ce4898705e96bfd8ff53f472d8b/68747470733a2f2f636f6465636f762e696f2f67682f6c6261757363682f7068702d636570682d7261646f7367772d61646d696e2f6272616e63682f6d61737465722f67726170682f62616467652e737667)

A PHP REST client for the [Ceph](https://ceph.io/) [Object Gateway](https://docs.ceph.com/en/latest/radosgw/) [Admin Ops API](https://docs.ceph.com/en/latest/radosgw/adminops/)

- [Features](#features)
- [Requirements](#requirements)
- [Installation](#installation)
- [Usage](#usage)
    - [Admin Client](#admin-client)
    - [Handling Exceptions](#handling-exceptions)
    - [S3 Client](#s3-client)
    - [Custom Configuration](#custom-configuration)

Features
--------

[](#features)

- Supports all endpoints of the [Admin Ops API](https://docs.ceph.com/en/latest/radosgw/adminops/), including currently undocumented `metadata/` endpoints
- Requests are signed using AWS Signature V2 and V4
- Provides S3 client with no extra configuration by utilizing the [AWS SDK for PHP](https://aws.amazon.com/sdk-for-php/)
- Extensible and customizable

Requirements
------------

[](#requirements)

- PHP PHP ^8.2
- Ceph Nautilus (14) or newer

Installation
------------

[](#installation)

Use [Composer](https://getcomposer.org/) to install the library:

```
composer require lbausch/ceph-radosgw-admin
```

On the Ceph side an admin user with sufficient capabilities is required:

```
radosgw-admin user create \
    --uid="admin" \
    --display-name="Admin User" \
    --admin \
    --caps="users=read,write;usage=read,write;buckets=read,write;metadata=read,write;zone=read,write" \
    --access-key="" \
    --secret=""
```

Usage
-----

[](#usage)

### Admin Client

[](#admin-client)

```
use LBausch\CephRadosgwAdmin\Client;

require 'vendor/autoload.php';

$client = Client::make('http://gateway:8080', 'access key', 'secret key');

$response = $client->bucket()->list();

print_r($response->get());

/*
Array
(
    [0] => mybucket
)
*/
```

### Handling Exceptions

[](#handling-exceptions)

Upon failed requests the exception `LBausch\CephRadosgwAdmin\ApiException` is thrown.

```
use LBausch\CephRadosgwAdmin\ApiException;
use LBausch\CephRadosgwAdmin\Client;

require 'vendor/autoload.php';

$client = Client::make('http://gateway:8080', 'access key', 'secret key');

try {
    $client->user()->remove('non existent user');
} catch (ApiException $exception) {
    // Exception handling
}
```

### S3 Client

[](#s3-client)

```
use LBausch\CephRadosgwAdmin\Client;

require 'vendor/autoload.php';

$client = Client::make('http://gateway:8080', 'access key', 'secret key');

$s3client = $client->getS3Client();

// Use different credentials
// $s3client = $client->getS3Client('different access key', 'different secret key');

// Pass arbitrary options to S3 client
// $s3client = $client->getS3Client('different access key', 'different secret key', [
//     'http' => [
//         'verify' => false,
//     ],
// ]);

// Create a bucket
$s3client->createBucket([
    'Bucket' => 'mybucket',
]);

// List all buckets
$buckets = $s3client->listBuckets();

foreach ($buckets['Buckets'] as $bucket) {
    echo $bucket['Name'].PHP_EOL; // mybucket
}

// Put an object in the bucket
$s3client->putObject([
    'Bucket' => 'mybucket',
    'SourceFile' => 'foobar.png',
    'Key' => 'foobar.png',
]);
```

### Custom Configuration

[](#custom-configuration)

Many settings may be overriden if needed. See `LBausch\CephRadosgwAdmin\Config::defaults()` for a list of configurable options.

```
use LBausch\CephRadosgwAdmin\Client;
use LBausch\CephRadosgwAdmin\Config;

require 'vendor/autoload.php';

$config = Config::make([
    // Set a custom admin path
    'adminPath' => 'mgt/',
]);

// Override settings after instantiation, e.g. specify a timeout for requests
$config->set('httpClientConfig', [
    'timeout' => 10,
]);

$client = Client::make('http://gateway:8080', 'access key', 'secret key', $config);
```

###  Health Score

39

—

LowBetter than 86% of packages

Maintenance42

Moderate activity, may be stable

Popularity32

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity57

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~595 days

Total

3

Last Release

526d ago

PHP version history (2 changes)v0.1.0PHP ^7.4|^8.0

v0.3.0PHP ^8.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/c2e0b76aaa55ea4695fe4702b35ab11a4db66d16676a25ba158200e8e8365475?d=identicon)[lbausch](/maintainers/lbausch)

---

Top Contributors

[![lbausch](https://avatars.githubusercontent.com/u/5747127?v=4)](https://github.com/lbausch "lbausch (89 commits)")

---

Tags

adminapicephclientgatewayphpradosrestrest-apis3

###  Code Quality

TestsPHPUnit

Static AnalysisRector

### Embed Badge

![Health badge](/badges/lbausch-ceph-radosgw-admin/health.svg)

```
[![Health](https://phpackages.com/badges/lbausch-ceph-radosgw-admin/health.svg)](https://phpackages.com/packages/lbausch-ceph-radosgw-admin)
```

###  Alternatives

[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3731.2M42](/packages/tencentcloud-tencentcloud-sdk-php)[keboola/storage-api-client

Keboola Storage API PHP Client

10387.5k25](/packages/keboola-storage-api-client)[jasara/php-amzn-selling-partner-api

A fluent interface for Amazon's Selling Partner API in PHP

1344.8k1](/packages/jasara-php-amzn-selling-partner-api)[convertkit/convertkitapi

Kit PHP SDK for the Kit API

2167.1k1](/packages/convertkit-convertkitapi)[mapado/rest-client-sdk

Rest Client SDK for hydra API

1125.9k2](/packages/mapado-rest-client-sdk)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
