[API] Защита веб-сайтов
Здесь указаны все возможные на данный момент запросы для обращения с защитой веб-сайтов.
Вывод всех защит на аккаунте
GET
https://api.lethost.co/protection
Headers
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
{id}*
int
ID защиты
Headers
API-Key*
string
API ключ
{
"id": protection_id,
"protection-status": protection_status,
"location": location_name,
"tarif": tarif_name,
"price": price,
"maxdomains": maxdomains,
"ns": nameservers,
"domains": ['example.com'],
"date-end": "2000-12-31 23:59:59",
"status": "success"
}
Вывод DNS записей указанного домена
GET
https://api.lethost.co/protection/getRecords/{id}/{domain}
Path Parameters
{id}*
int
ID защиты
{domain}*
string
Домен
Headers
API-Key*
string
API ключ
{
"id": protection_id,
"domain": domain,
"data": [
{
"record-id": record_id,
"type": type_dns,
"name": name,
"content": content,
"ttl": ttl,
"protectionMode": protection_mode
}],
"status": "success"
}
Вывод всех доступных тарифов для заказа
GET
https://api.lethost.co/protection/products
{
"data": [
{
"id": tarif_id,
"name": tarif_name,
"location": location_name,
"price": price,
"maxdomains": maxdomains
}],
"status": "success"
}
Заказ защиты веб-сайтов
POST
https://api.lethost.co/protection/order
Query Parameters
tarif-id*
int
ID тарифа
days*
int
Дни аренды (30, 90, 180, 360)
promo-code
string
Промокод
Headers
API-Key*
string
API ключ
{
"id": protection_id,
"protection-status": protection_status,
"tarif": tarif_name,
"location": location_name,
"price": price,
"date-end": "2000-12-31 23:59:59",
"status": "success"
}
Продление защиты веб-сайтов
POST
https://api.lethost.co/protection/extend/{id}
Path Parameters
{id}*
int
ID защиты
Query Parameters
days*
int
Дни аренды (30, 90, 180, 360)
promo-code
int
Промокод
Headers
API-Key*
string
API ключ
{
"id": protection_id,
"protection-status": protection_status,
"tarif": tarif_name,
"price": price,
"extended-at": "2000-12-31 23:59:59",
"extended-until": "2000-11-31 23:59:59",
"status": "success"
}
Добавление доменов
PUT
https://api.lethost.co/protection/addDomain/{id}
Path Parameters
{id}*
int
ID защиты
Query Parameters
domains*
array
Добавляемые домены
Headers
API-Key*
string
API ключ
{
"domains": ['example.com'],
"success": "You have successfully added domains",
"status": "success"
}
Создание DNS записи
PUT
https://api.lethost.co/protection/addRecord/{id}/{domain}
Path Parameters
{id}*
int
ID защиты
{domain}*
string
Домен
Query Parameters
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
API-Key*
string
API ключ
{
"type": type,
"name": name,
"content": content,
"ttl": ttl,
"protectionMode": protectionmode,
"success": "You have successfully added the record",
"status": "success"
}
Удаление домена
DELETE
https://api.lethost.co/protection/deleteDomain/{id}
Path Parameters
{id}*
int
ID защиты
Query Parameters
domain*
string
Удаляемый домен
Headers
API-Key*
string
API ключ
{
"id": protection_id
"domain": domain,
"success": "You have successfully deleted the domain",
"status": "success"
}
Удаление DNS записи
DELETE
https://api.lethost.co/protection/deleteRecord/{id}/{domain}
Path Parameters
{id}*
string
ID защиты
{domain}*
string
Домен
Query Parameters
record-id*
int
ID удаляемой записи
Headers
API-Key*
string
API ключ
{
"id": protection_id
"domain": domain,
"record-id": record_id,
"success": "You have successfully deleted the record",
"status": "success"
}
Last updated