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

ActiveLibrary[API Development](/categories/api)

alfikripayakumbuh/aapanel-api
=============================

API Client AAPanel with PHP Version 7.0.21 or higher

1.0.2(9mo ago)0231MITPHPPHP ^8.0

Since Jul 16Pushed 9mo agoCompare

[ Source](https://github.com/belintex/aapanel-api)[ Packagist](https://packagist.org/packages/alfikripayakumbuh/aapanel-api)[ RSS](/packages/alfikripayakumbuh-aapanel-api/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (1)Versions (5)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

31

—

LowBetter than 68% of packages

Maintenance57

Moderate activity, may be stable

Popularity9

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity44

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

Total

3

Last Release

286d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/95815ed2dba67829835efdc35979814456b7ecfbcde24bc3f8a83dc7e1242f7d?d=identicon)[belintex](/maintainers/belintex)

---

Top Contributors

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

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[stripe/stripe-php

Stripe PHP Library

4.0k143.3M480](/packages/stripe-stripe-php)[twilio/sdk

A PHP wrapper for Twilio's API

1.6k92.9M272](/packages/twilio-sdk)[knplabs/github-api

GitHub API v3 client

2.2k15.8M187](/packages/knplabs-github-api)[facebook/php-business-sdk

PHP SDK for Facebook Business

90121.9M34](/packages/facebook-php-business-sdk)[meilisearch/meilisearch-php

PHP wrapper for the Meilisearch API

73813.7M114](/packages/meilisearch-meilisearch-php)[google/gax

Google API Core for PHP

263103.1M454](/packages/google-gax)

PHPackages © 2026

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