PHPackages                             vortechstudio/aapanel-api - 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. vortechstudio/aapanel-api

ActiveLibrary[API Development](/categories/api)

vortechstudio/aapanel-api
=========================

API Client AAPanel with PHP Version 7.0.21 or higher

1.1.0(10mo ago)040MITPHPPHP ^8.0

Since Aug 27Pushed 10mo agoCompare

[ Source](https://github.com/vortechstudio-packager/aapanel-api)[ Packagist](https://packagist.org/packages/vortechstudio/aapanel-api)[ RSS](/packages/vortechstudio-aapanel-api/feed)WikiDiscussions main Synced today

READMEChangelog (1)Dependencies (1)Versions (2)Used By (0)

AAPanel API 7.0.21 or Higher
============================

[](#aapanel-api-7021-or-higher)

API Client AAPanel with PHP Version min 8++

aaPanel API PHP Client
======================

[](#aapanel-api-php-client)

A PHP client library for interacting with the aaPanel API.

Features
========

[](#features)

- Fetch logs from the API.
- Add a new site.
- Update a run path site.
- Check a run path site
- Add a subdomain.
- Delete a subdomain.
- Fetch list of FTP accounts.
- Add a new FTP account.
- Delete an FTP account.
- Import SQL file into a database.
- Apply SSL certificate to a domain.
- Renew SSL certificate for a domain.
- Upload Cert SSL for a domain.
- Get SSL details for a domain and return the 'cert, key, other information' value.
- Enable HTTPS redirection for a site.
- Disable a site.
- Enable a site.

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

[](#installation)

Install the library using Composer:

```
composer require alfikripayakumbuh/aapanel-api
```

### Usage

[](#usage)

Initialize the Client

```
require_once 'vendor/autoload.php';

use AlfikriPayakumbuh\AAPanelAPI\aaPanelApiClient;

$apiKey = 'your_api_key'; // get the api key from the settings aapanel
$baseUrl = 'https://example.com:8888'; // Replace with your aaPanel API base URL
$pathCookie = './'; // want save cookie file
$client = new aaPanelApiClient($apiKey, $baseUrl, $pathCookie);
```

Functionality
=============

[](#functionality)

Fetch Logs
----------

[](#fetch-logs)

### Fetches logs from the API.

[](#fetches-logs-from-the-api)

```
$logs = $client->fetchLogs();
var_dump($logs);
```

Add a New Site
--------------

[](#add-a-new-site)

### Adds a new site to aaPanel.

[](#adds-a-new-site-to-aapanel)

```
$response = $client->addSite(domain: 'example.com', path: '/home/project', runPath='/public', type: 2, phpVersion: '84', setSsl: 1);
var_dump($response);
```

Update a run path site
----------------------

[](#update-a-run-path-site)

### Update a run path site domain.

[](#update-a-run-path-site-domain)

```
$response = $client->updateRunPath(id: '123', runPath='/public');
var_dump($response);
```

Check a run path site
---------------------

[](#check-a-run-path-site)

### Check run path site domain.

[](#check-run-path-site-domain)

```
$response = $client->checkRunPath(domain: 'example.com');
var_dump($response);
```

Add a Subdomain
---------------

[](#add-a-subdomain)

### Adds a subdomain to an existing domain.

[](#adds-a-subdomain-to-an-existing-domain)

```
$response = $client->addSubdomain('subdomain', 'example.com', '192.168.1.1');
var_dump($response);
```

Delete a Subdomain
------------------

[](#delete-a-subdomain)

### Deletes a subdomain from an existing domain.

[](#deletes-a-subdomain-from-an-existing-domain)

```
$response = $client->deleteSubdomain('subdomain', 'example.com', '192.168.1.1');
var_dump($response);
```

Fetch FTP Accounts
------------------

[](#fetch-ftp-accounts)

### Fetches a list of FTP accounts.

[](#fetches-a-list-of-ftp-accounts)

```
$ftpAccounts = $client->fetchFtpAccounts();
var_dump($ftpAccounts);
```

Add FTP Account
---------------

[](#add-ftp-account)

### Adds a new FTP account.

[](#adds-a-new-ftp-account)

```
$response = $client->addFtpAccount('ftpuser', 'ftppassword');
var_dump($response);
```

Delete FTP Account
------------------

[](#delete-ftp-account)

### Deletes an FTP account.

[](#deletes-an-ftp-account)

```
$response = $client->deleteFtpAccount('ftpuser');
var_dump($response);
```

Apply SSL Certificate
---------------------

[](#apply-ssl-certificate)

### Applies an SSL certificate to a domain.

[](#applies-an-ssl-certificate-to-a-domain)

```
$response = $client->applySslCertificate(domain: 'example.com', domainId: 123, $autoWildcard: 0);
var_dump($response);
```

Renew SSL Certificate
---------------------

[](#renew-ssl-certificate)

### Renews an SSL certificate for a domain.

[](#renews-an-ssl-certificate-for-a-domain)

```
$response = $client->renewCert('example.com');
var_dump($response);
```

Get Hash Domain
---------------

[](#get-hash-domain)

### Gets hash for a domain.

[](#gets-hash-for-a-domain)

```
$hash = $client->getHashValue('example.com');
var_dump($hash);
```

Get SSL Details
---------------

[](#get-ssl-details)

### Gets SSL details for a domain.

[](#gets-ssl-details-for-a-domain)

```
$response = $client->getSSLDetails('example.com');
var_dump($response);
```

Upload key cert SSL
-------------------

[](#upload-key-cert-ssl)

### Upload key and cert SSL certificate for a domain if available from your computer.

[](#upload-key-and-cert-ssl-certificate-for-a-domain-if-available-from-your-computer)

```
$response = $client->uploadCert('example.com', 'key', 'cert');
var_dump($response);
```

Enable HTTPS Redirection
------------------------

[](#enable-https-redirection)

### Enables HTTPS redirection for a site.

[](#enables-https-redirection-for-a-site)

```
$response = $client->enableHttpsRedirection('example.com');
var_dump($response);
```

Disable Site
------------

[](#disable-site)

### Disables a site.

[](#disables-a-site)

```
$response = $client->disableSite(1, 'example.com');
var_dump($response);
```

Enable Site
-----------

[](#enable-site)

### Enables a site.

[](#enables-a-site)

```
$response = $client->enableSite(1, 'example.com');
var_dump($response);
```

Get FTP Account Details
-----------------------

[](#get-ftp-account-details)

### Retrieves details of a specific FTP account.

[](#retrieves-details-of-a-specific-ftp-account)

```
$details = $client->getFtpAccountDetails('ftpuser');
var_dump($details);
```

Set Server Config
-----------------

[](#set-server-config)

### Sets server configuration parameters.

[](#sets-server-configuration-parameters)

```
$config = [
    'param1' => 'value1',
    'param2' => 'value2'
];
$response = $client->setServerConfig($config);
var_dump($response);
```

Get Server Config
-----------------

[](#get-server-config)

### Gets server configuration parameters.

[](#gets-server-configuration-parameters)

```
$config = $client->getServerConfig();
var_dump($config);
```

License
=======

[](#license)

This project is licensed under the MIT License - see the LICENSE file for details.
----------------------------------------------------------------------------------

[](#this-project-is-licensed-under-the-mit-license---see-the-license-file-for-details)

MIT License
===========

[](#mit-license)

### Copyright (c) 2025 Alfikri

[](#copyright-c-2025-alfikri)

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

###  Health Score

29

—

LowBetter than 57% of packages

Maintenance54

Moderate activity, may be stable

Popularity8

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 81.8% 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

Unknown

Total

1

Last Release

310d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/155325740?v=4)[Vortech Studio](/maintainers/vortechstudio)[@vortechstudio](https://github.com/vortechstudio)

---

Top Contributors

[![belintex](https://avatars.githubusercontent.com/u/30250190?v=4)](https://github.com/belintex "belintex (9 commits)")[![vortechstudio](https://avatars.githubusercontent.com/u/155325740?v=4)](https://github.com/vortechstudio "vortechstudio (2 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/vortechstudio-aapanel-api/health.svg)

```
[![Health](https://phpackages.com/badges/vortechstudio-aapanel-api/health.svg)](https://phpackages.com/packages/vortechstudio-aapanel-api)
```

###  Alternatives

[exsyst/swagger

A php library to manipulate Swagger specifications

35916.4M7](/packages/exsyst-swagger)[hubspot/api-client

Hubspot API client

24016.2M20](/packages/hubspot-api-client)[pocketmine/bedrock-protocol

An implementation of the Minecraft: Bedrock Edition protocol in PHP

172445.0k15](/packages/pocketmine-bedrock-protocol)[botman/driver-telegram

Telegram driver for BotMan

93459.5k6](/packages/botman-driver-telegram)

PHPackages © 2026

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