OmniWatchGuard logo OmniWatch Guard

Documentatie API

API REST complet pentru gestionarea monitoarelor, citirea alertelor si exportul datelor. Disponibil din planul Pro.

REST API JSON Bearer Token

Autentificare

Toate request-urile necesita un token JWT in header-ul Authorization. Obtii token-ul dupa login.

Header
Authorization: Bearer <token>
curl - Login
curl -X POST https://omniwatchguard.com/api/auth/login \
  -H "Content-Type: application/json" \
  -d '{"email": "[email protected]", "password": "parola_ta"}'
Raspuns
{"token": "eyJhbGciOiJIUzI1NiJ9...", "user": {"id": 1, "plan": "pro"}}
GET /api/monitors

Returneaza lista tuturor monitoarelor active din contul tau.

curl
curl https://omniwatchguard.com/api/monitors \
  -H "Authorization: Bearer <token>"
JavaScript
const res = await fetch("https://omniwatchguard.com/api/monitors", {
  headers: { Authorization: `Bearer ${token}` }
});
const monitors = await res.json();
Raspuns
[{"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"}]
POST /api/monitors

Creeaza un monitor nou.

ParametruTipObligatoriuDescriere
urlstringDaURL-ul paginii de monitorizat
namestringNuNumele monitorului
typestringNutext | price | stock | visual | css | api | seo | ssl
frequencyintegerNu5, 15, 30, 60 minute (implicit 60)
notify_emailintegerNu1 = activ, 0 = inactiv
notify_slackstringNuURL webhook Slack
notify_discordstringNuURL webhook Discord
notify_telegramstringNuChat ID Telegram
notify_webhookstringNuURL webhook custom
curl
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}'
Raspuns
{"success": true, "id": 42}
PATCH /api/monitors/{id}

Actualizeaza un monitor existent. Trimite doar campurile pe care vrei sa le modifici.

curl
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/..."}'
Raspuns
{"success": true}
DELETE /api/monitors/{id}

Sterge un monitor. Actiunea este ireversibila.

curl
curl -X DELETE https://omniwatchguard.com/api/monitors/42 \
  -H "Authorization: Bearer <token>"
Raspuns
{"success": true}
GET /api/monitors/changes

Returneaza ultimele schimbari detectate. Parametru optional: ?limit=20 (implicit 10, max 100).

curl
curl "https://omniwatchguard.com/api/monitors/changes?limit=20" \
  -H "Authorization: Bearer <token>"
Raspuns
[{"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"}]
GET /api/export

Exporta datele in format CSV. Parametri: type=monitors|incidents, optional monitor_id.

curl - Export monitoare
curl "https://omniwatchguard.com/api/export?type=monitors" \
  -H "Authorization: Bearer <token>" -o monitoare.csv
curl - Export incidente
curl "https://omniwatchguard.com/api/export?type=incidents&monitor_id=42" \
  -H "Authorization: Bearer <token>" -o incidente.csv
GET /api/notifications

Returneaza istoricul ultimelor 50 notificari trimise.

curl
curl https://omniwatchguard.com/api/notifications \
  -H "Authorization: Bearer <token>"
Raspuns
[{"id": 1, "type": "email", "success": 1, "error": null,
  "sent_at": "2026-03-24T09:15:00Z", "url": "https://exemplu.com"}]

Coduri de eroare

Cod HTTPSemnificatie
200Succes
400Request invalid
401Neautorizat - token lipsa sau expirat
403Acces interzis
404Resursa negasita
500Eroare interna server
Format eroare
{"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+ apps

Conecteaza alertele OmniWatchGuard cu Gmail, Slack, Google Sheets, Notion, Airtable, Trello si alte 5000+ aplicatii.

1
Creeaza un Zap nou

In Zapier, alege Trigger: Webhooks by Zapier - Catch Hook

2
Copiaza URL-ul webhook

Zapier genereaza un URL de forma https://hooks.zapier.com/hooks/catch/...

3
Adauga in OmniWatchGuard

La crearea monitorului, in sectiunea Webhook custom, lipeste URL-ul Zapier.

4
Testeaza si porneste

Asteapta prima detectie sau testeaza din dashboard. Zapier va primi datele automat.

🔄

Make (Integromat)

1500+ apps

Automatizeaza fluxuri complexe cu Make - trimite alerte in WhatsApp, actualizeaza spreadsheet-uri, creeaza taskuri in Jira sau notifica echipa.

1
Creeaza un Scenariu nou

In Make, adauga un modul Webhooks - Custom Webhook ca trigger.

2
Copiaza URL-ul

Make genereaza un URL de forma https://hook.eu1.make.com/...

3
Adauga in OmniWatchGuard

La crearea monitorului, in sectiunea Webhook custom, lipeste URL-ul Make.

4
Determina structura

Trimite un test - Make va detecta automat structura JSON si o va pune la dispozitie in scenariu.

Exemple de automatizari populare

📈Monitorizare preturi competitor

Cand pretul scade - notificare Slack + inregistrare in Google Sheets

🛒Alerta stoc

Cand produsul intra in stoc - email automat catre clienti sau SMS via Twilio

📝Monitorizare continut

Cand pagina unui competitor se modifica - task nou in Trello sau Notion

🔒Alerta SSL

Cand SSL expira in 14 zile - ticket automat in Jira + email catre dev team

🔍SEO Monitor

Cand title sau meta description se schimba - notificare in Microsoft Teams

📊Raportare automata

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.

Payload JSON - Change detected
{
  "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"
}
Payload JSON - SSL expiry warning
{
  "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

CampTipDescriere
eventstringchange_detected sau ssl_expiry_warning
monitor_idintegerID-ul monitorului in OmniWatchGuard
monitor_namestringNumele dat monitorului
urlstringURL-ul monitorizat
typestringTipul: text, price, stock, seo, ssl, css, api, visual
summarystringRezumat AI al schimbarii detectate
severitystringminor, major sau critical
detected_atstringData si ora detectiei in format ISO 8601
💡
Sfat pentru Zapier/Make

Foloseste campul severity ca filtru - trimite email doar daca severity = critical. In Make poti construi logica conditionala complexa bazata pe type si severity.

Incearca gratuit 24h
OWG
OmniWatchGuard
Online · Raspunde instant