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

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

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

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

Headers

{
    "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

Headers

{
    "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

Headers

{
    "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

Headers

{
    "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

Query Parameters

Headers

{
    "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

Query Parameters

Headers

{
    "domains": ['example.com'],
    "success": "You have successfully added domains",
    "status": "success"
}

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

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

Path Parameters

Query Parameters

Headers

{
    "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

Query Parameters

Headers

{
    "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

Query Parameters

Headers

{
    "id": protection_id
    "domain": domain,
    "record-id": record_id,
    "success": "You have successfully deleted the record",
    "status": "success"
}

Last updated