-
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathstreamarr-api.yml
More file actions
6860 lines (6841 loc) · 193 KB
/
streamarr-api.yml
File metadata and controls
6860 lines (6841 loc) · 193 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.0.2'
info:
title: 'Streamarr API'
version: '1.0.0'
description: |
This is the documentation for the Streamarr API backend.
Two primary authentication methods are supported:
- **Cookie Authentication**: A valid sign-in to the `/auth/plex` or `/auth/local` will generate a valid authentication cookie.
- **API Key Authentication**: Sign-in is also possible by passing an `X-Api-Key` header along with a valid API Key generated by Streamarr.
tags:
- name: public
description: Public API endpoints requiring no authentication.
- name: settings
description: Endpoints related to Streamarr's settings and configuration.
- name: auth
description: Endpoints related to logging in or out, and the currently authenticated user.
- name: users
description: Endpoints related to user management.
- name: calendar
description: Endpoints related to calendar events.
- name: downloads
description: Endpoints related to torrent download client management and operations.
servers:
- url: '{server}/api/v1'
variables:
server:
default: http://localhost:3000
components:
schemas:
CalendarEvent:
type: object
properties:
id:
type: integer
description: Event ID
readOnly: true
type:
type: string
example: local
description: Event type (e.g., local, sonarr, radarr)
start:
type: string
format: date-time
description: Event start date and time
end:
type: string
format: date-time
description: Event end date and time
summary:
type: string
description: Event summary/title
description:
type: string
description: Event description/details
uid:
type: string
description: Unique event identifier
categories:
type: string
description: Event categories
status:
type: string
enum: [TENTATIVE, CONFIRMED, CANCELLED]
description: Event status
allDay:
type: boolean
description: Whether the event is an all-day event
default: false
sendNotification:
type: boolean
description: Whether to send notifications for this event
default: false
createdAt:
type: string
format: date-time
readOnly: true
updatedAt:
type: string
format: date-time
readOnly: true
createdBy:
$ref: '#/components/schemas/User'
updatedBy:
$ref: '#/components/schemas/User'
CalendarEventRequest:
type: object
required:
- summary
- description
- start
- categories
properties:
uid:
type: string
description: Unique event identifier (optional, will be auto-generated if not provided)
summary:
type: string
description: Event summary/title
description:
type: string
description: Event description/details
start:
type: string
format: date-time
description: Event start date and time
end:
type: string
format: date-time
description: Event end date and time
categories:
type: string
description: Event categories
status:
type: string
enum: [TENTATIVE, CONFIRMED, CANCELLED]
description: Event status
default: TENTATIVE
allDay:
type: boolean
description: Whether the event is an all-day event
default: false
sendNotification:
type: boolean
description: Whether to send notifications for this event
default: false
User:
type: object
properties:
id:
type: integer
example: 1
readOnly: true
email:
type: string
example: 'hey@itsme.com'
readOnly: true
username:
type: string
plexToken:
type: string
readOnly: true
plexUsername:
type: string
readOnly: true
userType:
type: integer
example: 1
readOnly: true
permissions:
type: number
example: 0
avatar:
type: string
readOnly: true
createdAt:
type: string
example: '2020-09-02T05:02:23.000Z'
readOnly: true
updatedAt:
type: string
example: '2020-09-02T05:02:23.000Z'
readOnly: true
required:
- id
- email
- createdAt
- updatedAt
UserSettings:
type: object
properties:
locale:
type: string
region:
type: string
originalLanguage:
type: string
MainSettings:
type: object
properties:
apiKey:
type: string
readOnly: true
appLanguage:
type: string
example: en
applicationTitle:
type: string
example: Streamarr
applicationUrl:
type: string
example: https://example.com
trustProxy:
type: boolean
example: true
csrfProtection:
type: boolean
example: false
localLogin:
type: boolean
example: true
newPlexLogin:
type: boolean
example: true
defaultPermissions:
type: number
example: 32
customLogo:
type: string
nullable: true
description: URL path to custom uploaded logo file
example: '/logos/logo_full.png'
customLogoSmall:
type: string
nullable: true
description: URL path to custom uploaded small logo file
example: '/logos/logo_sm.png'
enableTrialPeriod:
type: boolean
example: false
description: Enable trial period for new users
trialPeriodDays:
type: integer
minimum: 1
maximum: 90
example: 30
description: Number of days for trial period (only applies when enableTrialPeriod is true)
PlexLibrary:
type: object
properties:
id:
type: string
name:
type: string
example: Movies
enabled:
type: boolean
example: false
required:
- id
- name
- enabled
LibraryLink:
type: object
properties:
id:
type: string
description: The unique identifier of the library
example: '1'
name:
type: string
description: The display name of the library
example: 'Movies'
type:
type: string
enum: [movie, show]
description: The type of media in the library
example: 'movie'
mediaCount:
type: integer
description: The total number of media items in the library
example: 1250
href:
type: string
description: The Plex web URL for accessing the library
example: '/watch/web/index.html#!/media/123456789/com.plexapp.plugins.library?source=1'
regExp:
type: string
description: Regular expression pattern for URL matching
example: '(?=(\\/(.*)=\\1&pivot))'
hasPlaylists:
type: boolean
description: Whether this library has items in at least one playlist
example: true
required:
- id
- name
- type
- mediaCount
- href
- regExp
- hasPlaylists
PlexSettings:
type: object
properties:
name:
type: string
example: 'Main Server'
readOnly: true
machineId:
type: string
example: '1234123412341234'
readOnly: true
ip:
type: string
example: '127.0.0.1'
port:
type: number
example: 32400
useSsl:
type: boolean
nullable: true
libraries:
type: array
readOnly: true
items:
$ref: '#/components/schemas/PlexLibrary'
enablePlaylists:
type: boolean
description: Whether playlists menu item and pivot option are enabled
example: false
defaultPivot:
type: string
description: The default pivot view when a library is selected
enum: [library, collections, categories]
example: 'library'
required:
- name
- machineId
- ip
- port
PlexConnection:
type: object
properties:
protocol:
type: string
example: 'https'
address:
type: string
example: '127.0.0.1'
port:
type: number
example: 32400
uri:
type: string
example: 'https://127-0-0-1.2ab6ce1a093d465e910def96cf4e4799.plex.direct:32400'
local:
type: boolean
example: true
status:
type: number
example: 200
message:
type: string
example: 'OK'
required:
- protocol
- address
- port
- uri
- local
PlexDevice:
type: object
properties:
name:
type: string
example: 'My Plex Server'
product:
type: string
example: 'Plex Media Server'
productVersion:
type: string
example: '1.21'
platform:
type: string
example: 'Linux'
platformVersion:
type: string
example: 'default/linux/amd64/17.1/systemd'
device:
type: string
example: 'PC'
clientIdentifier:
type: string
example: '85a943ce-a0cc-4d2a-a4ec-f74f06e40feb'
createdAt:
type: string
example: '2021-01-01T00:00:00.000Z'
lastSeenAt:
type: string
example: '2021-01-01T00:00:00.000Z'
provides:
type: array
items:
type: string
example: 'server'
owned:
type: boolean
example: true
ownerID:
type: string
example: '12345'
home:
type: boolean
example: true
sourceTitle:
type: string
example: 'xyzabc'
accessToken:
type: string
example: 'supersecretaccesstoken'
publicAddress:
type: string
example: '127.0.0.1'
httpsRequired:
type: boolean
example: true
synced:
type: boolean
example: true
relay:
type: boolean
example: true
dnsRebindingProtection:
type: boolean
example: false
natLoopbackSupported:
type: boolean
example: false
publicAddressMatches:
type: boolean
example: false
presence:
type: boolean
example: true
connection:
type: array
items:
$ref: '#/components/schemas/PlexConnection'
required:
- name
- product
- productVersion
- platform
- device
- clientIdentifier
- createdAt
- lastSeenAt
- provides
- owned
- connection
TautulliSettings:
type: object
properties:
hostname:
type: string
nullable: true
example: 'tautulli.example.com'
port:
type: number
nullable: true
example: 8181
useSsl:
type: boolean
nullable: true
apiKey:
type: string
nullable: true
externalUrl:
type: string
nullable: true
RadarrSettings:
type: object
properties:
id:
type: number
example: 0
readOnly: true
name:
type: string
example: 'Radarr Main'
hostname:
type: string
example: '127.0.0.1'
port:
type: number
example: 7878
apiKey:
type: string
example: 'exampleapikey'
useSsl:
type: boolean
example: false
baseUrl:
type: string
activeProfileId:
type: number
example: 1
activeProfileName:
type: string
example: 720p/1080p
activeDirectory:
type: string
example: '/movies'
is4k:
type: boolean
example: false
minimumAvailability:
type: string
example: 'In Cinema'
isDefault:
type: boolean
example: false
externalUrl:
type: string
example: http://radarr.example.com
syncEnabled:
type: boolean
example: false
preventSearch:
type: boolean
example: false
required:
- name
- hostname
- port
- apiKey
- useSsl
- is4k
- isDefault
SonarrSettings:
type: object
properties:
id:
type: number
example: 0
readOnly: true
name:
type: string
example: 'Sonarr Main'
hostname:
type: string
example: '127.0.0.1'
port:
type: number
example: 8989
apiKey:
type: string
example: 'exampleapikey'
useSsl:
type: boolean
example: false
baseUrl:
type: string
activeProfileId:
type: number
example: 1
activeProfileName:
type: string
example: 720p/1080p
activeDirectory:
type: string
example: '/tv/'
activeLanguageProfileId:
type: number
example: 1
activeAnimeProfileId:
type: number
nullable: true
activeAnimeLanguageProfileId:
type: number
nullable: true
activeAnimeProfileName:
type: string
example: 720p/1080p
nullable: true
activeAnimeDirectory:
type: string
nullable: true
is4k:
type: boolean
example: false
enableSeasonFolders:
type: boolean
example: false
isDefault:
type: boolean
example: false
externalUrl:
type: string
example: http://radarr.example.com
syncEnabled:
type: boolean
example: false
preventSearch:
type: boolean
example: false
required:
- name
- hostname
- port
- apiKey
- useSsl
- is4k
- isDefault
ServarrTag:
type: object
properties:
id:
type: number
example: 1
label:
type: string
example: A Label
ServiceSettings:
type: object
properties:
enabled:
type: boolean
nullable: true
example: false
externalUrl:
type: string
nullable: true
DownloadClientType:
type: string
enum:
- qbittorrent
- deluge
- transmission
example: qbittorrent
DownloadClientSettings:
type: object
properties:
id:
type: number
readOnly: true
example: 0
name:
type: string
example: 'My qBittorrent'
client:
$ref: '#/components/schemas/DownloadClientType'
hostname:
type: string
example: '127.0.0.1'
port:
type: number
example: 8080
useSsl:
type: boolean
example: false
urlBase:
type: string
readOnly: true
description: Auto-generated URL base for proxy routing
example: '/qbt'
username:
type: string
nullable: true
example: 'admin'
password:
type: string
nullable: true
writeOnly: true
isDefault:
type: boolean
example: true
description: Whether this is the default download client shown in the UI
required:
- name
- client
- hostname
TorrentStatus:
type: string
enum:
- downloading
- seeding
- paused
- queued
- checking
- error
- completed
- stalled
- moving
- metadata
- incomplete
- unknown
example: downloading
TorrentAction:
type: string
enum:
- pause
- resume
- remove
- forceRecheck
- queueUp
- queueDown
- topPriority
- bottomPriority
example: pause
CategoryAction:
type: string
enum:
- create
- edit
- delete
example: create
NormalizedTorrent:
type: object
properties:
hash:
type: string
example: '5a8def1ffad4db26849d16f7c11c4854e1f2def8'
name:
type: string
example: 'Ubuntu 22.04 LTS'
status:
$ref: '#/components/schemas/TorrentStatus'
progress:
type: number
example: 75.5
description: Progress percentage (0-100)
size:
type: number
example: 3221225472
description: Total size in bytes
downloaded:
type: number
example: 2415919104
description: Downloaded bytes
uploaded:
type: number
example: 1073741824
description: Uploaded bytes
downloadSpeed:
type: number
example: 1048576
description: Download speed in bytes/sec
uploadSpeed:
type: number
example: 524288
description: Upload speed in bytes/sec
eta:
type: number
nullable: true
example: 3600
description: Estimated time remaining in seconds
peers:
type: number
example: 45
seeds:
type: number
example: 120
ratio:
type: number
example: 1.5
label:
type: string
nullable: true
example: 'movies'
category:
type: string
nullable: true
example: 'movies'
tags:
type: array
items:
type: string
example: ['movies', 'hd']
dateAdded:
type: string
format: date-time
example: '2024-01-25T10:00:00Z'
dateCompleted:
type: string
format: date-time
nullable: true
example: '2024-01-25T12:30:00Z'
savePath:
type: string
example: '/downloads/movies'
clientId:
type: number
example: 0
description: ID of the download client
clientName:
type: string
example: 'My qBittorrent'
priority:
type: number
description: Queue position/priority number. All clients show queue position. -1 if qBittorrent queueing is disabled.
nullable: true
example: 5
TorrentStats:
type: object
properties:
clientId:
type: number
example: 0
description: Download client ID
clientName:
type: string
example: 'qBittorrent'
description: Download client name
clientType:
type: string
enum: [qbittorrent, deluge, transmission]
example: 'qbittorrent'
description: Download client type
connected:
type: boolean
example: true
description: Whether the client is connected
error:
type: string
nullable: true
example: 'Connection refused'
description: Error message if client failed to connect
totalDownloadSpeed:
type: number
example: 5242880
description: Total download speed in bytes/sec
totalUploadSpeed:
type: number
example: 2621440
description: Total upload speed in bytes/sec
activeTorrents:
type: number
example: 5
description: Number of active (downloading/seeding) torrents
pausedTorrents:
type: number
example: 7
description: Number of paused torrents
totalTorrents:
type: number
example: 42
description: Total number of torrents
health:
type: object
nullable: true
properties:
status:
type: string
enum: [healthy, retrying, unhealthy]
example: 'healthy'
description: Health status of the client
lastError:
type: string
nullable: true
description: Last error message
cooldownUntil:
type: string
format: date-time
nullable: true
description: ISO timestamp when cooldown expires
isStale:
type: boolean
nullable: true
description: Whether the client is in cooldown
AddTorrentRequest:
type: object
properties:
clientId:
type: number
example: 0
description: Download client ID to use
torrent:
type: string
nullable: true
example: 'magnet:?xt=urn:btih:...'
description: Magnet link or torrent URL
file:
type: string
nullable: true
description: Base64-encoded .torrent file content
category:
type: string
nullable: true
example: 'movies'
savePath:
type: string
nullable: true
example: '/downloads/movies'
paused:
type: boolean
nullable: true
description: Whether to add torrent in paused state
required:
- clientId
CategoryActionRequest:
type: object
properties:
clientId:
type: number
example: 0
description: Download client ID (qBittorrent for categories, Deluge for labels, Transmission not supported)
action:
type: string
enum: [create, edit, delete]
example: create
description: Action to perform on the category
category:
type: string
example: 'movies'
description: Category/label name
savePath:
type: string
nullable: true
example: '/downloads/movies'
description: Save path for create/edit actions
required:
- clientId
- action
- category
TagActionRequest:
type: object
properties:
clientId:
type: number
example: 0
description: Download client ID (qBittorrent for full tag support, Transmission for per-torrent labels, Deluge not supported)
action:
type: string
enum: [create, delete, add, remove]
example: add
description: Action to perform on tags
tags:
type: array
items:
type: string
example: ['movies', 'hd']
description: Tag names to create/delete/add/remove
hashes:
type: array
items:
type: string
nullable: true
description: Torrent hashes (required for add and remove actions)
required:
- clientId
- action
- tags
TestConnectionResponse:
type: object
properties:
connected:
type: boolean
example: true
version:
type: string
nullable: true
example: 'v4.5.2'
error:
type: string
nullable: true
example: 'Connection refused'
TorrentFile:
type: object
properties:
name:
type: string
description: File name (including relative path)
size:
type: number
description: File size in bytes
progress:
type: number
description: File progress (percentage/100)
priority:
type: number
description: File priority (0=skip, 1=normal, 6=high, 7=maximum)
is_seed:
type: boolean
description: True if file is seeding/complete
piece_range:
type: array
items:
type: number
description: Starting and ending piece indices
availability:
type: number
description: Percentage of file pieces currently available
index:
type: number
description: File index
DownloadsResponse:
type: object
properties:
results:
type: array
items:
$ref: '#/components/schemas/NormalizedTorrent'
stats:
type: array
items:
$ref: '#/components/schemas/TorrentStats'
pageInfo:
type: object
properties:
pages:
type: number
example: 3
description: Total number of pages
page:
type: number
example: 1