From 80b614afa1df07e1d0901d5326740afcc3fbf949 Mon Sep 17 00:00:00 2001 From: dgtlmoon Date: Thu, 30 Oct 2025 17:57:25 +0100 Subject: [PATCH] API - Rebuilding HTML docs --- docs/api-spec.yaml | 10 +++++++++- docs/api_v1/index.html | 32 ++++++++++++++++++++++++++------ 2 files changed, 35 insertions(+), 7 deletions(-) diff --git a/docs/api-spec.yaml b/docs/api-spec.yaml index 483836941..9ba80222d 100644 --- a/docs/api-spec.yaml +++ b/docs/api-spec.yaml @@ -433,7 +433,15 @@ paths: operationId: createWatch tags: [Watch Management] summary: Create a new watch - description: Create a single web page change monitor (watch). Requires at least 'url' to be set, Optionally use `"processor"` field to set the `restock_diff` mode or `text_json_diff` (default) + description: | + Create a single web page change monitor (watch). Requires at least `url` to be set. + + Every watch can be configured with: + - **Processor mode**: `processor` field (`restock_diff` or `text_json_diff` - default) + - **Notification settings**: `notification_urls` (array), `notification_title`, `notification_body`, `notification_format`, `notification_muted` + - **Tags/Groups**: `tag` (UUID string) or `tags` (array of UUIDs) + - **Check settings**: `time_between_check`, `paused`, `method`, `fetch_backend` + - **Advanced options**: `headers`, `body`, `proxy`, `browser_steps`, and more x-code-samples: - lang: 'curl' source: | diff --git a/docs/api_v1/index.html b/docs/api_v1/index.html index 0571454f3..928862f5b 100644 --- a/docs/api_v1/index.html +++ b/docs/api_v1/index.html @@ -488,8 +488,24 @@ notification preferences, and content filtering options.

" class="sc-eVqvcJ sc-fszimp kIppRw drqpJr">

Custom server

{protocol}://{host}/api/v1/watch

Request samples

curl -X GET "http://localhost:5000/api/v1/watch" \
   -H "x-api-key: YOUR_API_KEY"
-

Response samples

Content type
application/json
{
  • "095be615-a8ad-4c33-8e9c-c7612fbf6c9f": {
    },
  • "7c9e6b8d-f2a1-4e5c-9d3b-8a7f6e4c2d1a": {
    }
}

Create a new watch

Create a single web page change monitor (watch). Requires at least 'url' to be set.

+

Response samples

Content type
application/json
{
  • "095be615-a8ad-4c33-8e9c-c7612fbf6c9f": {
    },
  • "7c9e6b8d-f2a1-4e5c-9d3b-8a7f6e4c2d1a": {
    }
}

Create a new watch

Create a single web page change monitor (watch). Requires at least url to be set.

+

Every watch can be configured with:

+
    +
  • Processor mode: processor field (restock_diff or text_json_diff - default)
  • +
  • Notification settings: notification_urls (array), notification_title, notification_body, notification_format, notification_muted
  • +
  • Tags/Groups: tag (UUID string) or tags (array of UUIDs)
  • +
  • Check settings: time_between_check, paused, method, fetch_backend
  • +
  • Advanced options: headers, body, proxy, browser_steps, and more
  • +
Authorizations:
ApiKeyAuth
Request Body schema: application/json
required
url
required
string <uri> <= 5000 characters

URL to monitor for changes

title
string <= 5000 characters

Format for notifications

track_ldjson_price_data
boolean

Whether to track JSON-LD price data

-
Array of objects
Array of objects

Browser automation steps

+
processor
string
Default: "text_json_diff"
Enum: "restock_diff" "text_json_diff"

Optional processor mode to use for change detection. Defaults to text_json_diff if not specified.

Responses

Request samples

curl -X GET "http://localhost:5000/api/v1/watch/095be615-a8ad-4c33-8e9c-c7612fbf6c9f" \
   -H "x-api-key: YOUR_API_KEY"
-

Response samples

Content type
{
  • "title": "string",
  • "tag": "string",
  • "tags": [
    ],
  • "paused": true,
  • "notification_muted": true,
  • "method": "GET",
  • "fetch_backend": "html_requests",
  • "headers": {
    },
  • "body": "string",
  • "proxy": "string",
  • "webdriver_delay": 0,
  • "webdriver_js_execute_code": "string",
  • "time_between_check": {
    },
  • "time_between_check_use_default": true,
  • "notification_urls": [
    ],
  • "notification_title": "string",
  • "notification_body": "string",
  • "notification_format": "text",
  • "track_ldjson_price_data": true,
  • "browser_steps": [
    ],
  • "uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f",
  • "last_checked": 0,
  • "last_changed": 0,
  • "last_error": "string",
  • "last_viewed": 0,
  • "link": "string"
}

Update watch

Response samples

Content type
{
  • "title": "string",
  • "tag": "string",
  • "tags": [
    ],
  • "paused": true,
  • "notification_muted": true,
  • "method": "GET",
  • "fetch_backend": "html_requests",
  • "headers": {
    },
  • "body": "string",
  • "proxy": "string",
  • "webdriver_delay": 0,
  • "webdriver_js_execute_code": "string",
  • "time_between_check": {
    },
  • "time_between_check_use_default": true,
  • "notification_urls": [
    ],
  • "notification_title": "string",
  • "notification_body": "string",
  • "notification_format": "text",
  • "track_ldjson_price_data": true,
  • "browser_steps": [
    ],
  • "processor": "restock_diff",
  • "uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f",
  • "last_checked": 0,
  • "last_changed": 0,
  • "last_error": "string",
  • "last_viewed": 0,
  • "link": "string"
}

Update watch

Update an existing web page change monitor (watch) using JSON. Accepts the same structure as returned in get single watch information.

Authorizations:
ApiKeyAuth
path Parameters
uuid
required
string <uuid>

Web page change monitor (watch) unique ID

@@ -610,6 +628,8 @@ notification preferences, and content filtering options.

" class="sc-eVqvcJ sc-fszimp kIppRw drqpJr">

Whether to track JSON-LD price data

Array of objects

Browser automation steps

+
processor
string
Default: "text_json_diff"
Enum: "restock_diff" "text_json_diff"

Optional processor mode to use for change detection. Defaults to text_json_diff if not specified.

last_viewed
integer >= 0

Unix timestamp in seconds of the last time the watch was viewed. Setting it to a value higher than last_changed in the "Update watch" endpoint marks the watch as viewed.

Responses

Custom server

-
{protocol}://{host}/api/v1/watch/{uuid}

Request samples

Content type
application/json
{
  • "title": "string",
  • "tag": "string",
  • "tags": [
    ],
  • "paused": true,
  • "notification_muted": true,
  • "method": "GET",
  • "fetch_backend": "html_requests",
  • "headers": {
    },
  • "body": "string",
  • "proxy": "string",
  • "webdriver_delay": 0,
  • "webdriver_js_execute_code": "string",
  • "time_between_check": {
    },
  • "time_between_check_use_default": true,
  • "notification_urls": [
    ],
  • "notification_title": "string",
  • "notification_body": "string",
  • "notification_format": "text",
  • "track_ldjson_price_data": true,
  • "browser_steps": [
    ],
  • "last_viewed": 0
}

Delete watch

{protocol}://{host}/api/v1/watch/{uuid}

Request samples

Content type
application/json
{
  • "title": "string",
  • "tag": "string",
  • "tags": [
    ],
  • "paused": true,
  • "notification_muted": true,
  • "method": "GET",
  • "fetch_backend": "html_requests",
  • "headers": {
    },
  • "body": "string",
  • "proxy": "string",
  • "webdriver_delay": 0,
  • "webdriver_js_execute_code": "string",
  • "time_between_check": {
    },
  • "time_between_check_use_default": true,
  • "notification_urls": [
    ],
  • "notification_title": "string",
  • "notification_body": "string",
  • "notification_format": "text",
  • "track_ldjson_price_data": true,
  • "browser_steps": [
    ],
  • "processor": "restock_diff",
  • "last_viewed": 0
}

Delete watch

Delete a web page change monitor (watch) and all related history

Authorizations:
ApiKeyAuth
path Parameters
uuid
required
string <uuid>

Web page change monitor (watch) unique ID

@@ -920,7 +940,7 @@ counts, uptime information, and version details.

-H "x-api-key: YOUR_API_KEY"

Response samples

Content type
application/json
{
  • "watch_count": 42,
  • "tag_count": 5,
  • "uptime": "2 days, 3:45:12",
  • "version": "0.50.10"
}