Documentatie API
API REST complet pentru gestionarea monitoarelor, citirea alertelor si exportul datelor. Disponibil din planul Pro.
Autentificare
Toate request-urile necesita un token JWT in header-ul Authorization. Obtii token-ul dupa login.
Authorization: Bearer <token>
curl -X POST https://omniwatchguard.com/api/auth/login \
-H "Content-Type: application/json" \
-d '{"email": "[email protected]", "password": "parola_ta"}' {"token": "eyJhbGciOiJIUzI1NiJ9...", "user": {"id": 1, "plan": "pro"}} Returneaza lista tuturor monitoarelor active din contul tau.
curl https://omniwatchguard.com/api/monitors \ -H "Authorization: Bearer <token>"
const res = await fetch("https://omniwatchguard.com/api/monitors", {
headers: { Authorization: `Bearer ${token}` }
});
const monitors = await res.json(); [{"id": 1, "url": "https://exemplu.com", "name": "Monitor test",
"type": "text", "frequency": 60, "status": "active",
"notify_email": 1, "notify_slack": null, "created_at": "2026-03-01T12:00:00Z"}] Creeaza un monitor nou.
| Parametru | Tip | Obligatoriu | Descriere |
|---|---|---|---|
| url | string | Da | URL-ul paginii de monitorizat |
| name | string | Nu | Numele monitorului |
| type | string | Nu | text | price | stock | visual | css | api | seo | ssl |
| frequency | integer | Nu | 5, 15, 30, 60 minute (implicit 60) |
| notify_email | integer | Nu | 1 = activ, 0 = inactiv |
| notify_slack | string | Nu | URL webhook Slack |
| notify_discord | string | Nu | URL webhook Discord |
| notify_telegram | string | Nu | Chat ID Telegram |
| notify_webhook | string | Nu | URL webhook custom |
curl -X POST https://omniwatchguard.com/api/monitors \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{"url": "https://exemplu.com/preturi", "type": "price", "frequency": 15}' {"success": true, "id": 42} Actualizeaza un monitor existent. Trimite doar campurile pe care vrei sa le modifici.
curl -X PATCH https://omniwatchguard.com/api/monitors/42 \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{"frequency": 5, "notify_slack": "https://hooks.slack.com/..."}' {"success": true} Sterge un monitor. Actiunea este ireversibila.
curl -X DELETE https://omniwatchguard.com/api/monitors/42 \ -H "Authorization: Bearer <token>"
{"success": true} Returneaza ultimele schimbari detectate. Parametru optional: ?limit=20 (implicit 10, max 100).
curl "https://omniwatchguard.com/api/monitors/changes?limit=20" \ -H "Authorization: Bearer <token>"
[{"id": 1, "monitor_id": 42, "url": "https://exemplu.com",
"ai_summary": "Pretul a scazut de la 99 RON la 79 RON (-20%).",
"ai_severity": "major", "detected_at": "2026-03-24T09:15:00Z"}] Exporta datele in format CSV. Parametri: type=monitors|incidents, optional monitor_id.
curl "https://omniwatchguard.com/api/export?type=monitors" \ -H "Authorization: Bearer <token>" -o monitoare.csv
curl "https://omniwatchguard.com/api/export?type=incidents&monitor_id=42" \ -H "Authorization: Bearer <token>" -o incidente.csv
Returneaza istoricul ultimelor 50 notificari trimise.
curl https://omniwatchguard.com/api/notifications \ -H "Authorization: Bearer <token>"
[{"id": 1, "type": "email", "success": 1, "error": null,
"sent_at": "2026-03-24T09:15:00Z", "url": "https://exemplu.com"}] Coduri de eroare
| Cod HTTP | Semnificatie |
|---|---|
| 200 | Succes |
| 400 | Request invalid |
| 401 | Neautorizat - token lipsa sau expirat |
| 403 | Acces interzis |
| 404 | Resursa negasita |
| 500 | Eroare interna server |
{"error": "Descrierea erorii"} ⚡ Integrare Zapier & Make
OmniWatchGuard se conecteaza nativ cu Zapier, Make (Integromat) si orice alta platforma de automatizare prin Webhook custom. Nu ai nevoie de cod - conectezi in 2 minute.
Zapier
5000+ appsConecteaza alertele OmniWatchGuard cu Gmail, Slack, Google Sheets, Notion, Airtable, Trello si alte 5000+ aplicatii.
In Zapier, alege Trigger: Webhooks by Zapier - Catch Hook
Zapier genereaza un URL de forma https://hooks.zapier.com/hooks/catch/...
La crearea monitorului, in sectiunea Webhook custom, lipeste URL-ul Zapier.
Asteapta prima detectie sau testeaza din dashboard. Zapier va primi datele automat.
Make (Integromat)
1500+ appsAutomatizeaza fluxuri complexe cu Make - trimite alerte in WhatsApp, actualizeaza spreadsheet-uri, creeaza taskuri in Jira sau notifica echipa.
In Make, adauga un modul Webhooks - Custom Webhook ca trigger.
Make genereaza un URL de forma https://hook.eu1.make.com/...
La crearea monitorului, in sectiunea Webhook custom, lipeste URL-ul Make.
Trimite un test - Make va detecta automat structura JSON si o va pune la dispozitie in scenariu.
Exemple de automatizari populare
Cand pretul scade - notificare Slack + inregistrare in Google Sheets
Cand produsul intra in stoc - email automat catre clienti sau SMS via Twilio
Cand pagina unui competitor se modifica - task nou in Trello sau Notion
Cand SSL expira in 14 zile - ticket automat in Jira + email catre dev team
Cand title sau meta description se schimba - notificare in Microsoft Teams
La orice schimbare - inregistrare in Airtable pentru rapoarte saptamanale
Webhook Payload
La fiecare schimbare detectata, OmniWatchGuard trimite un request POST cu Content-Type: application/json catre URL-ul tau.
{
"event": "change_detected",
"monitor_id": 42,
"monitor_name": "Preturi competitor A",
"url": "https://competitor.com/produs",
"type": "price",
"summary": "Pretul a scazut de la 552 RON la 489 RON (-11%)",
"severity": "major",
"detected_at": "2026-04-29T10:23:45.000Z"
} {
"event": "ssl_expiry_warning",
"monitor_id": 15,
"monitor_name": "SSL Monitor - site.ro",
"url": "https://site.ro",
"hostname": "site.ro",
"ssl_days_left": 12,
"ssl_expires_at": "2026-05-11T00:00:00.000Z",
"ssl_issuer": "Lets Encrypt",
"ssl_error": null,
"detected_at": "2026-04-29T06:00:00.000Z"
} Campuri disponibile
| Camp | Tip | Descriere |
|---|---|---|
| event | string | change_detected sau ssl_expiry_warning |
| monitor_id | integer | ID-ul monitorului in OmniWatchGuard |
| monitor_name | string | Numele dat monitorului |
| url | string | URL-ul monitorizat |
| type | string | Tipul: text, price, stock, seo, ssl, css, api, visual |
| summary | string | Rezumat AI al schimbarii detectate |
| severity | string | minor, major sau critical |
| detected_at | string | Data si ora detectiei in format ISO 8601 |
Foloseste campul severity ca filtru - trimite email doar daca severity = critical. In Make poti construi logica conditionala complexa bazata pe type si severity.
