All URIs are relative to http://localhost:8081/api/v1
Method | HTTP request | Description |
---|---|---|
list_server | GET /servers/{server_id} | List a server |
list_servers | GET /servers | List all servers |
Server list_server(server_id)
List a server
from __future__ import print_function
import time
import pdns_api_client
from pdns_api_client.rest import ApiException
from pprint import pprint
# Configure API key authorization: APIKeyHeader
pdns_api_client.configuration.api_key['X-API-Key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# pdns_api_client.configuration.api_key_prefix['X-API-Key'] = 'Bearer'
# create an instance of the API class
api_instance = pdns_api_client.ServersApi()
server_id = 'server_id_example' # str | The id of the server to retrieve
try:
# List a server
api_response = api_instance.list_server(server_id)
pprint(api_response)
except ApiException as e:
print("Exception when calling ServersApi->list_server: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
server_id | str | The id of the server to retrieve |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
list[Server] list_servers()
List all servers
from __future__ import print_function
import time
import pdns_api_client
from pdns_api_client.rest import ApiException
from pprint import pprint
# Configure API key authorization: APIKeyHeader
pdns_api_client.configuration.api_key['X-API-Key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# pdns_api_client.configuration.api_key_prefix['X-API-Key'] = 'Bearer'
# create an instance of the API class
api_instance = pdns_api_client.ServersApi()
try:
# List all servers
api_response = api_instance.list_servers()
pprint(api_response)
except ApiException as e:
print("Exception when calling ServersApi->list_servers: %s\n" % e)
This endpoint does not need any parameter.
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]