forked from dgtlmoon/changedetection.io
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapi-spec.yaml
More file actions
1329 lines (1252 loc) · 43.7 KB
/
api-spec.yaml
File metadata and controls
1329 lines (1252 loc) · 43.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
openapi: 3.1.0
info:
title: ChangeDetection.io API
description: |
# ChangeDetection.io Web page monitoring and notifications API
REST API for managing Page watches, Group tags, and Notifications.
changedetection.io can be driven by its built in simple API, in the examples below you will also find `curl` command line and `python` examples to help you get started faster.
## Where to find my API key?
The API key can be easily found under the **SETTINGS** then **API** tab of changedetection.io dashboard.
Simply click the API key to automatically copy it to your clipboard.

## Connection URL
The API can be found at `/api/v1/`, so for example if you run changedetection.io locally on port 5000, then URL would be `http://localhost:5000/api/v1/watch/cc0cfffa-f449-477b-83ea-0caafd1dc091/history`.
If you are using the hosted/subscription version of changedetection.io, then the URL is based on your login URL, for example:
`https://<your login url>/api/v1/watch/cc0cfffa-f449-477b-83ea-0caafd1dc091/history`
## Authentication
Almost all API requests require some authentication, this is provided as an **API Key** in the header of the HTTP request.
For example: `x-api-key: YOUR_API_KEY`
version: 0.1.1
contact:
name: ChangeDetection.io
url: https://github.com/dgtlmoon/changedetection.io
license:
name: Apache 2.0
url: https://www.apache.org/licenses/LICENSE-2.0.html
servers:
- url: http://localhost:5000/api/v1
description: Development server
- url: https://yourdomain.com/api/v1
description: Production server
- url: '{protocol}://{host}/api/v1'
description: Custom server
variables:
protocol:
enum:
- http
- https
default: https
host:
default: yourdomain.com
description: Your changedetection.io host
security:
- ApiKeyAuth: []
tags:
- name: Watch Management
description: |
Core functionality for managing web page monitors. Create, retrieve, update, and delete individual watches.
Each watch represents a single URL being monitored for changes, with configurable settings for check intervals,
notification preferences, and content filtering options.
- name: Watch History
description: |
Access historical snapshots and change data for your watches. View the complete timeline of detected changes
and retrieve specific versions of monitored content for comparison and analysis.
- name: Snapshots
description: |
Retrieve individual snapshots of monitored content. Access both the processed change detection data and
the raw HTML content that was captured during monitoring checks.
- name: Favicon
description: |
Retrieve favicon images associated with monitored web pages. These are used in the dashboard interface
to visually identify different watches in your monitoring list.
- name: Group / Tag Management
description: |
Organize your watches using tags and groups. Tags (also known as Groups) allow you to categorize monitors, set group-wide
notification preferences, and perform bulk operations like mass rechecking or status changes across
multiple related watches.
- name: Notifications
description: |
Configure global notification endpoints that can be used across all your watches. Supports various
notification services including email, Discord, Slack, webhooks, and many other popular platforms.
These settings serve as defaults that can be overridden at the individual watch or tag level.
The notification syntax uses [https://github.com/caronc/apprise](https://github.com/caronc/apprise).
- name: Search
description: |
Search and filter your watches by URL patterns, titles, or tags. Useful for quickly finding specific
monitors in large collections or identifying watches that match certain criteria.
- name: Import
description: |
Bulk import multiple URLs for monitoring. Accepts plain text lists of URLs and can automatically
apply tags, proxy settings, and other configurations to all imported watches simultaneously.
- name: System Information
description: |
Retrieve system status and statistics about your changedetection.io instance, including total watch
counts, uptime information, and version details.
components:
securitySchemes:
ApiKeyAuth:
type: apiKey
in: header
name: x-api-key
description: |
API key for authentication. You can find your API key in the changedetection.io dashboard under Settings > API.
Enter your API key in the "Authorize" button above to automatically populate all code examples.
schemas:
WatchBase:
type: object
properties:
url:
type: string
format: uri
description: URL to monitor for changes
maxLength: 5000
title:
type: string
description: Custom title for the web page change monitor (watch), not to be confused with page_title
maxLength: 5000
tag:
type: string
description: Tag UUID to associate with this web page change monitor (watch)
maxLength: 5000
tags:
type: array
items:
type: string
description: Array of tag UUIDs
paused:
type: boolean
description: Whether the web page change monitor (watch) is paused
muted:
type: boolean
description: Whether notifications are muted
method:
type: string
enum: [GET, POST, DELETE, PUT]
description: HTTP method to use
fetch_backend:
type: string
enum: [html_requests, html_webdriver]
description: Backend to use for fetching content
headers:
type: object
additionalProperties:
type: string
description: HTTP headers to include in requests
body:
type: string
description: HTTP request body
maxLength: 5000
proxy:
type: string
description: Proxy configuration
maxLength: 5000
webdriver_delay:
type: integer
description: Delay in seconds for webdriver
webdriver_js_execute_code:
type: string
description: JavaScript code to execute
maxLength: 5000
time_between_check:
type: object
properties:
weeks:
type: integer
days:
type: integer
hours:
type: integer
minutes:
type: integer
seconds:
type: integer
description: Time intervals between checks
time_between_check_use_default:
type: boolean
default: true
description: Whether to use global settings for time between checks - defaults to true if not set
notification_urls:
type: array
items:
type: string
description: Notification URLs for this web page change monitor (watch)
notification_title:
type: string
description: Custom notification title
maxLength: 5000
notification_body:
type: string
description: Custom notification body
maxLength: 5000
notification_format:
type: string
enum: [Text, HTML, Markdown]
description: Format for notifications
track_ldjson_price_data:
type: boolean
description: Whether to track JSON-LD price data
browser_steps:
type: array
items:
type: object
properties:
operation:
type: string
maxLength: 5000
selector:
type: string
maxLength: 5000
optional_value:
type: string
maxLength: 5000
required: [operation, selector, optional_value]
description: Browser automation steps
Watch:
allOf:
- $ref: '#/components/schemas/WatchBase'
- type: object
properties:
uuid:
type: string
format: uuid
description: Unique identifier for the web page change monitor (watch)
readOnly: true
last_checked:
type: integer
description: Unix timestamp of last check
readOnly: true
last_changed:
type: integer
description: Unix timestamp of last change
readOnly: true
last_error:
type: string
description: Last error message
readOnly: true
last_viewed:
type: integer
description: 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.
minimum: 0
link:
type: string
format: string
description: The watch URL rendered in case of any Jinja2 markup, always use this for listing.
readOnly: true
CreateWatch:
allOf:
- $ref: '#/components/schemas/WatchBase'
- type: 'object'
required:
- url
UpdateWatch:
allOf:
- $ref: '#/components/schemas/WatchBase'
- type: object
properties:
last_viewed:
type: integer
description: 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.
minimum: 0
Tag:
type: object
properties:
uuid:
type: string
format: uuid
description: Unique identifier for the tag
readOnly: true
title:
type: string
description: Tag title
maxLength: 5000
notification_urls:
type: array
items:
type: string
description: Default notification URLs for web page change monitors (watches) with this tag
notification_muted:
type: boolean
description: Whether notifications are muted for this tag
CreateTag:
allOf:
- $ref: '#/components/schemas/Tag'
- type: object
required:
- title
NotificationUrls:
type: object
properties:
notification_urls:
type: array
items:
type: string
format: uri
description: List of notification URLs
required:
- notification_urls
SystemInfo:
type: object
properties:
watch_count:
type: integer
description: Total number of web page change monitors (watches)
tag_count:
type: integer
description: Total number of tags
uptime:
type: string
description: System uptime
version:
type: string
description: Application version
SearchResult:
type: object
properties:
watches:
type: object
additionalProperties:
$ref: '#/components/schemas/Watch'
description: Dictionary of matching web page change monitors (watches) keyed by UUID
WatchHistory:
type: object
additionalProperties:
type: string
description: Path to snapshot file
description: Dictionary of timestamps and snapshot paths
Error:
type: object
properties:
message:
type: string
description: Error message
paths:
/watch:
get:
operationId: listWatches
tags: [Watch Management]
summary: List all watches
description: Return concise list of available web page change monitors (watches) and basic info
x-code-samples:
- lang: 'curl'
source: |
curl -X GET "http://localhost:5000/api/v1/watch" \
-H "x-api-key: YOUR_API_KEY"
- lang: 'Python'
source: |
import requests
headers = {'x-api-key': 'YOUR_API_KEY'}
response = requests.get('http://localhost:5000/api/v1/watch', headers=headers)
print(response.json())
parameters:
- name: recheck_all
in: query
description: Set to 1 to force recheck of all watches
schema:
type: string
enum: ["1"]
- name: tag
in: query
description: Tag name to filter results
schema:
type: string
responses:
'200':
description: List of watches
content:
application/json:
schema:
type: object
additionalProperties:
$ref: '#/components/schemas/Watch'
example:
"095be615-a8ad-4c33-8e9c-c7612fbf6c9f":
uuid: "095be615-a8ad-4c33-8e9c-c7612fbf6c9f"
url: "http://example.com?id={{1+1}} - the raw URL"
link: "http://example.com?id=2 - the rendered URL, always use this for listing."
title: "Example Website Monitor - manually entered title/description"
page_title: "The HTML <title> from the page"
tags: ["550e8400-e29b-41d4-a716-446655440000"]
paused: false
muted: false
method: "GET"
fetch_backend: "html_requests"
last_checked: 1640995200
last_changed: 1640995200
"7c9e6b8d-f2a1-4e5c-9d3b-8a7f6e4c2d1a":
uuid: "7c9e6b8d-f2a1-4e5c-9d3b-8a7f6e4c2d1a"
url: "http://example.com?id={{1+1}} - the raw URL"
link: "http://example.com?id=2 - the rendered URL, always use this for listing."
title: "News Site Tracker - manually entered title/description"
page_title: "The HTML <title> from the page"
tags: ["330e8400-e29b-41d4-a716-446655440001"]
paused: false
muted: true
method: "GET"
fetch_backend: "html_webdriver"
last_checked: 1640998800
last_changed: 1640995200
post:
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.
x-code-samples:
- lang: 'curl'
source: |
curl -X POST "http://localhost:5000/api/v1/watch" \
-H "x-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"url": "https://example.com",
"title": "Example Site Monitor",
"time_between_check": {
"hours": 1
}
}'
- lang: 'Python'
source: |
import requests
import json
headers = {
'x-api-key': 'YOUR_API_KEY',
'Content-Type': 'application/json'
}
data = {
'url': 'https://example.com',
'title': 'Example Site Monitor',
'time_between_check': {
'hours': 1
}
}
response = requests.post('http://localhost:5000/api/v1/watch',
headers=headers, json=data)
print(response.text)
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/CreateWatch'
example:
url: "https://example.com"
title: "Example Site Monitor"
time_between_check:
hours: 1
responses:
'200':
description: Web page change monitor (watch) created successfully
content:
text/plain:
schema:
type: string
example: "OK"
'500':
description: Server error
content:
text/plain:
schema:
type: string
/watch/{uuid}:
get:
operationId: getWatch
tags: [Watch Management]
summary: Get single watch
description: Retrieve web page change monitor (watch) information and set muted/paused status. Returns the FULL Watch JSON.
x-code-samples:
- lang: 'curl'
source: |
curl -X GET "http://localhost:5000/api/v1/watch/095be615-a8ad-4c33-8e9c-c7612fbf6c9f" \
-H "x-api-key: YOUR_API_KEY"
- lang: 'Python'
source: |
import requests
headers = {'x-api-key': 'YOUR_API_KEY'}
uuid = '095be615-a8ad-4c33-8e9c-c7612fbf6c9f'
response = requests.get(f'http://localhost:5000/api/v1/watch/{uuid}', headers=headers)
print(response.json())
parameters:
- name: uuid
in: path
required: true
description: Web page change monitor (watch) unique ID
schema:
type: string
format: uuid
- name: recheck
in: query
description: Recheck this web page change monitor (watch)
schema:
type: string
enum: ["1", "true"]
- name: paused
in: query
description: Set pause state
schema:
type: string
enum: [paused, unpaused]
- name: muted
in: query
description: Set mute state
schema:
type: string
enum: [muted, unmuted]
responses:
'200':
description: Watch information or operation result
content:
application/json:
schema:
$ref: '#/components/schemas/Watch'
text/plain:
schema:
type: string
example: "OK"
'404':
description: Web page change monitor (watch) not found
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
put:
operationId: updateWatch
tags: [Watch Management]
summary: Update watch
description: Update an existing web page change monitor (watch) using JSON. Accepts the same structure as returned in [get single watch information](#operation/getWatch).
x-code-samples:
- lang: 'curl'
source: |
curl -X PUT "http://localhost:5000/api/v1/watch/095be615-a8ad-4c33-8e9c-c7612fbf6c9f" \
-H "x-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"url": "https://updated-example.com",
"title": "Updated Monitor",
"paused": false
}'
- lang: 'Python'
source: |
import requests
headers = {
'x-api-key': 'YOUR_API_KEY',
'Content-Type': 'application/json'
}
uuid = '095be615-a8ad-4c33-8e9c-c7612fbf6c9f'
data = {
'url': 'https://updated-example.com',
'title': 'Updated Monitor',
'paused': False
}
response = requests.put(f'http://localhost:5000/api/v1/watch/{uuid}',
headers=headers, json=data)
print(response.text)
parameters:
- name: uuid
in: path
required: true
description: Web page change monitor (watch) unique ID
schema:
type: string
format: uuid
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/UpdateWatch'
responses:
'200':
description: Web page change monitor (watch) updated successfully
content:
text/plain:
schema:
type: string
example: "OK"
'500':
description: Server error
delete:
operationId: deleteWatch
tags: [Watch Management]
summary: Delete watch
description: Delete a web page change monitor (watch) and all related history
x-code-samples:
- lang: 'curl'
source: |
curl -X DELETE "http://localhost:5000/api/v1/watch/095be615-a8ad-4c33-8e9c-c7612fbf6c9f" \
-H "x-api-key: YOUR_API_KEY"
- lang: 'Python'
source: |
import requests
headers = {'x-api-key': 'YOUR_API_KEY'}
uuid = '095be615-a8ad-4c33-8e9c-c7612fbf6c9f'
response = requests.delete(f'http://localhost:5000/api/v1/watch/{uuid}', headers=headers)
print(response.text)
parameters:
- name: uuid
in: path
required: true
description: Web page change monitor (watch) unique ID
schema:
type: string
format: uuid
responses:
'200':
description: Web page change monitor (watch) deleted successfully
content:
text/plain:
schema:
type: string
example: "OK"
/watch/{uuid}/history:
get:
operationId: getWatchHistory
tags: [Watch History]
summary: Get watch history
description: Get a list of all historical snapshots available for a web page change monitor (watch)
x-code-samples:
- lang: 'curl'
source: |
curl -X GET "http://localhost:5000/api/v1/watch/095be615-a8ad-4c33-8e9c-c7612fbf6c9f/history" \
-H "x-api-key: YOUR_API_KEY"
- lang: 'Python'
source: |
import requests
headers = {'x-api-key': 'YOUR_API_KEY'}
uuid = '095be615-a8ad-4c33-8e9c-c7612fbf6c9f'
response = requests.get(f'http://localhost:5000/api/v1/watch/{uuid}/history', headers=headers)
print(response.json())
parameters:
- name: uuid
in: path
required: true
description: Web page change monitor (watch) unique ID
schema:
type: string
format: uuid
responses:
'200':
description: List of available snapshots
content:
application/json:
schema:
$ref: '#/components/schemas/WatchHistory'
example:
"1640995200": "/path/to/snapshot1.txt"
"1640998800": "/path/to/snapshot2.txt"
'404':
description: Web page change monitor (watch) not found
/watch/{uuid}/history/{timestamp}:
get:
operationId: getWatchSnapshot
tags: [Snapshots]
summary: Get single snapshot
description: Get single snapshot from web page change monitor (watch). Use 'latest' for the most recent snapshot.
x-code-samples:
- lang: 'curl'
source: |
curl -X GET "http://localhost:5000/api/v1/watch/095be615-a8ad-4c33-8e9c-c7612fbf6c9f/history/latest" \
-H "x-api-key: YOUR_API_KEY"
- lang: 'Python'
source: |
import requests
headers = {'x-api-key': 'YOUR_API_KEY'}
uuid = '095be615-a8ad-4c33-8e9c-c7612fbf6c9f'
timestamp = 'latest' # or use specific timestamp like 1640995200
response = requests.get(f'http://localhost:5000/api/v1/watch/{uuid}/history/{timestamp}', headers=headers)
print(response.text)
parameters:
- name: uuid
in: path
required: true
description: Web page change monitor (watch) unique ID
schema:
type: string
format: uuid
- name: timestamp
in: path
required: true
description: Snapshot timestamp or 'latest'
schema:
oneOf:
- type: integer
- type: string
enum: [latest]
- name: html
in: query
description: Set to 1 to return the last HTML
schema:
type: string
enum: ["1"]
responses:
'200':
description: Snapshot content
content:
text/plain:
schema:
type: string
'404':
description: Snapshot not found
/watch/{uuid}/favicon:
get:
operationId: getWatchFavicon
tags: [Favicon]
summary: Get watch favicon
description: Get the favicon for a web page change monitor (watch) as displayed in the watch overview list.
x-code-samples:
- lang: 'curl'
source: |
curl -X GET "http://localhost:5000/api/v1/watch/095be615-a8ad-4c33-8e9c-c7612fbf6c9f/favicon" \
-H "x-api-key: YOUR_API_KEY" \
--output favicon.ico
- lang: 'Python'
source: |
import requests
headers = {'x-api-key': 'YOUR_API_KEY'}
uuid = '095be615-a8ad-4c33-8e9c-c7612fbf6c9f'
response = requests.get(f'http://localhost:5000/api/v1/watch/{uuid}/favicon', headers=headers)
with open('favicon.ico', 'wb') as f:
f.write(response.content)
parameters:
- name: uuid
in: path
required: true
description: Web page change monitor (watch) unique ID
schema:
type: string
format: uuid
responses:
'200':
description: Favicon binary data
content:
image/*:
schema:
type: string
format: binary
'404':
description: Favicon not found
/tags:
get:
operationId: listTags
tags: [Group / Tag Management]
summary: List all tags
description: Return list of available tags/groups
x-code-samples:
- lang: 'curl'
source: |
curl -X GET "http://localhost:5000/api/v1/tags" \
-H "x-api-key: YOUR_API_KEY"
- lang: 'Python'
source: |
import requests
headers = {'x-api-key': 'YOUR_API_KEY'}
response = requests.get('http://localhost:5000/api/v1/tags', headers=headers)
print(response.json())
responses:
'200':
description: List of tags
content:
application/json:
schema:
type: object
additionalProperties:
$ref: '#/components/schemas/Tag'
example:
"550e8400-e29b-41d4-a716-446655440000":
uuid: "550e8400-e29b-41d4-a716-446655440000"
title: "Production Sites"
notification_urls: ["mailto:admin@example.com"]
notification_muted: false
"330e8400-e29b-41d4-a716-446655440001":
uuid: "330e8400-e29b-41d4-a716-446655440001"
title: "News Sources"
notification_urls: ["discord://webhook_id/webhook_token"]
notification_muted: false
/tag:
post:
operationId: createTag
tags: [Group / Tag Management]
summary: Create tag
description: Create a single tag/group
x-code-samples:
- lang: 'curl'
source: |
curl -X POST "http://localhost:5000/api/v1/tag" \
-H "x-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"title": "Important Sites"
}'
- lang: 'Python'
source: |
import requests
headers = {
'x-api-key': 'YOUR_API_KEY',
'Content-Type': 'application/json'
}
data = {'title': 'Important Sites'}
response = requests.post('http://localhost:5000/api/v1/tag',
headers=headers, json=data)
print(response.json())
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/CreateTag'
example:
title: "Important Sites"
responses:
'201':
description: Tag created successfully
content:
application/json:
schema:
type: object
properties:
uuid:
type: string
format: uuid
description: UUID of the created tag
'400':
description: Invalid or unsupported tag
/tag/{uuid}:
get:
operationId: getTag
tags: [Group / Tag Management]
summary: Get single tag
description: Retrieve tag information, set notification_muted status, recheck all web page change monitors (watches) in tag.
x-code-samples:
- lang: 'curl'
source: |
curl -X GET "http://localhost:5000/api/v1/tag/550e8400-e29b-41d4-a716-446655440000" \
-H "x-api-key: YOUR_API_KEY"
- lang: 'Python'
source: |
import requests
headers = {'x-api-key': 'YOUR_API_KEY'}
tag_uuid = '550e8400-e29b-41d4-a716-446655440000'
response = requests.get(f'http://localhost:5000/api/v1/tag/{tag_uuid}', headers=headers)
print(response.json())
parameters:
- name: uuid
in: path
required: true
description: Tag unique ID
schema:
type: string
format: uuid
- name: muted
in: query
description: Set mute state
schema:
type: string
enum: [muted, unmuted]
- name: recheck
in: query
description: Queue all web page change monitors (watches) with this tag for recheck
schema:
type: string
enum: ["true"]
responses:
'200':
description: Tag information or operation result
content:
application/json:
schema:
$ref: '#/components/schemas/Tag'
text/plain:
schema:
type: string
example: "OK"
'404':
description: Tag not found
put:
operationId: updateTag
tags: [Group / Tag Management]
summary: Update tag
description: Update an existing tag using JSON
x-code-samples:
- lang: 'curl'
source: |
curl -X PUT "http://localhost:5000/api/v1/tag/550e8400-e29b-41d4-a716-446655440000" \
-H "x-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"title": "Updated Production Sites",
"notification_muted": false
}'
- lang: 'Python'
source: |
import requests
headers = {
'x-api-key': 'YOUR_API_KEY',
'Content-Type': 'application/json'
}
tag_uuid = '550e8400-e29b-41d4-a716-446655440000'
data = {
'title': 'Updated Production Sites',
'notification_muted': False
}
response = requests.put(f'http://localhost:5000/api/v1/tag/{tag_uuid}',
headers=headers, json=data)
print(response.text)
parameters:
- name: uuid
in: path
required: true
description: Tag unique ID
schema:
type: string
format: uuid
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/Tag'
responses:
'200':
description: Tag updated successfully
'500':
description: Server error
delete:
operationId: deleteTag
tags: [Group / Tag Management]
summary: Delete tag
description: Delete a tag/group and remove it from all web page change monitors (watches)
x-code-samples:
- lang: 'curl'
source: |
curl -X DELETE "http://localhost:5000/api/v1/tag/550e8400-e29b-41d4-a716-446655440000" \
-H "x-api-key: YOUR_API_KEY"
- lang: 'Python'
source: |
import requests
headers = {'x-api-key': 'YOUR_API_KEY'}
tag_uuid = '550e8400-e29b-41d4-a716-446655440000'
response = requests.delete(f'http://localhost:5000/api/v1/tag/{tag_uuid}', headers=headers)
print(response.text)
parameters:
- name: uuid
in: path
required: true
description: Tag unique ID
schema:
type: string
format: uuid
responses:
'200':
description: Tag deleted successfully