API Examples¶
API Guide
The examples below show common workflows using curl. Replace nob_<your-token> with a real token from Administration → API Tokens, and adjust IDs to match your organization's data.
For the full endpoint reference, open the interactive Swagger UI at https://app.nob.center/docs (login required).
CT-Log monitoring¶
List domain filters¶
curl -H "Authorization: Bearer nob_<your-token>" \
https://app.nob.center/api/ct-log/filters
Create a domain filter¶
curl -X POST \
-H "Authorization: Bearer nob_<your-token>" \
-H "Content-Type: application/json" \
-d '{"pattern": "example.com", "match_type": "wide", "description": "Primary domain"}' \
https://app.nob.center/api/ct-log/filters
match_type is "wide" (matches all subdomains) or "exact" (matches only the domain itself).
Retrieve recent certificate matches¶
curl -H "Authorization: Bearer nob_<your-token>" \
"https://app.nob.center/api/ct-log/certificates?limit=50"
DNS monitoring¶
Add a domain to monitoring¶
curl -X POST \
-H "Authorization: Bearer nob_<your-token>" \
-H "Content-Type: application/json" \
-d '{"domain": "example.com", "auto_discover": true}' \
https://app.nob.center/api/dns-watcher/domains
With "auto_discover": true, NOB.center probes for common record types daily and adds them automatically.
List monitored records for a domain¶
curl -H "Authorization: Bearer nob_<your-token>" \
https://app.nob.center/api/dns-watcher/domains/42/records
Get DNS snapshot history¶
curl -H "Authorization: Bearer nob_<your-token>" \
"https://app.nob.center/api/dns-watcher/domains/42/history?limit=10"
Compare two snapshots¶
curl -H "Authorization: Bearer nob_<your-token>" \
"https://app.nob.center/api/dns-watcher/domains/42/diff?from=<snapshot_id>&to=<snapshot_id>"
RDAP / WHOIS monitoring¶
Add a domain to RDAP monitoring¶
curl -X POST \
-H "Authorization: Bearer nob_<your-token>" \
-H "Content-Type: application/json" \
-d '{"domain": "example.com"}' \
https://app.nob.center/api/rdap/domains
Get the latest RDAP snapshot¶
curl -H "Authorization: Bearer nob_<your-token>" \
https://app.nob.center/api/rdap/domains/17/snapshot
Compare RDAP snapshots¶
curl -H "Authorization: Bearer nob_<your-token>" \
"https://app.nob.center/api/rdap/domains/17/diff?from=<snapshot_id>&to=<snapshot_id>"
Certificate deployment monitoring¶
Create a certificate monitor¶
curl -X POST \
-H "Authorization: Bearer nob_<your-token>" \
-H "Content-Type: application/json" \
-d '{
"cn": "example.com",
"target_dns": "example.com",
"port": 443,
"ip_addresses": ["203.0.113.10"]
}' \
https://app.nob.center/api/cert-watcher/certificates
Add a custom root CA (for self-signed certificates)¶
curl -X POST \
-H "Authorization: Bearer nob_<your-token>" \
-H "Content-Type: application/json" \
-d '{
"cn": "internal.corp",
"target_dns": "internal.corp",
"port": 8443,
"ip_addresses": ["10.0.0.5"],
"root_ca": "-----BEGIN CERTIFICATE-----\nMIID...\n-----END CERTIFICATE-----"
}' \
https://app.nob.center/api/cert-watcher/certificates
Get the latest scan result for a monitor¶
curl -H "Authorization: Bearer nob_<your-token>" \
https://app.nob.center/api/cert-watcher/certificates/8/history?limit=1
Alert rules¶
Alert rules follow the same pattern across all modules. The examples below use DNS Monitoring; substitute /ct-log/, /rdap/, or /cert-watcher/ as needed.
List alert rules¶
curl -H "Authorization: Bearer nob_<your-token>" \
https://app.nob.center/api/dns-watcher/rules
Create an alert rule¶
curl -X POST \
-H "Authorization: Bearer nob_<your-token>" \
-H "Content-Type: application/json" \
-d '{
"name": "MX record change",
"condition": "changed_records.exists(r, r.type == \"MX\")",
"alert_template_id": 3,
"severity": "high",
"enabled": true
}' \
https://app.nob.center/api/dns-watcher/rules
CEL conditions are evaluated against the module's event context. See each module's documentation for the available fields.
API token management¶
List your tokens¶
curl -H "Authorization: Bearer nob_<your-token>" \
https://app.nob.center/api/api-tokens
Create a new token¶
curl -X POST \
-H "Authorization: Bearer nob_<your-token>" \
-H "Content-Type: application/json" \
-d '{
"name": "grafana-integration",
"validity_days": 30,
"scopes": ["dns-watcher:view_domains", "dns-watcher:view_records", "dns-watcher:view_history"]
}' \
https://app.nob.center/api/api-tokens
The response includes the full token value once — copy it immediately.
Renew a token before it expires¶
Use the token itself as the authentication credential for renewal:
curl -X POST \
-H "Authorization: Bearer nob_<token-to-renew>" \
https://app.nob.center/api/api-tokens/12/renew
The new expiry is calculated from today using the same validity period as when the token was created.
Revoke a token¶
curl -X DELETE \
-H "Authorization: Bearer nob_<your-token>" \
https://app.nob.center/api/api-tokens/12
Revocation is immediate and permanent.
Security score¶
Get the current security overview¶
curl -H "Authorization: Bearer nob_<your-token>" \
https://app.nob.center/api/dashboard/security-overview
Returns the current score, grade, category breakdown, and notable activity for your organization.
List available security reports¶
curl -H "Authorization: Bearer nob_<your-token>" \
"https://app.nob.center/api/reports?limit=10"
Download a report as PDF¶
curl -H "Authorization: Bearer nob_<your-token>" \
-o report.pdf \
https://app.nob.center/api/reports/5/download