selectel-dns-api

Selectel DNS API


Keywords
Swagger, Selectel, DNS, API
License
Apache-2.0
Install
pip install selectel-dns-api==1.0.2

Documentation

selectel-dns-api

Simple Selectel DNS API.

This Python package is automatically generated by the Swagger Codegen project:

  • API version: 1.0.1
  • Package version: 1.0.1
  • Build package: io.swagger.codegen.languages.PythonClientCodegen

Using in selectel_dns ansible module.

Build

java -jar swagger-codegen-cli.jar generate -i swagger.json -l python -o . -c swagger-codegen.json
rm -rf selectel_dns_api.egg-info build build dist && python setup.py sdist bdist_wheel && twine upload dist/*

Requirements.

Python 2.7 and 3.4+

Installation & Usage

pip install

If the python package is hosted on Github, you can install directly from Github

pip install selectel-dns-api

(you may need to run pip with root permission: sudo pip install selectel-dns-api)

Then import the package:

import selectel_dns_api 

Setuptools

Install via Setuptools.

python setup.py install --user

(or sudo python setup.py install to install the package for all users)

Then import the package:

import selectel_dns_api

Getting Started

Please follow the installation procedure and then run the following:

from __future__ import print_function
import time
import selectel_dns_api
from selectel_dns_api.rest import ApiException
from pprint import pprint

# Configure API key authorization: X-Token
selectel_dns_api.configuration.api_key['X-Token'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# selectel_dns_api.configuration.api_key_prefix['X-Token'] = 'Bearer'
# create an instance of the API class
api_instance = selectel_dns_api.DomainsApi()
body = selectel_dns_api.NewDomain() # NewDomain | Domain info for creation

try:
    # Create new domain
    api_response = api_instance.add_domain(body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DomainsApi->add_domain: %s\n" % e)

Documentation for API Endpoints

All URIs are relative to https://api.selectel.ru/domains/v1

Class Method HTTP request Description
DomainsApi add_domain POST / Create new domain
DomainsApi delete_domain DELETE /{domain_id} Deletes a domain
DomainsApi get_domain_by_id GET /{domain_id} Find domain by ID
DomainsApi get_domain_by_name GET /{domain_name} Find domain by name
DomainsApi get_domain_zone_file GET /{domain_id}/export Find domain by name
DomainsApi get_domains GET / Getting domains info
DomainsApi update_domain PATCH /{domain_id} Updates a domain
PtrApi add_ptr_record POST /ptr Create new PTR record
PtrApi delete_ptr_record DELETE /ptr/{ptr_id} Deletes a PTR record
PtrApi get_ptr_record_by_id GET /ptr/{ptr_id} Find information about PTR record by ID
PtrApi get_ptr_records GET /ptr Getting PTR records
PtrApi update_ptr_record PUT /ptr/{ptr_id} Updates a PTR record
RecordsApi add_resource_record POST /{domain_id}/records Create resource records for domain
RecordsApi batch_update_resources_records PATCH /{domain_name}/records/batch_update Mass update of domain's resources records
RecordsApi delete_resource_record DELETE /{domain_id}/records/{record_id} Deletes a resource record
RecordsApi get_resource_records_by_domain_id GET /{domain_id}/records Getting records info
RecordsApi get_resource_records_by_domain_name GET /{domain_name}/records Find resource records info for domain by name
RecordsApi update_resource_record PUT /{domain_id}/records/{record_id} Updates a resource record
TagsApi add_new_tag POST /tags Create new tag
TagsApi delete_tag DELETE /tags/{tag_id} Deletes a tag
TagsApi get_tag_by_id GET /tags/{tag_id} Find information about tag by ID
TagsApi get_tags GET /tags Getting tags
TagsApi update_tag PUT /tags/{tag_id} Updates a tag

Documentation For Models

Documentation For Authorization

X-Token

  • Type: API key
  • API key parameter name: X-Token
  • Location: HTTP header

Author

info@mdsina.ru