All URIs are relative to https://localhost/api/v1
Method | HTTP request | Description |
---|---|---|
create_metadata | POST /servers/{server_id}/zones/{zone_id}/metadata | Creates a set of metadata entries |
delete_metadata | DELETE /servers/{server_id}/zones/{zone_id}/metadata/{metadata_kind} | Delete all items of a single kind of domain metadata. |
get_metadata | GET /servers/{server_id}/zones/{zone_id}/metadata/{metadata_kind} | Get the content of a single kind of domain metadata as a Metadata object. |
list_metadata | GET /servers/{server_id}/zones/{zone_id}/metadata | Get all the Metadata associated with the zone. |
modify_metadata | PUT /servers/{server_id}/zones/{zone_id}/metadata/{metadata_kind} | Replace the content of a single kind of domain metadata. |
create_metadata(server_id, zone_id, metadata)
Creates a set of metadata entries
Creates a set of metadata entries of given kind for the zone. Existing metadata entries for the zone with the same kind are not overwritten.
from __future__ import print_function
import time
import powerdns_client
from powerdns_client.rest import ApiException
from pprint import pprint
# Configure API key authorization: APIKeyHeader
configuration = powerdns_client.Configuration()
configuration.api_key['X-API-Key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['X-API-Key'] = 'Bearer'
# create an instance of the API class
api_instance = powerdns_client.ZonemetadataApi(powerdns_client.ApiClient(configuration))
server_id = 'server_id_example' # str | The id of the server to retrieve
zone_id = 'zone_id_example' # str |
metadata = powerdns_client.Metadata() # Metadata | Metadata object with list of values to create
try:
# Creates a set of metadata entries
api_instance.create_metadata(server_id, zone_id, metadata)
except ApiException as e:
print("Exception when calling ZonemetadataApi->create_metadata: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
server_id | str | The id of the server to retrieve | |
zone_id | str | ||
metadata | Metadata | Metadata object with list of values to create |
void (empty response body)
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
delete_metadata(server_id, zone_id, metadata_kind)
Delete all items of a single kind of domain metadata.
from __future__ import print_function
import time
import powerdns_client
from powerdns_client.rest import ApiException
from pprint import pprint
# Configure API key authorization: APIKeyHeader
configuration = powerdns_client.Configuration()
configuration.api_key['X-API-Key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['X-API-Key'] = 'Bearer'
# create an instance of the API class
api_instance = powerdns_client.ZonemetadataApi(powerdns_client.ApiClient(configuration))
server_id = 'server_id_example' # str | The id of the server to retrieve
zone_id = 'zone_id_example' # str | The id of the zone to retrieve
metadata_kind = 'metadata_kind_example' # str | The kind of metadata
try:
# Delete all items of a single kind of domain metadata.
api_instance.delete_metadata(server_id, zone_id, metadata_kind)
except ApiException as e:
print("Exception when calling ZonemetadataApi->delete_metadata: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
server_id | str | The id of the server to retrieve | |
zone_id | str | The id of the zone to retrieve | |
metadata_kind | str | The kind of metadata |
void (empty response body)
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Metadata get_metadata(server_id, zone_id, metadata_kind)
Get the content of a single kind of domain metadata as a Metadata object.
from __future__ import print_function
import time
import powerdns_client
from powerdns_client.rest import ApiException
from pprint import pprint
# Configure API key authorization: APIKeyHeader
configuration = powerdns_client.Configuration()
configuration.api_key['X-API-Key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['X-API-Key'] = 'Bearer'
# create an instance of the API class
api_instance = powerdns_client.ZonemetadataApi(powerdns_client.ApiClient(configuration))
server_id = 'server_id_example' # str | The id of the server to retrieve
zone_id = 'zone_id_example' # str | The id of the zone to retrieve
metadata_kind = 'metadata_kind_example' # str | The kind of metadata
try:
# Get the content of a single kind of domain metadata as a Metadata object.
api_response = api_instance.get_metadata(server_id, zone_id, metadata_kind)
pprint(api_response)
except ApiException as e:
print("Exception when calling ZonemetadataApi->get_metadata: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
server_id | str | The id of the server to retrieve | |
zone_id | str | The id of the zone to retrieve | |
metadata_kind | str | The kind of metadata |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
list[Metadata] list_metadata(server_id, zone_id)
Get all the Metadata associated with the zone.
from __future__ import print_function
import time
import powerdns_client
from powerdns_client.rest import ApiException
from pprint import pprint
# Configure API key authorization: APIKeyHeader
configuration = powerdns_client.Configuration()
configuration.api_key['X-API-Key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['X-API-Key'] = 'Bearer'
# create an instance of the API class
api_instance = powerdns_client.ZonemetadataApi(powerdns_client.ApiClient(configuration))
server_id = 'server_id_example' # str | The id of the server to retrieve
zone_id = 'zone_id_example' # str | The id of the zone to retrieve
try:
# Get all the Metadata associated with the zone.
api_response = api_instance.list_metadata(server_id, zone_id)
pprint(api_response)
except ApiException as e:
print("Exception when calling ZonemetadataApi->list_metadata: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
server_id | str | The id of the server to retrieve | |
zone_id | str | The id of the zone to retrieve |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Metadata modify_metadata(server_id, zone_id, metadata_kind, metadata)
Replace the content of a single kind of domain metadata.
Creates a set of metadata entries of given kind for the zone. Existing metadata entries for the zone with the same kind are removed.
from __future__ import print_function
import time
import powerdns_client
from powerdns_client.rest import ApiException
from pprint import pprint
# Configure API key authorization: APIKeyHeader
configuration = powerdns_client.Configuration()
configuration.api_key['X-API-Key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['X-API-Key'] = 'Bearer'
# create an instance of the API class
api_instance = powerdns_client.ZonemetadataApi(powerdns_client.ApiClient(configuration))
server_id = 'server_id_example' # str | The id of the server to retrieve
zone_id = 'zone_id_example' # str |
metadata_kind = 'metadata_kind_example' # str | The kind of metadata
metadata = powerdns_client.Metadata() # Metadata | metadata to add/create
try:
# Replace the content of a single kind of domain metadata.
api_response = api_instance.modify_metadata(server_id, zone_id, metadata_kind, metadata)
pprint(api_response)
except ApiException as e:
print("Exception when calling ZonemetadataApi->modify_metadata: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
server_id | str | The id of the server to retrieve | |
zone_id | str | ||
metadata_kind | str | The kind of metadata | |
metadata | Metadata | metadata to add/create |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]