PHPackages                             backup-pro/rest-client - 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. backup-pro/rest-client

AbandonedArchivedLibrary

backup-pro/rest-client
======================

A simple REST cient to interact with Backup Pro installations in a RESTful manner

0.1.1(9y ago)0231MITPHP

Since May 3Pushed 9y ago1 watchersCompare

[ Source](https://github.com/mithra62/BpApiClient)[ Packagist](https://packagist.org/packages/backup-pro/rest-client)[ RSS](/packages/backup-pro-rest-client/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (2)Versions (4)Used By (0)

Backup Pro REST Client
======================

[](#backup-pro-rest-client)

A simple REST cient to interact with Backup Pro installations.

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

[](#installation)

Add `backup-pro/rest-client` as a requirement to `composer.json`:

```
$ composer require backup-pro/rest-client
```

Simple Example
--------------

[](#simple-example)

```
use \mithra62\BpApiClient\Client;

$client = new Client();
$backups = $client->setApiKey($api_key)
                 ->setApiSecret($api_secret)
                 ->setSiteUrl($api_endpoint_url)
                 ->get('/backups');
```

Authentication
--------------

[](#authentication)

Backup Pro uses HMAC-SHA authentication which is a simple key / secret paradigm to create hashed signatures. You can get/set your api key and secret, as well as the API URL endpoint, from your individual Backup Pro installations.

Error Handling
--------------

[](#error-handling)

If anything goes wrong with a request the library will return an [ApiProblem](http://tools.ietf.org/html/draft-nottingham-http-problem-07 "ApiProblem") object. Here's an example:

```
use \mithra62\BpApiClient\Client;
use \mithra62\BpApiClient\ApiProblem;

$client = new Client();
$backups = $client->setApiKey($api_key)
                 ->setApiSecret($api_secret)
                 ->setSiteUrl($api_endpoint_url)
                 ->get('/backups');

if($result instanceof ApiProblem)
{
    if($result->getStatus() == 403) {
        //authentication issue
    }

	$result->getTitle() //API problem response title
	$result->getDetail() //API problem response details

}
```

Hal Responses
-------------

[](#hal-responses)

For all successful responses from the Backup Pro API, the library will return an instance of `\mithra62\BpApiClient\Hal` object which is a wrapper for [\\Nocarrier\\Hal](https://github.com/blongden/hal).

```
use \mithra62\BpApiClient\Client;
use \mithra62\BpApiClient\Hal;

$client = new Client();
$backups = $client->setApiKey($api_key)
                 ->setApiSecret($api_secret)
                 ->setSiteUrl($api_endpoint_url)
                 ->get('/backups');

if($result instanceof Hal)
{
    $data = $result->getData();
    $resources = $result->getResources();
}
```

Examples
--------

[](#examples)

Since Backup Pro follows the \[Richardson Maturity Model\](Richardson Maturity Model) there are helper methods available for each HTTP verb. Below are some simple usecase examples and their implementations

### Take a Backup

[](#take-a-backup)

```
use \mithra62\BpApiClient\Client;

$client = new Client();
$backups = $client->setApiKey($api_key)
                 ->setApiSecret($api_secret)
                 ->setSiteUrl($api_endpoint_url)
                 ->post('/backups');
```

### Update Settings

[](#update-settings)

```
use \mithra62\BpApiClient\Client;

$client = new Client();
$settings = array('working_directory' => '/path/to/working_directory');
$update = $client->setApiKey($api_key)
                 ->setApiSecret($api_secret)
                 ->setSiteUrl($api_endpoint_url)
                 ->put('/settings', $settings);
```

### Get Settings

[](#get-settings)

```
use \mithra62\BpApiClient\Client;

$client = new Client();
$settings = $client->setApiKey($api_key)
                 ->setApiSecret($api_secret)
                 ->setSiteUrl($api_endpoint_url)
                 ->get('/settings');
```

### Get Storage Locations

[](#get-storage-locations)

```
use \mithra62\BpApiClient\Client;

$client = new Client();
$storage_locations = $client->setApiKey($api_key)
                 ->setApiSecret($api_secret)
                 ->setSiteUrl($api_endpoint_url)
                 ->get('/storage');
```

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity55

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 ~82 days

Total

2

Last Release

3575d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/042722642fab9b3e2f7b0711428b40053a2be0d6a1b752e50e7a7fffd06fb712?d=identicon)[mithra62](/maintainers/mithra62)

---

Top Contributors

[![eric-lamb62](https://avatars.githubusercontent.com/u/1008036?v=4)](https://github.com/eric-lamb62 "eric-lamb62 (28 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/backup-pro-rest-client/health.svg)

```
[![Health](https://phpackages.com/badges/backup-pro-rest-client/health.svg)](https://phpackages.com/packages/backup-pro-rest-client)
```

PHPackages © 2026

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