https://api.pingera.com/v1
POST /v1/checks
Content-Type: application/json
Authorization: ВАШ_API_КЛЮЧ
{
"name": "Моя первая синтетическая проверка",
"type": "synthetic",
"url": "https://example.com",
"interval": 300, // Проверка каждые 5 минут
"timeout": 30, // Таймаут 30 секунд
"parameters": {
"screenshot": {
"enabled": true,
},
}
}
JSON
POST /v1/checks/execute
Content-Type: application/json
Authorization: ВАШ_API_КЛЮЧ
{
"name": "Синтетическая проверка по запросу",
"type": "synthetic",
"url": "https://pingera.ru/cronjob-monitoring",
"timeout": 30,
"parameters": {
"screenshot": {
"enabled": false,
"fullPage": false
},
"search_text": "Пульсары"
}
}
{
"job_id": "mburq68bp440",
"message": "Custom check execution queued successfully",
"status": "queued"
}
GET /v1/checks/jobs/{job_id}
Authorization: ВАШ_API_КЛЮЧ
Пример части ответа с результатом синтетической проверки:
JSON
{
"id": "mburq68bp440",
"status": "completed",
"result": {
"check_metadata": {
"function_execution_time": 4725,
"headers": { /* ... */ },
"navigation_timing": {
"dns_lookup": 12.3,
"dom_content_loaded": 17.2,
"load_complete": 9.3,
"total_time": 562
},
"resource_timings": [ /* ... */ ],
"screenshot_path": "https://ссылка на скриншот.jpeg",
"status_code": 200,
"total_resources": 39
},
"check_server": { /* ... */ },
"response_time": 1547,
"status": "ok"
}
}