Skip to content

Latest commit

 

History

History
756 lines (496 loc) · 23.1 KB

File metadata and controls

756 lines (496 loc) · 23.1 KB

hostinger_api.DomainsWHOISApi

All URIs are relative to https://developers.hostinger.com

Method HTTP request Description
cancel_pending_irtp_verification_v1 DELETE /api/domains/v1/irtp/{domain} Cancel pending IRTP verification
change_whois_profile_for_domain_v1 PUT /api/domains/v1/whois/change Change WHOIS profile for domain
create_whois_profile_v1 POST /api/domains/v1/whois Create WHOIS profile
delete_whois_profile_v1 DELETE /api/domains/v1/whois/{whoisId} Delete WHOIS profile
get_pending_irtp_verification_v1 GET /api/domains/v1/irtp/{domain} Get pending IRTP verification
get_whois_profile_list_v1 GET /api/domains/v1/whois Get WHOIS profile list
get_whois_profile_usage_v1 GET /api/domains/v1/whois/{whoisId}/usage Get WHOIS profile usage
get_whois_profile_v1 GET /api/domains/v1/whois/{whoisId} Get WHOIS profile
set_whois_profile_as_default_v1 PUT /api/domains/v1/whois/default/{whoisId} Set WHOIS profile as default
unset_default_whois_profile_v1 DELETE /api/domains/v1/whois/default/{whoisId} Unset default WHOIS profile

cancel_pending_irtp_verification_v1

CommonSuccessEmptyResource cancel_pending_irtp_verification_v1(domain)

Cancel pending IRTP verification

Cancel a pending IRTP verification.

Use this endpoint to back out of a WHOIS change that is stuck waiting on registrant confirmation, for example when the confirmation email cannot be received, without waiting out the 5-day expiry.

Example

  • Bearer Authentication (apiToken):
import hostinger_api
from hostinger_api.models.common_success_empty_resource import CommonSuccessEmptyResource
from hostinger_api.rest import ApiException
from pprint import pprint


# Configure Bearer authorization: apiToken
configuration = hostinger_api.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with hostinger_api.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = hostinger_api.DomainsWHOISApi(api_client)
    domain = 'mydomain.tld' # str | Domain name

    try:
        # Cancel pending IRTP verification
        api_response = api_instance.cancel_pending_irtp_verification_v1(domain)
        print("The response of DomainsWHOISApi->cancel_pending_irtp_verification_v1:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling DomainsWHOISApi->cancel_pending_irtp_verification_v1: %s\n" % e)

Parameters

Name Type Description Notes
domain str Domain name

Return type

CommonSuccessEmptyResource

Authorization

apiToken

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Success empty response -
401 Unauthenticated response -
500 Error response -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

change_whois_profile_for_domain_v1

CommonSuccessEmptyResource change_whois_profile_for_domain_v1(domains_v1_whois_change_update_request)

Change WHOIS profile for domain

Change WHOIS contact profile for a domain.

Repoints the given contact roles to a new WHOIS profile and submits the change to the registry. The profile currently assigned to those roles is resolved automatically; the request fails if the given roles are not all on the same profile today.

Changing transfer sensitive fields on the owner contact starts an IRTP verification.

The change is processed asynchronously.

Use this endpoint to move a registered domain onto different contact information.

Example

  • Bearer Authentication (apiToken):
import hostinger_api
from hostinger_api.models.common_success_empty_resource import CommonSuccessEmptyResource
from hostinger_api.models.domains_v1_whois_change_update_request import DomainsV1WHOISChangeUpdateRequest
from hostinger_api.rest import ApiException
from pprint import pprint


# Configure Bearer authorization: apiToken
configuration = hostinger_api.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with hostinger_api.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = hostinger_api.DomainsWHOISApi(api_client)
    domains_v1_whois_change_update_request = hostinger_api.DomainsV1WHOISChangeUpdateRequest() # DomainsV1WHOISChangeUpdateRequest | 

    try:
        # Change WHOIS profile for domain
        api_response = api_instance.change_whois_profile_for_domain_v1(domains_v1_whois_change_update_request)
        print("The response of DomainsWHOISApi->change_whois_profile_for_domain_v1:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling DomainsWHOISApi->change_whois_profile_for_domain_v1: %s\n" % e)

Parameters

Name Type Description Notes
domains_v1_whois_change_update_request DomainsV1WHOISChangeUpdateRequest

Return type

CommonSuccessEmptyResource

Authorization

apiToken

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Success empty response -
422 Validation error response -
401 Unauthenticated response -
500 Error response -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

create_whois_profile_v1

DomainsV1WHOISProfileResource create_whois_profile_v1(domains_v1_whois_store_request)

Create WHOIS profile

Create WHOIS contact profile.

Use this endpoint to add new contact information for domain registration.

Example

  • Bearer Authentication (apiToken):
import hostinger_api
from hostinger_api.models.domains_v1_whois_profile_resource import DomainsV1WHOISProfileResource
from hostinger_api.models.domains_v1_whois_store_request import DomainsV1WHOISStoreRequest
from hostinger_api.rest import ApiException
from pprint import pprint


# Configure Bearer authorization: apiToken
configuration = hostinger_api.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with hostinger_api.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = hostinger_api.DomainsWHOISApi(api_client)
    domains_v1_whois_store_request = hostinger_api.DomainsV1WHOISStoreRequest() # DomainsV1WHOISStoreRequest | 

    try:
        # Create WHOIS profile
        api_response = api_instance.create_whois_profile_v1(domains_v1_whois_store_request)
        print("The response of DomainsWHOISApi->create_whois_profile_v1:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling DomainsWHOISApi->create_whois_profile_v1: %s\n" % e)

Parameters

Name Type Description Notes
domains_v1_whois_store_request DomainsV1WHOISStoreRequest

Return type

DomainsV1WHOISProfileResource

Authorization

apiToken

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Success response -
422 Validation error response -
401 Unauthenticated response -
500 Error response -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

delete_whois_profile_v1

CommonSuccessEmptyResource delete_whois_profile_v1(whois_id)

Delete WHOIS profile

Delete WHOIS contact profile.

Use this endpoint to remove unused contact profiles from account.

Example

  • Bearer Authentication (apiToken):
import hostinger_api
from hostinger_api.models.common_success_empty_resource import CommonSuccessEmptyResource
from hostinger_api.rest import ApiException
from pprint import pprint


# Configure Bearer authorization: apiToken
configuration = hostinger_api.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with hostinger_api.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = hostinger_api.DomainsWHOISApi(api_client)
    whois_id = 564651 # int | WHOIS ID

    try:
        # Delete WHOIS profile
        api_response = api_instance.delete_whois_profile_v1(whois_id)
        print("The response of DomainsWHOISApi->delete_whois_profile_v1:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling DomainsWHOISApi->delete_whois_profile_v1: %s\n" % e)

Parameters

Name Type Description Notes
whois_id int WHOIS ID

Return type

CommonSuccessEmptyResource

Authorization

apiToken

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Success response -
401 Unauthenticated response -
500 Error response -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

get_pending_irtp_verification_v1

DomainsV1IRTPVerificationResource get_pending_irtp_verification_v1(domain)

Get pending IRTP verification

Retrieve a pending IRTP verification for a domain.

Both the old and new registrant must confirm it before the WHOIS change takes effect.

Use this endpoint to check the status of a WHOIS change awaiting registrant confirmation.

Example

  • Bearer Authentication (apiToken):
import hostinger_api
from hostinger_api.models.domains_v1_irtp_verification_resource import DomainsV1IRTPVerificationResource
from hostinger_api.rest import ApiException
from pprint import pprint


# Configure Bearer authorization: apiToken
configuration = hostinger_api.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with hostinger_api.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = hostinger_api.DomainsWHOISApi(api_client)
    domain = 'mydomain.tld' # str | Domain name

    try:
        # Get pending IRTP verification
        api_response = api_instance.get_pending_irtp_verification_v1(domain)
        print("The response of DomainsWHOISApi->get_pending_irtp_verification_v1:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling DomainsWHOISApi->get_pending_irtp_verification_v1: %s\n" % e)

Parameters

Name Type Description Notes
domain str Domain name

Return type

DomainsV1IRTPVerificationResource

Authorization

apiToken

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Success response -
401 Unauthenticated response -
500 Error response -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

get_whois_profile_list_v1

List[DomainsV1WHOISProfileResource] get_whois_profile_list_v1(tld=tld)

Get WHOIS profile list

Retrieve WHOIS contact profiles.

Use this endpoint to view available contact profiles for domain registration.

Example

  • Bearer Authentication (apiToken):
import hostinger_api
from hostinger_api.models.domains_v1_whois_profile_resource import DomainsV1WHOISProfileResource
from hostinger_api.rest import ApiException
from pprint import pprint


# Configure Bearer authorization: apiToken
configuration = hostinger_api.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with hostinger_api.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = hostinger_api.DomainsWHOISApi(api_client)
    tld = 'com' # str | Filter by TLD (without leading dot) (optional)

    try:
        # Get WHOIS profile list
        api_response = api_instance.get_whois_profile_list_v1(tld=tld)
        print("The response of DomainsWHOISApi->get_whois_profile_list_v1:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling DomainsWHOISApi->get_whois_profile_list_v1: %s\n" % e)

Parameters

Name Type Description Notes
tld str Filter by TLD (without leading dot) [optional]

Return type

List[DomainsV1WHOISProfileResource]

Authorization

apiToken

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Success response -
401 Unauthenticated response -
500 Error response -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

get_whois_profile_usage_v1

List[str] get_whois_profile_usage_v1(whois_id)

Get WHOIS profile usage

Retrieve domain list where provided WHOIS contact profile is used.

Use this endpoint to view which domains use specific contact profiles.

Example

  • Bearer Authentication (apiToken):
import hostinger_api
from hostinger_api.rest import ApiException
from pprint import pprint


# Configure Bearer authorization: apiToken
configuration = hostinger_api.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with hostinger_api.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = hostinger_api.DomainsWHOISApi(api_client)
    whois_id = 564651 # int | WHOIS ID

    try:
        # Get WHOIS profile usage
        api_response = api_instance.get_whois_profile_usage_v1(whois_id)
        print("The response of DomainsWHOISApi->get_whois_profile_usage_v1:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling DomainsWHOISApi->get_whois_profile_usage_v1: %s\n" % e)

Parameters

Name Type Description Notes
whois_id int WHOIS ID

Return type

List[str]

Authorization

apiToken

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Success response -
401 Unauthenticated response -
500 Error response -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

get_whois_profile_v1

DomainsV1WHOISProfileResource get_whois_profile_v1(whois_id)

Get WHOIS profile

Retrieve a WHOIS contact profile.

Use this endpoint to view domain registration contact information.

Example

  • Bearer Authentication (apiToken):
import hostinger_api
from hostinger_api.models.domains_v1_whois_profile_resource import DomainsV1WHOISProfileResource
from hostinger_api.rest import ApiException
from pprint import pprint


# Configure Bearer authorization: apiToken
configuration = hostinger_api.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with hostinger_api.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = hostinger_api.DomainsWHOISApi(api_client)
    whois_id = 564651 # int | WHOIS ID

    try:
        # Get WHOIS profile
        api_response = api_instance.get_whois_profile_v1(whois_id)
        print("The response of DomainsWHOISApi->get_whois_profile_v1:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling DomainsWHOISApi->get_whois_profile_v1: %s\n" % e)

Parameters

Name Type Description Notes
whois_id int WHOIS ID

Return type

DomainsV1WHOISProfileResource

Authorization

apiToken

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Success response -
401 Unauthenticated response -
500 Error response -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

set_whois_profile_as_default_v1

CommonSuccessEmptyResource set_whois_profile_as_default_v1(whois_id)

Set WHOIS profile as default

Set WHOIS contact profile as default.

The default profile is pre-selected for the TLD it belongs to when registering new domains.

Use this endpoint to avoid picking contact information for every registration.

Example

  • Bearer Authentication (apiToken):
import hostinger_api
from hostinger_api.models.common_success_empty_resource import CommonSuccessEmptyResource
from hostinger_api.rest import ApiException
from pprint import pprint


# Configure Bearer authorization: apiToken
configuration = hostinger_api.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with hostinger_api.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = hostinger_api.DomainsWHOISApi(api_client)
    whois_id = 564651 # int | WHOIS ID

    try:
        # Set WHOIS profile as default
        api_response = api_instance.set_whois_profile_as_default_v1(whois_id)
        print("The response of DomainsWHOISApi->set_whois_profile_as_default_v1:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling DomainsWHOISApi->set_whois_profile_as_default_v1: %s\n" % e)

Parameters

Name Type Description Notes
whois_id int WHOIS ID

Return type

CommonSuccessEmptyResource

Authorization

apiToken

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Success empty response -
401 Unauthenticated response -
500 Error response -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

unset_default_whois_profile_v1

CommonSuccessEmptyResource unset_default_whois_profile_v1(whois_id)

Unset default WHOIS profile

Unset WHOIS contact profile as default.

The profile itself is kept, it is only no longer pre-selected for its TLD.

Use this endpoint to stop reusing contact information for new registrations.

Example

  • Bearer Authentication (apiToken):
import hostinger_api
from hostinger_api.models.common_success_empty_resource import CommonSuccessEmptyResource
from hostinger_api.rest import ApiException
from pprint import pprint


# Configure Bearer authorization: apiToken
configuration = hostinger_api.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with hostinger_api.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = hostinger_api.DomainsWHOISApi(api_client)
    whois_id = 564651 # int | WHOIS ID

    try:
        # Unset default WHOIS profile
        api_response = api_instance.unset_default_whois_profile_v1(whois_id)
        print("The response of DomainsWHOISApi->unset_default_whois_profile_v1:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling DomainsWHOISApi->unset_default_whois_profile_v1: %s\n" % e)

Parameters

Name Type Description Notes
whois_id int WHOIS ID

Return type

CommonSuccessEmptyResource

Authorization

apiToken

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Success empty response -
401 Unauthenticated response -
500 Error response -

[Back to top] [Back to API list] [Back to Model list] [Back to README]