PHPackages                             blesta/pterodactyl-sdk - 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. blesta/pterodactyl-sdk

ActiveSdk

blesta/pterodactyl-sdk
======================

Pterodactyl SDK

1.3.1(8mo ago)2727↓100%2[1 issues](https://github.com/blesta/pterodactyl-sdk/issues)1proprietaryPHPPHP &gt;=5.4.0

Since Oct 24Pushed 8mo ago4 watchersCompare

[ Source](https://github.com/blesta/pterodactyl-sdk)[ Packagist](https://packagist.org/packages/blesta/pterodactyl-sdk)[ RSS](/packages/blesta-pterodactyl-sdk/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (1)Versions (18)Used By (1)

Pterodactyl SDK
===============

[](#pterodactyl-sdk)

This is an SDK that integrates with APIs from [Pterodactyl](https://pterodactyl.com/) [Docs](https://dashflo.net/docs/api/pterodactyl/v1/#introduction).

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

[](#installation)

You can install the SDK via composer:

```
composer require blesta/pterodactyl-sdk

```

Usage
-----

[](#usage)

### Initializing the API

[](#initializing-the-api)

```
$useSsl = true;
$api = new \Blesta\PterodactylSDK\PterodactylApi('API_KEY', 'PANEL_URL', $useSsl);

```

One thing to note is that the Pterodactyl Panel has two API's: The application API and the account API. The account API/key should be used to access the Client requestor, while the application API/key should be used for all other requestors.

### Loading a Requestor

[](#loading-a-requestor)

Requestor definition: A class that the SDK uses to access API endpoints of a particular type (e.g. Servers, Nests, or Locations).

The SDK utilizes PHP's \_\_get() magic method so requestors can just be accessed as a property of the loaded api. For example:

```
$clientRequestor = $api->Client;

```

### Calling an Endpoint

[](#calling-an-endpoint)

All endpoints exist as a method on a requestor. For example, the application/locations/ endpoint would be called as follows:

```
$locationResponse = $api->Locations->getAll();

```

Or to call the same endpoint but with post parameters to add a new location, it would look like this:

```
$locationResponse = $api->Locations->add($parameters);

```

### Using a response object

[](#using-a-response-object)

The response object is meant to make it easier to Access the returned data and recognize when you have encountered errors. It has the following methods:

```
$locationResponse->raw(); // Useful for logging the full response from Pterodactyl
$locationResponse->response(); // The json decoded data returned
$locationResponse->headers(); // An array of http headers returned
$locationResponse->status(); // The status code returned
$locationResponse->errors(); // An array of the errors returned

```

The most used methods are typically response() and errors()

```
$errors = $locationResponse->errors();
if (empty($errors)) {
    $locations = $locationResponse->response();
    ...
    ...
    ...
}

```

###  Health Score

40

—

FairBetter than 88% of packages

Maintenance50

Moderate activity, may be stable

Popularity21

Limited adoption so far

Community17

Small or concentrated contributor base

Maturity61

Established project with proven stability

 Bus Factor1

Top contributor holds 80% 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 ~139 days

Recently: every ~402 days

Total

16

Last Release

252d ago

Major Versions

0.2.x-dev → 1.0.02019-11-19

### Community

Maintainers

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

![](https://www.gravatar.com/avatar/49adf61c394a865424ab1d98a1a07dd448cf3aff70b13a20aa167531c765fb94?d=identicon)[Jono](/maintainers/Jono)

---

Top Contributors

[![JReissmueller](https://avatars.githubusercontent.com/u/18198499?v=4)](https://github.com/JReissmueller "JReissmueller (12 commits)")[![abdyfranco](https://avatars.githubusercontent.com/u/23648083?v=4)](https://github.com/abdyfranco "abdyfranco (2 commits)")[![tysonphillips](https://avatars.githubusercontent.com/u/8607630?v=4)](https://github.com/tysonphillips "tysonphillips (1 commits)")

### Embed Badge

![Health badge](/badges/blesta-pterodactyl-sdk/health.svg)

```
[![Health](https://phpackages.com/badges/blesta-pterodactyl-sdk/health.svg)](https://phpackages.com/packages/blesta-pterodactyl-sdk)
```

PHPackages © 2026

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