[API] Защита веб-сайтов

Здесь указаны все возможные на данный момент запросы для обращения с защитой веб-сайтов.

Вывод всех защит на аккаунте

GET https://api.lethost.co/protection

Headers

Name
Type
Description

API-Key*

string

API ключ

{
    "data": [
    {
        "id": protectionid,
        "domains": ['example.com'],
        "location": location_name,
        "tarif": tarif_name,
        "protection-status": protection_status
    }],
    "status": "success"
}

Вывод данных указанной защиты

GET https://api.lethost.co/protection/get/{id}

Path Parameters

Name
Type
Description

{id}*

int

ID защиты

Headers

Name
Type
Description

API-Key*

string

API ключ

Вывод DNS записей указанного домена

GET https://api.lethost.co/protection/getRecords/{id}/{domain}

Path Parameters

Name
Type
Description

{id}*

int

ID защиты

{domain}*

string

Домен

Headers

Name
Type
Description

API-Key*

string

API ключ

Вывод всех доступных тарифов для заказа

GET https://api.lethost.co/protection/products

Заказ защиты веб-сайтов

POST https://api.lethost.co/protection/order

Query Parameters

Name
Type
Description

tarif-id*

int

ID тарифа

days*

int

Дни аренды (30, 90, 180, 360)

promo-code

string

Промокод

Headers

Name
Type
Description

API-Key*

string

API ключ

Продление защиты веб-сайтов

POST https://api.lethost.co/protection/extend/{id}

Path Parameters

Name
Type
Description

{id}*

int

ID защиты

Query Parameters

Name
Type
Description

days*

int

Дни аренды (30, 90, 180, 360)

promo-code

int

Промокод

Headers

Name
Type
Description

API-Key*

string

API ключ

Добавление доменов

PUT https://api.lethost.co/protection/addDomain/{id}

Path Parameters

Name
Type
Description

{id}*

int

ID защиты

Query Parameters

Name
Type
Description

domains*

array

Добавляемые домены

Headers

Name
Type
Description

API-Key*

string

API ключ

Создание DNS записи

PUT https://api.lethost.co/protection/addRecord/{id}/{domain}

Path Parameters

Name
Type
Description

{id}*

int

ID защиты

{domain}*

string

Домен

Query Parameters

Name
Type
Description

type*

string

Тип записи (A, AAAA, TXT, CNAME, MX)

name*

string

Название (@, www)

content*

string

Содержимое (1.1.1.1)

ttl

int

Время жизни пакета данных (по умолчанию: 300)

protectionMode*

string

Статус защиты (active, passive, disabled)

Headers

Name
Type
Description

API-Key*

string

API ключ

Удаление домена

DELETE https://api.lethost.co/protection/deleteDomain/{id}

Path Parameters

Name
Type
Description

{id}*

int

ID защиты

Query Parameters

Name
Type
Description

domain*

string

Удаляемый домен

Headers

Name
Type
Description

API-Key*

string

API ключ

Удаление DNS записи

DELETE https://api.lethost.co/protection/deleteRecord/{id}/{domain}

Path Parameters

Name
Type
Description

{id}*

string

ID защиты

{domain}*

string

Домен

Query Parameters

Name
Type
Description

record-id*

int

ID удаляемой записи

Headers

Name
Type
Description

API-Key*

string

API ключ

Last updated