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.

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
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
backorder_domain()[source]

Create a backorder order. We will register domain after deletion from registry

check_domain(domain)[source]

Check if domain is available or not

Parameters:domain (str) – Domain for check availability
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)
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
contacts_list()[source]

Get all contacts from your account

create_contact(**kwargs)[source]

Create contact in Subreg DB

create_domain()[source]

Order: Create_Domain Create a new domain. For DNSSEC extension please see full specification here

create_host()[source]

Create new delegated host object. It is possible to specify multiple IPv4 and IPv6 addresses of the host.

create_object()[source]

Creates new nsset or keyset. Only for registries with such capability (for example CZ-NIC or Eurid)

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
delete_dns_record(domain, record_id)[source]

Remove DNS record from zone.

Parameters:
  • domain (str) – Registered domain
  • record_id (int) – ID of existing record
delete_dns_zone(domain)[source]

Remove ALL DNS records for specified domain.

Parameters:domain (str) – Registered domain
delete_domain()[source]

Delete a existing domain from your account

delete_host()[source]

Delete delegated host object. It is only possible to delete host when it is no longer used.

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
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.
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)
get_credit()[source]

Get status of your credit

get_dns_zone(domain)[source]

List of DNS records for specified domain.

Parameters:domain (str) – Registered domain
get_pricelist(pricelist)[source]

Return all price information in specified pricelist.

Parameters:pricelist (str) – Identificator of the pricelist you want to download.
info_contact(contact_id)[source]

Get informations about a single contact from your account

Parameters:contact_id (int) – ID of your querying contact
info_domain(domain)[source]

Get informations about a single domain from your account

Parameters:domain (str) – Domain name for requested informations
info_domain_cz(domain)[source]

Get informations about a single .CZ domain

Parameters:domain (str) – Domain name for requested informations
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)
info_order(order_id)[source]

Info about existing order

Parameters:order_id (int) – Order ID
list_documents()[source]

List documents uploaded or generated on your account.

login(username=None, password=None)[source]

User login to API

Parameters:
  • username (str) – Username for login
  • password (str) – Password
make_order(**kwargs)[source]

Create a new order (CreateDomain, ModifyDomain, RenewDomain, ... )

modify_dns_record(domain, record)[source]

Midify DNS record at zone.

Parameters:
  • domain (str) – Registered domain
  • record (dict) –

    dict with ID of existing record

    key id:ID of existing record
    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
modify_domain()[source]

Modify existing domain to new values. For DNSSEC extension please see full specification here.

modify_ns_domain()[source]

Modify existing domain to new values. For DNSSEC extension please see full specification here.

List domains registered for certain OIB, and get the number of domains possible to register for this OIB.

Parameters:oib (str) – Croatian OIB number
poll_ack(poll_id)[source]

Ack current poll message

Parameters:poll_id (int) – POLL ID
poll_get()[source]

Get current poll message

preregister_domain()[source]

This order type is for new TLDs or liberation rules of existing TLDs domain pre-registration

pricelist()[source]

Get pricelist from account

prices(tld)[source]

Get Prices for TLD from account

raw_response = None

Last raw response from API

renew_domain()[source]

Renew a existing domain from your account

response = None

Last parsed response from API

restore_domain()[source]

Restore a deleted domain from your account

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
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
set_google_mx_records(domain)[source]

Set Google MX rerods. Specified records will replace ALL present MX records.

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
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.

transfer_approve_domain()[source]

Transfer Approve domain between two registrars

transfer_cancel_domain()[source]

Transfer Cancel domain between two registrars

transfer_deny_domain()[source]

Transfer Deny domain between two registrars

transfer_domain()[source]

Transfer domain between two registrars or two account

transfer_object()[source]

Transfer object between two registrars (CZ-NIC)

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.

update_contact(**kwargs)[source]

Update contact

update_host()[source]

Change IP addresses of delegated host object.

update_object()[source]
upload_document(name, document, _type=None, filetype=None)[source]

Upload document to your account, for use as identification document, registration request etc.

Parameters:
users_list()[source]

Retrieve list of all your sub-users

Read the Docs v: develop
Versions
latest
develop
Downloads
PDF
HTML
Epub
On Read the Docs
Project Home
Builds

Free document hosting provided by Read the Docs.