API Key Creation & Management¶
Connect to the /admin page:
- Click on API Keys in Accounts part.
- Click on ADD API KEY.
- Select the expiration date.
- Click on SAVE.
You must pass your API keys via the Authorization header. It should be formatted as follows: Authorization: Token <API_KEY> where
Browser sessions and scripts¶
The browser never holds the token of its session in a place a script of the page can read: the server keeps it in an httpOnly cookie (knox_token, SameSite=Strict, Secure when the page is served in HTTPS) and sets a second cookie, session_active, that only tells the page that there is a session. A request of the browser that changes something carries the CSRF token (X-CSRFToken, from the csrftoken cookie).
A script is not concerned: POST /api/auth/login still answers the token, and the Authorization: Token <token> header is accepted as before, on every route, as are API keys. POST /api/auth/logout/ answers 204 as before (and clears the cookies of a browser); POST /api/auth/logoutall/ ends every session of the user.
Pagination¶
Usage Examples:
# Get first page with default size (100 items)
GET /api/data_leak/keyword/
# Get specific page
GET /api/data_leak/keyword/?page=2
# Customize page size (between 1 and 1000)
GET /api/data_leak/keyword/?page=1&page_size=50
# Maximum page size
GET /api/data_leak/keyword/?page=1&page_size=1000
Response Fields:
count: Total number of items across all pagesnext: URL to the next page (null if last page)previous: URL to the previous page (null if first page)results: Array containing the actual items for the current page
Notes:
- Pagination is implemented across all major API endpoints
- Default page size is 100 items
- Maximum page size is 1000 items
- Every page of the web interface reads its lists through this pagination (with
ordering,searchand the filters of each list in the query string).
Interactive API Documentation¶
Watcher ships with a fully auto-generated REST API documentation powered by drf-spectacular.
- Swagger UI - available at
/api/docs/- interactive interface to browse every endpoint, inspect request/response schemas, and execute authenticated calls directly from the browser. - OpenAPI 3 schema - downloadable at
/api/schema/(JSON/YAML) for import into Postman, Insomnia, or any API client.
All six modules are fully covered, including the /statistics/ endpoints and the CyberWatch Watch Rule engine.
Below, you will find our 6 modules with their API functions:
Threats Watcher
`^api/threats_watcher/trendyword/$` - **HTTP Method:** GET, POST, PATCH, DELETE - **Pagination:** No - **Description:** - **GET:** Returns a paginated list of trending words monitored by the application. - **POST:** Adds a new trending word to the monitored list. - **PATCH:** Updates an existing trending word in the monitored list. - **DELETE:** Removes a trending word from the monitored list. - **Usage:** Used to get, add, update, or delete currently monitored trending keywords. `^api/threats_watcher/bannedword/$` - **HTTP Method:** GET, POST, PATCH, DELETE - **Pagination:** No - **Description:** - **GET:** Returns a paginated list of banned words monitored by the application. - **POST:** Adds a new banned word to the monitored list. - **PATCH:** Updates an existing banned word in the monitored list. - **DELETE:** Removes a banned word from the monitored list. - **Usage:** Used to get, add, update, or delete currently monitored banned keywords.
Data Leak
`^api/data_leak/keyword/$` - **HTTP Method:** GET, POST, PATCH, DELETE - **Pagination:** Yes (100 items per page by default) - **Description:** - **GET:** Returns a paginated list of keywords monitored for data leaks. - **POST:** Adds a new keyword to the monitored list for data leaks. - **PATCH:** Updates an existing keyword in the monitored list for data leaks. - **DELETE:** Removes a keyword from the monitored list for data leaks. - **Usage:** Used to get, add, update, or delete keywords monitored for data leaks. `^api/data_leak/alert/$` - **HTTP Method:** GET, POST, PATCH, DELETE - **Pagination:** Yes (100 items per page by default) - **Description:** - **GET:** Returns a paginated list of alerts related to data leaks. - **POST:** Adds a new alert for data leaks. - **PATCH:** Updates an existing alert for data leaks. - **DELETE:** Removes an alert related to data leaks. - **Usage:** Used to get, add, update, or delete current alerts regarding data leaks.
Website Monitoring
`^api/site_monitoring/site/$` - **HTTP Method:** GET, POST, PATCH, DELETE - **Pagination:** Yes (100 items per page by default) - **Description:** - **GET:** Returns a paginated list of sites monitored by the application. - **POST:** Adds a new site to the monitored list. - **PATCH:** Updates an existing site in the monitored list. - **DELETE:** Removes a site from the monitored list. - **Usage:** Used to get, add, update, or delete currently monitored sites. `^api/site_monitoring/alert/$` - **HTTP Method:** GET, POST, PATCH, DELETE - **Pagination:** Yes (100 items per page by default) - **Description:** - **GET:** Returns a paginated list of alerts related to site monitoring. - **POST:** Adds a new alert related to site monitoring. - **PATCH:** Updates an existing alert related to site monitoring. - **DELETE:** Removes an alert related to site monitoring. - **Usage:** Used to get, add, update, or delete current alerts regarding site monitoring. `^api/site_monitoring/misp/$` - **HTTP Method:** POST - **Pagination:** No - **Description:** - **POST:** Exports a monitored site to MISP threat intelligence platform. - **Usage:** Used to integrate site monitoring data with MISP. `^api/site_monitoring/site/statistics/$` - **HTTP Method:** GET - **Pagination:** No - **Description:** - **GET:** Returns aggregated statistics for site monitoring (total sites, malicious count, takedown requests, legal team cases). - **Usage:** Used to display dashboard statistics.
DNS Threats Monitored
`^api/dns_finder/dns_monitored/$` - **HTTP Method:** GET, POST, PATCH, DELETE - **Pagination:** Yes (100 items per page by default) - **Description:** - **GET:** Returns a paginated list of monitored DNS domains. - **POST:** Adds a new DNS domain to the monitored list. - **PATCH:** Updates an existing monitored DNS domain. - **DELETE:** Removes a DNS domain from the monitored list. - **Usage:** Used to get, add, update, or delete currently monitored DNS domains. `^api/dns_finder/keyword_monitored/$` - **HTTP Method:** GET, POST, PATCH, DELETE - **Pagination:** Yes (100 items per page by default) - **Description:** - **GET:** Returns a paginated list of monitored DNS keywords. - **POST:** Adds a new keyword to the monitored list. - **PATCH:** Updates an existing monitored keyword. - **DELETE:** Removes a keyword from the monitored list. - **Usage:** Used to get, add, update, or delete currently monitored DNS keywords. `^api/dns_finder/dns_twisted/$` - **HTTP Method:** GET, POST, PATCH, DELETE - **Pagination:** Yes (100 items per page by default) - **Description:** - **GET:** Returns a paginated list of twisted DNS domains (typosquatting). - **POST:** Adds a new twisted DNS domain to the monitored list. - **PATCH:** Updates an existing twisted DNS domain in the monitored list. - **DELETE:** Removes a twisted DNS domain from the monitored list. - **Usage:** Used to get, add, update, or delete currently monitored twisted DNS domains. `^api/dns_finder/alert/$` - **HTTP Method:** GET, POST, PATCH, DELETE - **Pagination:** Yes (100 items per page by default) - **Description:** - **GET:** Returns a paginated list of DNS alerts. - **POST:** Adds a new DNS alert. - **PATCH:** Updates an existing DNS alert. - **DELETE:** Removes a DNS alert. - **Usage:** Used to get, add, update, or delete current DNS alerts. `^api/dns_finder/misp/$` - **HTTP Method:** POST - **Pagination:** No - **Description:** - **POST:** Exports DNS findings to MISP threat intelligence platform. - **Usage:** Used to integrate DNS findings with MISP.
Legitimate Domains
`^api/common/legitimate_domains/$` - **HTTP Method:** GET, POST, PATCH, DELETE - **Pagination:** Yes (100 items per page by default) - **Description:** - **GET:** Returns a paginated list of legitimate company-owned domains. - **POST:** Export a domain from Website Monitoring to the legitimate domains list. Payload includes: domain_name, ticket_id, contact, expiry, repurchased (bool), comments. - **PATCH:** Updates an existing legitimate domain. - **DELETE:** Removes a legitimate domain. - **Usage:** Add a company-approved domain for expiry/contact monitoring and tracking. `^api/common/legitimate_domains/statistics/$` - **HTTP Method:** GET - **Pagination:** No - **Description:** - **GET:** Returns aggregated statistics for legitimate domains (total, repurchased, expired, expiring soon). - **Usage:** Used to display dashboard statistics. `^api/common/legitimate_domains/misp/$` - **HTTP Method:** POST - **Pagination:** No - **Description:** - **POST:** Exports a legitimate domain to MISP threat intelligence platform. - **Usage:** Used to integrate legitimate domain data with MISP.
CyberWatch
`^api/cyber_watch/cves/$` - **HTTP Method:** GET - **Pagination:** Yes (100 items per page by default) - **Description:** - **GET:** Returns a paginated list of CVE alerts fetched from cve.circl.lu. - **Usage:** Used to display CVE monitoring data in the CyberWatch dashboard. `^api/cyber_watch/cves/statistics/$` - **HTTP Method:** GET - **Pagination:** No - **Description:** - **GET:** Returns aggregated CVE statistics (total, critical, high, new today). - **Usage:** Used to display the CVEStats KPI panel. `^api/cyber_watch/ransomware/victims/$` - **HTTP Method:** GET - **Pagination:** Yes (100 items per page by default) - **Description:** - **GET:** Returns a paginated list of ransomware victims fetched from ransomware.live and ransomlook.io. - **Usage:** Used to display victim data in the CyberWatch dashboard. `^api/cyber_watch/ransomware/statistics/$` - **HTTP Method:** GET - **Pagination:** No - **Description:** - **GET:** Returns aggregated ransomware statistics (total victims, groups, new this week). - **Usage:** Used to display the RansomwareStats KPI panel. `^api/cyber_watch/watch-rules/$` - **HTTP Method:** GET, POST, PATCH, DELETE - **Pagination:** Yes (100 items per page by default) - **Description:** - **GET:** Returns all defined watch rules. - **POST:** Creates a new keyword-based watch rule scoped to CVEs, ransomware victims, or both. - **PATCH:** Updates an existing watch rule. - **DELETE:** Removes a watch rule. - **Usage:** Manage keyword alert rules from the CyberWatch dashboard. `^api/cyber_watch/watch-rule-hits/$` - **HTTP Method:** GET - **Pagination:** Yes (100 items per page by default) - **Description:** - **GET:** Returns all recorded rule hits (deduplicated matches between rules and incoming data). - **Usage:** Display rule match history in the CyberWatch module.
Threat Intelligence Summaries
`^api/threats_watcher/summary/?type=weekly_summary` - **HTTP Method:** GET - **Pagination:** No - **Description:** - **GET:** Returns the AI-generated weekly summary of threats detected by the watcher. - **Usage:** Fetch and display the weekly threat intelligence report. `^api/threats_watcher/summary/?type=breaking_news` - **HTTP Method:** GET - **Pagination:** No - **Description:** - **GET:** Returns breaking news / high-priority alerts detected by the watcher. - **Usage:** Fetch and display breaking news alerts. `^api/threats_watcher/summary/?type=trendy_word_summary&keyword=
Connectors
`^api/connectors/
Specific Details¶
To obtain detailed information about a specific item, such as an alert, a monitored site, or any other entity in the system, you can access its details by appending /(?P<pk>[^/.]+)/$ to the end of the corresponding API URL.
For instance, let's say you want to retrieve information about an alert with the ID "1". You would construct the URL as follows: http://0.0.0.0:9002/api/site_monitoring/alert/1
By making a GET request to this URL using your web browser, CURL, or any HTTP client, you will receive comprehensive details about the alert with the ID "1".
Following this pattern, you can easily navigate and retrieve specific information for any item in the system, ensuring efficient use of the available API endpoints.