Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

get
URL/api/v1/api.php?target=dnsServer&action=get
DescriptionIf provided with an id, fetches that DNS Server from the database. If not, fetches a list of all stored DNS Servers
Returns

Examples:

SUCCESSFUL:

{"success":1,"message":"Fetch Sucessful.","data":[{"id":"10","server":"mrbomasm-dns-4.onnet.net", "username":"user", "password":"vwvddp","port":"2600","customer_name":null,"transfer_type": "SCP","remote_directory":"zones", "named_conf_path":"\/etc\/zones","active":"1","post_command":null,"pre_command":null,"dyn_DNSSEC_contact":null, "powerdns_backend":"Bind","db_username":null,"db_password":"(","db_port":null,"db_name":null, "server_type":"slave","SOA":null,"master_id":null,"options": "{\"customer_name\":\"\",\"server_type\":\"slave\" ,\"SOA\":\"\",\"remote_directory\":\"zones\", \"named_conf_path\":\"\\\/etc\\\/zones\", \"dyn_DNSSEC_contact\" :\"\",\"post_command\":\"\" ,\"pre_command\":\"\",\"powerdns_backend\":\"Bind\", \"db_username\":\"\",\"db_password\":\"(\",\"db_port\":\"\",\"db_name\":\"\",\"enable_views\":\"1\"}", "testID":"963","zoneCount":"8","views":"[{\"id\":\"1\", \"server_id\":\"10\",\"name\":\"_6connectDefault\",\"extras\":\"[]\",\"description\":\"\",\"timestamp\":\"1371789181\"},{\"id\":\"3\",\"server_id\":\"10\",\"name\":\"internal\",\"extras\":\"[]\",\"description\":null,\"timestamp\":\"1374686650\"}]"}]}

ERROR:{"success":0, "message":"error message"}


Data Detail:

Is this the currently active DNS server?
NameTypeDescription
idINTServer ID
serverSTRINGServer Name
usernameSTRINGLogin Name
passwordCRYPTLogin Password
customerNameCRYPTCustomer Name
transferTypeSTRINGType of Transfer
remoteDirectorySTRINGThe remote path this server is configured for
namedConfPathSTRINGInternal configuration path
preCommandSTRINGThe command to be run on the DNS server before the zone push.
postCommandSTRINGThe command to be run on the DNS server after the zone push.
portINTPort the Server listens on
zoneCountINTThe number of zones attached to this server.
   
optionsJSON

The options entry is a JSON-encoded string containing a variety of server-specific configuration options.

This string will vary widely by server type and configuration. The following are a selection of common settings.

server_typeSTRINGThe type of server this is. Valid settings include SCP, PowerDNS, Secure64, Secure64Signer
SOASTRINGThe SOA entry to be used for zones on this server
remote_directorySTRINGThe directory where SCP will place the zone files.
named_conf_pathSTRINGThe zone file location used when writing the server configuration file
pre_commandSTRINGThe command executed on the server before the zones are transfered
post_commandSTRINGThe command executed on the server after the transfer is complete
enable_viewsINTWhether or not Views are enabled
   
viewsJSON

The views entry is a JSON-encoded string containing all the information about the Views attached to this server,

if any exist.

idINTThe View ID
server_idINTThe ID of the server the View is attached to
nameSTRINGThe name of the View
descriptionSTRINGA description of the View
timestampINTThe UNIX timestamp of when the view was created.
extrasJSONA JSON-encoded array of the extra attributes printed out in the view definition in the config file.activeBOOL
Optional Parameters
NameTypeExampleDescription
idINTEGER15The server id to fetch.

...