Subreg API
-
class subreg.api.Api(username=None, password=None)[source]
Python wrapper around the subreg.cz SOAP API
-
account_transfer_domain()[source]
Transfer domain between two Subreg.CZ accounts.
-
exception NotImplementedError
-
Api.add_dns_record(domain, record)[source]
Add DNS record to zone.
Parameters: |
- domain (str) – Registered domain
- record (dict) –
dict with params
key name: | Hostname (part of hostname, without registered domain) |
key type: | Type of DNS record |
key content: | Value of this record (IP address, hostname, text
value,..) |
key prio: | Priority of this record (MX records only) |
key ttl: | TTL value |
|
-
Api.add_dns_zone(domain, template=None)[source]
Add domain to DNS using previously created template.
Parameters: |
- domain (str) – Registered domain
- template (str) – DNS template ID or template name
|
-
Api.backorder_domain()[source]
Create a backorder order. We will register domain after deletion
from registry
-
exception NotImplementedError
-
Api.check_domain(domain)[source]
Check if domain is available or not
Parameters: | domain (str) – Domain for check availability |
-
Api.check_object(_id, _object)[source]
Check if object is available or not (only CZ,EE)
Parameters: |
- _id (int) – ID for check availability
- _object (str) – contact, nsset, keyset (only CZ, EE)
|
-
exception NotImplementedError
-
Api.client_payment(username, amount, currency)[source]
Add credit to your sub-user. This command WILL generate invoice,
if you want just correct current amount of credit for any reason,
please use command Credit_Correction.
Parameters: |
- username (str) – Login username of the use you want to add credit
- amount (str) – Amount of money to add
- currency (str) – Currency of added credit
|
-
exception NotImplementedError
-
Api.contacts_list()[source]
Get all contacts from your account
-
Api.create_contact(**kwargs)[source]
Create contact in Subreg DB
-
exception NotImplementedError
-
Api.create_domain()[source]
Order: Create_Domain
Create a new domain.
For DNSSEC extension please see full
specification here
-
exception NotImplementedError
-
Api.create_host()[source]
Create new delegated host object.
It is possible to specify multiple IPv4 and IPv6 addresses of the host.
-
exception NotImplementedError
-
Api.create_object()[source]
Creates new nsset or keyset.
Only for registries with such capability (for example CZ-NIC or Eurid)
-
exception NotImplementedError
-
Api.credit_correction(username, amount, reason)[source]
Correct credit amount of your sub-users. The amount you specify in this
command will be added to current amount. Use negative values for
subtracting credit. Please note that currency will depend on
current user setting.
Parameters: |
- username (str) – Login username of the user you want to add credit
- amount (float) – Amount of money to add/subtract
- reason (str) – Human readable reason for this operation
|
-
exception NotImplementedError
-
Api.delete_dns_record(domain, record_id)[source]
Remove DNS record from zone.
Parameters: |
- domain (str) – Registered domain
- record_id (int) – ID of existing record
|
-
Api.delete_dns_zone(domain)[source]
Remove ALL DNS records for specified domain.
Parameters: | domain (str) – Registered domain |
-
Api.delete_domain()[source]
Delete a existing domain from your account
-
exception NotImplementedError
-
Api.delete_host()[source]
Delete delegated host object.
It is only possible to delete host when it is no longer used.
-
exception NotImplementedError
-
Api.domains_list()[source]
Get all domains from your account
- :return dict
key domains: | dict of domains
:key name: Domain name
:key expire: Domain expiration date |
key count: | Domains count |
-
Api.download_document(document_id)[source]
Get document information and base64 encoded document that you have
uploaded or generated on your account.
Parameters: | document_id (int) – Document ID, you can get it in response of
Upload_Document or by List_Documents. |
-
exception NotImplementedError
-
Api.get_accountings(from_date, to_date)[source]
Get financial statements from account
Parameters: |
- from_date – Date (YYYY-mm-dd)
- to_date – Date (YYYY-mm-dd)
|
-
exception NotImplementedError
-
Api.get_credit()[source]
Get status of your credit
-
Api.get_dns_zone(domain)[source]
List of DNS records for specified domain.
Parameters: | domain (str) – Registered domain |
-
Api.get_pricelist(pricelist)[source]
Return all price information in specified pricelist.
Parameters: | pricelist (str) – Identificator of the pricelist you want to download. |
-
exception NotImplementedError
-
Api.info_contact(contact_id)[source]
Get informations about a single contact from your account
Parameters: | contact_id (int) – ID of your querying contact |
-
exception NotImplementedError
-
Api.info_domain(domain)[source]
Get informations about a single domain from your account
Parameters: | domain (str) – Domain name for requested informations |
-
Api.info_domain_cz(domain)[source]
Get informations about a single .CZ domain
Parameters: | domain (str) – Domain name for requested informations |
-
Api.info_object(_id, _object)[source]
Info about NIC object (only CZ,EE)
Parameters: |
- _id (int) – ID for info
- _object (str) – contact, nsset, keyset (only CZ, EE)
|
-
exception NotImplementedError
-
Api.info_order(order_id)[source]
Info about existing order
Parameters: | order_id (int) – Order ID |
-
exception NotImplementedError
-
Api.list_documents()[source]
List documents uploaded or generated on your account.
-
Api.login(username=None, password=None)[source]
User login to API
Parameters: |
- username (str) – Username for login
- password (str) – Password
|
-
Api.make_order(**kwargs)[source]
Create a new order (CreateDomain, ModifyDomain, RenewDomain, ... )
-
exception NotImplementedError
-
Api.modify_dns_record(domain, record)[source]
Midify DNS record at zone.
-
Api.modify_domain()[source]
Modify existing domain to new values.
For DNSSEC extension please see full
specification here.
-
exception NotImplementedError
-
Api.modify_ns_domain()[source]
Modify existing domain to new values.
For DNSSEC extension please see full
specification here.
-
exception NotImplementedError
-
Api.oib_search(oib)[source]
List domains registered for certain OIB, and get the number of domains
possible to register for this OIB.
Parameters: | oib (str) – Croatian OIB number |
-
exception NotImplementedError
-
Api.poll_ack(poll_id)[source]
Ack current poll message
Parameters: | poll_id (int) – POLL ID |
-
exception NotImplementedError
-
Api.poll_get()[source]
Get current poll message
-
Api.preregister_domain()[source]
This order type is for new TLDs or liberation rules of existing TLDs
domain pre-registration
-
exception NotImplementedError
-
Api.pricelist()[source]
Get pricelist from account
-
Api.prices(tld)[source]
Get Prices for TLD from account
-
exception NotImplementedError
-
Api.raw_response = None
Last raw response from API
-
Api.renew_domain()[source]
Renew a existing domain from your account
-
exception NotImplementedError
-
Api.response = None
Last parsed response from API
-
Api.restore_domain()[source]
Restore a deleted domain from your account
-
exception NotImplementedError
-
Api.set_autorenew(domain, autorenew)[source]
Set autorenew policy for your domain.
By default, domain is deleted when it expire.
You can set autorenew flag to AUTORENEW, then it will use your credit
to renew automatically. RENEWONCE will cause renew only for next year.
Parameters: |
- domain (str) – Registered domain
- autorenew (str) – Autorenew setting, allowed values:
EXPIRE, AUTORENEW, RENEWONCE
|
-
Api.set_dns_zone(domain, records)[source]
Specify complete set of records for certain zone.
Specified records will replace ALL present records.
Parameters: |
- domain (str) – Registered domain
- records (list) – List of dicts of records
|
-
exception NotImplementedError
-
Api.set_google_mx_records(domain)[source]
Set Google MX rerods.
Specified records will replace ALL present MX records.
-
Api.set_prices(pricelist, tld, currency, prices=None)[source]
Change prices in specified pricelist.
Parameters: |
- pricelist (str) – Identificator of the pricelist you want to download.
- tld (str) – TLD for which you want to change prices.
- currency (str) – Currency code the prices use.
- prices (str) – List of operations with price
|
-
exception NotImplementedError
-
Api.sk_change_owner_domain()[source]
Initiate owner change for .SK domain. During processing of this order,
filled form will be generated onto your account.
You can then download it using our web interface or using
Download_Document.
-
exception NotImplementedError
-
Api.transfer_approve_domain()[source]
Transfer Approve domain between two registrars
-
exception NotImplementedError
-
Api.transfer_cancel_domain()[source]
Transfer Cancel domain between two registrars
-
exception NotImplementedError
-
Api.transfer_deny_domain()[source]
Transfer Deny domain between two registrars
-
exception NotImplementedError
-
Api.transfer_domain()[source]
Transfer domain between two registrars or two account
-
exception NotImplementedError
-
Api.transfer_object()[source]
Transfer object between two registrars (CZ-NIC)
-
exception NotImplementedError
-
Api.transfer_ru_request()[source]
Transfer (change partner) of all domains on specified NIC-D account to
Subreg.CZ.
If you want to transfer just one .ru domain, you need to create new
NIC-D account for that domain.
-
exception NotImplementedError
-
Api.update_contact(**kwargs)[source]
Update contact
-
exception NotImplementedError
-
Api.update_host()[source]
Change IP addresses of delegated host object.
-
exception NotImplementedError
-
Api.update_object()[source]
-
-
exception NotImplementedError
-
Api.upload_document(name, document, _type=None, filetype=None)[source]
Upload document to your account, for use as identification document,
registration request etc.
-
exception NotImplementedError
-
Api.users_list()[source]
Retrieve list of all your sub-users