insidieux / power-dns-client
Installs: 10 876
Dependents: 0
Suggesters: 0
Security: 0
Stars: 5
Watchers: 2
Forks: 0
Open Issues: 0
Requires
- php: >=5.6
- ext-curl: *
- ext-json: *
- ext-mbstring: *
- guzzlehttp/guzzle: ^6.2
Requires (Dev)
- friendsofphp/php-cs-fixer: ~2.12
- phpunit/phpunit: ^4.8
- squizlabs/php_codesniffer: ~2.6
This package is auto-updated.
Last update: 2023-02-27 22:27:28 UTC
README
This project is very outdated and behind the current actual version of php, as well as the current version of the Power DNS API. We strongly DO NOT RECOMMEND you to use this library and we advise you to switch to one of the published packages from github/packagist. |
---|
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
This PHP package is automatically generated by the OpenAPI Generator project:
- API version: 0.0.13
- Build package: org.openapitools.codegen.languages.PhpClientCodegen
Requirements
PHP 5.5 and later
Installation & Usage
Composer
To install the bindings via Composer, add the following to composer.json
:
{
"repositories": [
{
"type": "git",
"url": "https://github.com/insidieux/power-dns-client.git"
}
],
"require": {
"insidieux/power-dns-client": "*@dev"
}
}
Then run composer install
Manual Installation
Download the files and include autoload.php
:
require_once('/path/to/power-dns-client/vendor/autoload.php');
Tests
To run the unit tests:
composer install
./vendor/bin/phpunit
Getting Started
Please follow the installation procedure and then run the following:
<?php require_once(__DIR__ . '/vendor/autoload.php'); // Configure API key authorization: APIKeyHeader $config = insidieux\PowerDnsClient\Configuration::getDefaultConfiguration()->setApiKey('X-API-Key', 'YOUR_API_KEY'); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed // $config = insidieux\PowerDnsClient\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-Key', 'Bearer'); $apiInstance = new insidieux\PowerDnsClient\Api\ConfigApi( // 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 ); $serverId = 'serverId_example'; // string | The id of the server to retrieve try { $result = $apiInstance->getConfig($serverId); print_r($result); } catch (Exception $e) { echo 'Exception when calling ConfigApi->getConfig: ', $e->getMessage(), PHP_EOL; } ?>
Documentation for API Endpoints
All URIs are relative to http://localhost:8081/api/v1
Class | Method | HTTP request | Description |
---|---|---|---|
ConfigApi | getConfig | GET /servers/{server_id}/config | Returns all ConfigSettings for a single server |
ConfigApi | getConfigSetting | GET /servers/{server_id}/config/{config_setting_name} | Returns a specific ConfigSetting for a single server |
SearchApi | searchData | GET /servers/{server_id}/search-data | Search the data inside PowerDNS |
ServersApi | cacheFlushByName | PUT /servers/{server_id}/cache/flush | Flush a cache-entry by name |
ServersApi | listServer | GET /servers/{server_id} | List a server |
ServersApi | listServers | GET /servers | List all servers |
StatsApi | getStats | GET /servers/{server_id}/statistics | Query statistics. |
ZonecryptokeyApi | createCryptokey | POST /servers/{server_id}/zones/{zone_id}/cryptokeys | Creates a Cryptokey |
ZonecryptokeyApi | deleteCryptokey | DELETE /servers/{server_id}/zones/{zone_id}/cryptokeys/{cryptokey_id} | This method deletes a key specified by cryptokey_id. |
ZonecryptokeyApi | getCryptokey | GET /servers/{server_id}/zones/{zone_id}/cryptokeys/{cryptokey_id} | Returns all data about the CryptoKey, including the privatekey. |
ZonecryptokeyApi | listCryptokeys | GET /servers/{server_id}/zones/{zone_id}/cryptokeys | Get all CryptoKeys for a zone, except the privatekey |
ZonecryptokeyApi | modifyCryptokey | PUT /servers/{server_id}/zones/{zone_id}/cryptokeys/{cryptokey_id} | This method (de)activates a key from zone_name specified by cryptokey_id |
ZonemetadataApi | createMetadata | POST /servers/{server_id}/zones/{zone_id}/metadata | Creates a set of metadata entries |
ZonemetadataApi | deleteMetadata | DELETE /servers/{server_id}/zones/{zone_id}/metadata/{metadata_kind} | Delete all items of a single kind of domain metadata. |
ZonemetadataApi | getMetadata | GET /servers/{server_id}/zones/{zone_id}/metadata/{metadata_kind} | Get the content of a single kind of domain metadata as a list of MetaData objects. |
ZonemetadataApi | listMetadata | GET /servers/{server_id}/zones/{zone_id}/metadata | Get all the MetaData associated with the zone. |
ZonemetadataApi | modifyMetadata | PUT /servers/{server_id}/zones/{zone_id}/metadata/{metadata_kind} | Modify the content of a single kind of domain metadata. |
ZonesApi | axfrExportZone | GET /servers/{server_id}/zones/{zone_id}/export | Returns the zone in AXFR format. |
ZonesApi | axfrRetrieveZone | PUT /servers/{server_id}/zones/{zone_id}/axfr-retrieve | Retrieve slave zone from its master. |
ZonesApi | checkZone | GET /servers/{server_id}/zones/{zone_id}/check | Verify zone contents/configuration. |
ZonesApi | createZone | POST /servers/{server_id}/zones | Creates a new domain, returns the Zone on creation. |
ZonesApi | deleteZone | DELETE /servers/{server_id}/zones/{zone_id} | Deletes this zone, all attached metadata and rrsets. |
ZonesApi | listZone | GET /servers/{server_id}/zones/{zone_id} | zone managed by a server |
ZonesApi | listZones | GET /servers/{server_id}/zones | List all Zones in a server |
ZonesApi | notifyZone | PUT /servers/{server_id}/zones/{zone_id}/notify | Send a DNS NOTIFY to all slaves. |
ZonesApi | patchZone | PATCH /servers/{server_id}/zones/{zone_id} | Creates/modifies/deletes RRsets present in the payload and their comments. Returns 204 No Content on success. |
ZonesApi | putZone | PUT /servers/{server_id}/zones/{zone_id} | Modifies basic zone data (metadata). |
ZonesApi | rectifyZone | PUT /servers/{server_id}/zones/{zone_id}/rectify | Rectify the zone data. |
Documentation For Models
- BaseStatisticItem
- CacheFlushResult
- Comment
- ConfigSetting
- Cryptokey
- MapStatisticItem
- Metadata
- RRSet
- Record
- RingStatisticItem
- SearchResult
- SearchResultComment
- SearchResultRecord
- SearchResultZone
- SearchResults
- Server
- Servers
- StatisticItem
- Zone
- Zones
Documentation For Authorization
APIKeyHeader
- Type: API key
- API key parameter name: X-API-Key
- Location: HTTP header