All URIs are relative to https://api.selectel.ru/domains/v1
Method | HTTP request | Description |
---|---|---|
add_ptr_record | POST /ptr | Create new PTR record |
delete_ptr_record | DELETE /ptr/{ptr_id} | Deletes a PTR record |
get_ptr_record_by_id | GET /ptr/{ptr_id} | Find information about PTR record by ID |
get_ptr_records | GET /ptr | Getting PTR records |
update_ptr_record | PUT /ptr/{ptr_id} | Updates a PTR record |
PTRRecord add_ptr_record(body)
Create new PTR record
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.PtrApi()
body = selectel_dns_api.NewOrUpdatedPTRRecord() # NewOrUpdatedPTRRecord | PTR record info for creation
try:
# Create new PTR record
api_response = api_instance.add_ptr_record(body)
pprint(api_response)
except ApiException as e:
print("Exception when calling PtrApi->add_ptr_record: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
body | NewOrUpdatedPTRRecord | PTR record info for creation |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
delete_ptr_record(ptr_id)
Deletes a PTR record
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.PtrApi()
ptr_id = 789 # int | ID of PTR record
try:
# Deletes a PTR record
api_instance.delete_ptr_record(ptr_id)
except ApiException as e:
print("Exception when calling PtrApi->delete_ptr_record: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
ptr_id | int | ID of PTR record |
void (empty response body)
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
PTRRecord get_ptr_record_by_id(ptr_id)
Find information about PTR record by ID
Returns a single PTR record
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.PtrApi()
ptr_id = 789 # int | ID of PTR record
try:
# Find information about PTR record by ID
api_response = api_instance.get_ptr_record_by_id(ptr_id)
pprint(api_response)
except ApiException as e:
print("Exception when calling PtrApi->get_ptr_record_by_id: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
ptr_id | int | ID of PTR record |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
list[PTRRecord] get_ptr_records()
Getting PTR records
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.PtrApi()
try:
# Getting PTR records
api_response = api_instance.get_ptr_records()
pprint(api_response)
except ApiException as e:
print("Exception when calling PtrApi->get_ptr_records: %s\n" % e)
This endpoint does not need any parameter.
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
PTRRecord update_ptr_record(ptr_id, body)
Updates a PTR record
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.PtrApi()
ptr_id = 789 # int | ID of PTR record
body = selectel_dns_api.NewOrUpdatedPTRRecord() # NewOrUpdatedPTRRecord | PTR record info for update
try:
# Updates a PTR record
api_response = api_instance.update_ptr_record(ptr_id, body)
pprint(api_response)
except ApiException as e:
print("Exception when calling PtrApi->update_ptr_record: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
ptr_id | int | ID of PTR record | |
body | NewOrUpdatedPTRRecord | PTR record info for update |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]