Generated API

class pyatomiadns.client.AtomiaClient(url, email, password)[source]

The AtomiaClient plugs in on the json API from atomiadns.

AddAccount(email, password_soap)[source]

Adds an account for soap

Parameters:
  • emailstr email used as login
  • paswword_soapstr password for the user
AddDNSSECKey(algorithm, keysize, keytype, activated)[source]

Adds a DNSSEC key to the database. default algorithm: RSASHA256 for KSK use keysize 2048, for ZSK use 1024

Parameters:
  • algorithmstr defaults to RSASHA256
  • keysizeint size of key in bit (1024, 2048,...)
  • keytypestr KSK or ZSK
  • activatedstr yes or no
AddDnsRecords(zone, records)[source]

Adds a list of records to a zone.

A record dict is the following: {

“ttl”: “3600”, “label” : “@”, “class” : “IN”, “type” : “A”, “rdata” : “192.168.0.1”

}

Parameters:
  • zonestr the name of the zone
  • recordslist list of dicts containing the records’
AddNameserver(nameserver, nameservergroup)[source]

Add a nameserver as a subscriber of changes to the data set in this server.

Parameters:
  • nameserverstr the servername to add as a subscriber
  • nameservergroupstr the nameserver group that this nameserver should subscribe to changes for
AddNameserverGroup(groupname)[source]

Add a nameserver group.

Parameters:groupnamestr name of the group you wish to add
AddZone(zonename, zonettl, mname, rname, refresh, retry, expire, minimum, nameservers, nameservergroup)[source]

Add a zone to the Atomia DNS master database.

Parameters:
  • zonenamestr the name of the zone
  • zonettlint the ttl of the SOA-record and the NS-records
  • mnamestr the SOA mname field
  • rnamestr the SOA rname field
  • refreshint the SOA refresh field
  • retryint the SOA retry field
  • expireint the SOA expire field
  • minimumint the SOA minimum field
  • nameserversstr a string of the hostnames of the nameservers for the zone comma separated within brackets ([“dns1.example.org”,”dns2.example.org”])
  • nameservergroupstr the nameserver group that should host the zone
DeleteAccount(email)[source]

Removes a soap account

Parameters:emailstr email of the account
DeleteDnsRecords(zone, records)[source]

Removes the given records.

One should only provide the labels in a following format

‘[{“label”: “www”}, {“label”: “bleh”}]’

Parameters:
  • zonestr the name of the zone
  • recordslist of dict containing only the label
DeleteNameServerGroup(groupname)[source]

Delete a nameserver group.

Parameters:groupnamestr name of the group you wish to delete
DeleteNameserver(nameserver)[source]

Remove a nameserver as a subscriber of changes to the data set in this server.

Parameters:nameserverstr the servername to remove as a subscriber
DeleteZone(zone)[source]

Deletes a zone from the database.

Parameters:zonestr the name of the zone
EditAccount(email, password)[source]

Allows one to change the password of ones account

Parameters:
  • emailstr email of the account to change
  • passwordstr new password
EditDnsRecords(zone, records)[source]

Edits the records for a certain label

Parameters:
  • zonestr zone name
  • recordslist for format see AddDnsRecords
EditZone(zonename, zonettl, mname, rname, refresh, retry, expire, minimum, nameservers, nameservergroup)[source]

Edits a zone. This is only for completeness, and could be done by editing the SOA and NS-records directly as well.

Parameters:
  • zonenamestr the name of the zone
  • zonettlint the ttl of the SOA-record and the NS-records
  • mnamestr the SOA mname field
  • rnamestr the SOA rname field
  • refreshint the SOA refresh field
  • retryint the SOA retry field
  • expireint the SOA expire field
  • minimumint the SOA minimum field
  • nameserversstr a string of the hostnames of the nameservers for the zone comma separated within brackets ([“dns1.example.org”,”dns2.example.org”])
  • nameservergroupstr the nameserver group that should host the zone
FindZones(email, pattern, count, offset)[source]

Finds zones according to the pattern

Parameters:
  • emailstr email of the account
  • patternstr the pattern to search for with SQL LIKE semantics
  • countint the max number of zones to return
  • offsetint the offset of the first zone to return
GetAllZones()[source]

GetAllZones returns all the zone names that are defined. This is an ADMIN only method

GetDnsRecords(zone, label)[source]

GetRecord will fetch full record information for zone and label given

GetLabels(zone)[source]

GetLabels returns all the labels for a certain zone.

Parameters:zonestr zone (example.org, sejo-it.be,...)
GetNameserver(nameserver)[source]

Gets the group name that a nameserver is configured as a subscriber for.

Parameters:nameserverstr the servername to get information for
GetZone(zone)[source]

GetZone returns the complete zone info with all records

Parameters:zonestr zone (example.org, sejo-it.be,...)
GetZoneBinary(zone)[source]

Gets the binary data for the zone, this can be used to restore zones

Parameters:zonestr zone name
Noop()[source]

Noop command used to authenticate

ReloadAllZones()[source]

Mark all zones in the database as changed.

RestoreZoneBinary(zone, nameservergroup, data)[source]

Restores the zone

Parameters:
  • zonestr zone name
  • nameservergroupstr name of the nameserver group
  • datastr data to restore