PHP client SDK for the Mail-in-a-Box API.
- API version: 0.51.0
- Package version: 0.51.1
https://packagist.org/packages/mailinabox/mailinabox-api
NOTE: This package is auto-generated from the Mail-In-A-Box OpenAPI spec.
PHP 5.5 and later
To install the bindings via Composer, add the following to composer.json
:
{
"require": {
"mailinabox/mailinabox-api": "0.51.1"
}
}
Then run composer install
Download the files and include autoload.php
:
require_once('/path/to/mailinabox-api-php/vendor/autoload.php');
To run the unit tests:
composer install
./vendor/bin/phpunit
Please follow the installation procedure and then run the following:
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure HTTP basic authorization: basicAuth
$config = MailInABoxAPI\Client\Configuration::getDefaultConfiguration()
->setUsername('YOUR_USERNAME')
->setPassword('YOUR_PASSWORD');
$apiInstance = new MailInABoxAPI\Client\Api\DNSApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$qname = 'qname_example'; // string | DNS query name.
$body = 1.2.3.4; // string |
try {
$result = $apiInstance->addDnsCustomARecord($qname, $body);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling DNSApi->addDnsCustomARecord: ', $e->getMessage(), PHP_EOL;
}
?>
All URIs are relative to https://box.example.com/admin
Class | Method | HTTP request | Description |
---|---|---|---|
DNSApi | addDnsCustomARecord | POST /dns/custom/{qname} | Add DNS custom A record |
DNSApi | addDnsCustomRecord | POST /dns/custom/{qname}/{rtype} | Add DNS custom record |
DNSApi | addDnsSecondaryNameserver | POST /dns/secondary-nameserver | Add DNS secondary nameserver |
DNSApi | getDnsCustomARecordsForQName | GET /dns/custom/{qname} | Get DNS custom A records |
DNSApi | getDnsCustomRecords | GET /dns/custom | Get DNS custom records |
DNSApi | getDnsCustomRecordsForQNameAndType | GET /dns/custom/{qname}/{rtype} | Get DNS custom records |
DNSApi | getDnsDump | GET /dns/dump | Get DNS dump |
DNSApi | getDnsSecondaryNameserver | GET /dns/secondary-nameserver | Get DNS secondary nameserver |
DNSApi | getDnsZonefile | GET /dns/zonefile/{zone} | Get DNS zonefile |
DNSApi | getDnsZones | GET /dns/zones | Get DNS zones |
DNSApi | removeDnsCustomARecord | DELETE /dns/custom/{qname} | Remove DNS custom A record |
DNSApi | removeDnsCustomRecord | DELETE /dns/custom/{qname}/{rtype} | Remove DNS custom record |
DNSApi | updateDns | POST /dns/update | Update DNS |
DNSApi | updateDnsCustomARecord | PUT /dns/custom/{qname} | Update DNS custom A record |
DNSApi | updateDnsCustomRecord | PUT /dns/custom/{qname}/{rtype} | Update DNS custom record |
MFAApi | mfaStatus | POST /mfa/status | Retrieve MFA status for you or another user |
MFAApi | mfaTotpDisable | POST /mfa/disable | Disable multi-factor authentication for you or another user |
MFAApi | mfaTotpEnable | POST /mfa/totp/enable | Enable TOTP authentication |
MailApi | addMailUser | POST /mail/users/add | Add mail user |
MailApi | addMailUserPrivilege | POST /mail/users/privileges/add | Add mail user privilege |
MailApi | getMailAliases | GET /mail/aliases | Get mail aliases |
MailApi | getMailDomains | GET /mail/domains | Get mail domains |
MailApi | getMailUserPrivileges | GET /mail/users/privileges | Get mail user privileges |
MailApi | getMailUsers | GET /mail/users | Get mail users |
MailApi | removeMailAlias | POST /mail/aliases/remove | Remove mail alias |
MailApi | removeMailUser | POST /mail/users/remove | Remove mail user |
MailApi | removeMailUserPrivilege | POST /mail/users/privileges/remove | Remove mail user privilege |
MailApi | setMailUserPassword | POST /mail/users/password | Set mail user password |
MailApi | upsertMailAlias | POST /mail/aliases/add | Upsert mail alias |
SSLApi | generateSSLCSR | POST /ssl/csr/{domain} | Generate SSL CSR |
SSLApi | getSSLStatus | GET /ssl/status | Get SSL status |
SSLApi | installSSLCertificate | POST /ssl/install | Install SSL certificate |
SSLApi | provisionSSLCertificates | POST /ssl/provision | Provision SSL certificates |
SystemApi | getSystemBackupConfig | GET /system/backup/config | Get system backup config |
SystemApi | getSystemBackupStatus | GET /system/backup/status | Get system backup status |
SystemApi | getSystemPrivacyStatus | GET /system/privacy | Get system privacy status |
SystemApi | getSystemRebootStatus | GET /system/reboot | Get system reboot status |
SystemApi | getSystemStatus | POST /system/status | Get system status |
SystemApi | getSystemUpdates | GET /system/updates | Get system updates |
SystemApi | getSystemUpstreamVersion | POST /system/latest-upstream-version | Get system upstream version |
SystemApi | getSystemVersion | GET /system/version | Get system version |
SystemApi | rebootSystem | POST /system/reboot | Reboot system |
SystemApi | updateSystemBackupConfig | POST /system/backup/config | Update system backup config |
SystemApi | updateSystemPackages | POST /system/update-packages | Update system packages |
SystemApi | updateSystemPrivacy | POST /system/privacy | Update system privacy |
UserApi | getMe | GET /me | Get user information |
WebApi | getWebDomains | GET /web/domains | Get web domains |
WebApi | updateWeb | POST /web/update | Update web |
- DNSCustomRecord
- DNSCustomRecordsResponse
- DNSDumpDomainRecord
- DNSDumpDomainRecords
- DNSDumpDomains
- DNSDumpResponse
- DNSRecordType
- DNSSecondaryNameserverAddRequest
- DNSSecondaryNameserverResponse
- DNSUpdateRequest
- DNSZonesResponse
- MailAlias
- MailAliasByDomain
- MailAliasRemoveRequest
- MailAliasUpsertRequest
- MailAliasesResponseFormat
- MailUser
- MailUserAddPrivilegeRequest
- MailUserAddRequest
- MailUserByDomain
- MailUserPrivilege
- MailUserRemovePrivilegeRequest
- MailUserRemoveRequest
- MailUserSetPasswordRequest
- MailUserStatus
- MailUsersResponse
- MailUsersResponseFormat
- MeAuthStatus
- MeResponse
- MfaDisableRequest
- MfaEnableRequest
- MfaStatusResponse
- MfaStatusResponseEnabledMfa
- MfaStatusResponseNewMfa
- SSLCSRGenerateRequest
- SSLCertificateInstallRequest
- SSLCertificatesProvisionResponse
- SSLCertificatesProvisionResponseRequests
- SSLStatus
- SSLStatusResponse
- SSLStatusType
- StatusEntry
- StatusEntryExtra
- StatusEntryType
- SystemBackupConfigResponse
- SystemBackupConfigUpdateRequest
- SystemBackupStatus
- SystemBackupStatusResponse
- SystemPrivacyStatus
- SystemPrivacyUpdateRequest
- SystemStatusResponse
- WebDomain
- Type: HTTP basic authentication
MIT License
Copyright (c) 2020 Richard Willis