Merge pull request #793 from gpodder/remove-advertise
[mygpo.git] / mygpo / api / openapi.yaml
blobd85c1213598ce3034e105a2f7a83e34c92f33a4c
1 openapi: 3.0.0
2 info:
3   description: "gpodder.net APIs"
4   version: "2.11.0"
5   title: "gpodder.net APIs"
6   contact:
7     url: "https://gpoddernet.readthedocs.io/en/latest/api/"
8   license:
9     name: "GNU Affero General Public License v3.0"
10     url: "https://github.com/podStation/mygpo/blob/master/COPYING"
11 servers:
12   - url: https://gpodder.net
13     description: "Client parametrization server"
14 tags:
15 - name: "Client Parametrization"
16   externalDocs:
17     description: "Find out more"
18     url: "https://gpoddernet.readthedocs.io/en/latest/api/reference/clientconfig.html"
19 - name: "Authentication"
20   externalDocs:
21     description: "Find out more"
22     url: "https://gpoddernet.readthedocs.io/en/latest/api/reference/auth.html"
23 - name: "Directory"
24   externalDocs:
25     description: "Find out more"
26     url: "https://gpoddernet.readthedocs.io/en/latest/api/reference/directory.html"
27 - name: "Suggestions"
28   externalDocs:
29     description: "Find out more"
30     url: "https://gpoddernet.readthedocs.io/en/latest/api/reference/suggestions.html"
31 - name: "Device"
32   externalDocs:
33     description: "Find out more"
34     url: "https://gpoddernet.readthedocs.io/en/latest/api/reference/suggestions.html"
35 - name: "Device Synchronization"
36   externalDocs:
37     description: "Find out more"
38     url: "https://gpoddernet.readthedocs.io/en/latest/api/reference/sync.html"
39 - name: "Subscriptions"
40   externalDocs:
41     description: "Find out more"
42     url: "https://gpoddernet.readthedocs.io/en/latest/api/reference/subscriptions.html"
43 - name: "Episode Actions"
44   externalDocs:
45     description: "Find out more"
46     url: "https://gpoddernet.readthedocs.io/en/latest/api/reference/events.html"
47 - name: "Settings"
48   externalDocs:
49     description: "Find out more"
50     url: "https://gpoddernet.readthedocs.io/en/latest/api/reference/settings.html"
51 - name: "Podcast Lists"
52   externalDocs:
53     description: "Find out more"
54     url: "https://gpoddernet.readthedocs.io/en/latest/api/reference/podcastlists.html"
55 paths:
56   /clientconfig.json:
57     get:
58       tags:
59       - "Client Parametrization"
60       summary: "Retrieves client parametrization"
61       description: ""
62       operationId: "getClientParametrization"
63       responses:
64         200:
65           description: "Ok"
66           content:
67             application/json:
68               schema:
69                 $ref: "#/components/schemas/ClientConfiguration"
70   /api/2/auth/{username}/login.json:
71     post:
72       tags:
73       - "Authentication"
74       summary: Log in the given user for the given device via HTTP Basic Auth.
75       parameters:
76       - name: "username"
77         in: "path"
78         description: "Username to login"
79         required: true
80         schema:
81           type: "string"
82       security:
83         - basicAuth: []
84       responses:
85         200:
86           description: "OK"
87         401:
88           description: "Unauthorized"
89         400:
90           description: "Cookies have different username then the one provided"
91   /api/2/auth/{username}/logout.json:
92     post:
93       tags:
94       - "Authentication"
95       summary: "Log out user"
96       description: "Log out the given user. Removes the session ID from the database."
97       parameters:
98       - name: "username"
99         in: "path"
100         description: "Username to login"
101         required: true
102         schema:
103           type: "string"
104       security:
105         - basicAuth: []
106       responses:
107         200:
108           description: "OK"
109         400:
110           description: "if the client provides a cookie, but for a different username than the one given"
111   /api/2/tags/{count}.json:
112     get:
113       tags:
114       - "Directory"
115       summary: "Retrieve Top Tags"
116       parameters:
117       - name: "count"
118         in: "path"
119         description: "number of tags to return"
120         required: true
121         schema:
122           type: "integer"
123       responses:
124         200:
125           description: "OK"
126           content:
127             application/json:
128               schema:
129                 type: "object"
130   /api/2/tag/{tag}/{count}.json:
131     get:
132       tags:
133       - "Directory"
134       summary: "Retrieve Podcasts for Tag"
135       parameters:
136       - name: "count"
137         in: "path"
138         description: "maximum number of podcasts to return"
139         required: true
140         schema:
141           type: "integer"
142       - name: "tag"
143         in: "path"
144         description: "URL-encoded tag"
145         required: true
146         schema:
147           type: "string"
148       responses:
149         200:
150           description: "OK"
151           content:
152             application/json:
153               schema:
154                 type: "object"
155   /api/2/data/podcast.json:
156     get:
157       tags:
158       - "Directory"
159       summary: "Retrieve Podcast Data"
160       description: "Returns information for the podcast with the given URL or 404 if there is no podcast with this URL."
161       parameters:
162       - name: "url"
163         in: "query"
164         description: "the feed URL of the podcast"
165         required: true
166         schema:
167           type: "string"
168       responses:
169         200:
170           description: "OK"
171           content:
172             application/json:
173               schema:
174                 type: "object"
175   /api/2/data/episode.json:
176     get:
177       tags:
178       - "Directory"
179       summary: "Retrieve Episode Data"
180       description: "Returns information for the episode with the given {episode-url} that belongs to the podcast with the {podcast-url}"
181       parameters:
182       - name: "podcast-url"
183         in: "query"
184         description: "feed URL of the podcast to which the episode belongs"
185         required: true
186         schema:
187           type: "string"
188       - name: "episode-url"
189         in: "query"
190         description: "media URL of the episode"
191         required: true
192         schema:
193           type: "string"
194       responses:
195         200:
196           description: "OK"
197           content:
198             application/json:
199               schema:
200                 type: "object"
201   /toplist/{number}.{format}:
202     get:
203       tags:
204       - "Directory"
205       summary: "Podcast Toplist"
206       parameters:
207       - name: "number"
208         in: "path"
209         description: "maximum number of podcasts to return"
210         required: true
211         schema:
212           type: "integer"
213       - name: "format"
214         in: "path"
215         description: "Format of the response"
216         required: true
217         schema:
218           $ref: "#/components/schemas/Format"
219       - name: "jsonp"
220         in: "query"
221         description: "a function name on which the response is wrapped (only valid for format jsonp; since 2.8)"
222         schema:
223           type: "string"
224       - name: "scale_logo"
225         in: "query"
226         description: "returns logo URLs to scaled images"
227         schema:
228           type: "integer"
229       responses:
230         200:
231           description: "OK"
232           content:
233             application/json:
234               schema:
235                 type: "object"
236             text/plain:
237               schema:
238                 type: "string"
239             text/xml:
240               schema:
241                 type: "object"
242             application/xml:
243               schema:
244                 type: "object"
245             application/json-p:
246               schema:
247                 type: "string"
248   /search.{format}:
249     get:
250       tags:
251       - "Directory"
252       summary: "Podcast Toplist"
253       parameters:
254       - name: "format"
255         in: "path"
256         description: "Format of the response"
257         required: true
258         schema:
259           $ref: "#/components/schemas/Format"
260       - name: "q"
261         in: "query"
262         description: "search query"
263         required: true
264         schema:
265           type: "string"
266       - name: "jsonp"
267         in: "query"
268         description: "a functionname on which the response is wrapped (only valid for format jsonp; since 2.8)"
269         schema:
270           type: "string"
271       - name: "scale_logo"
272         in: "query"
273         description: "returns logo URLs to scaled images"
274         schema:
275           type: "integer"
276       responses:
277         200:
278           description: "OK"
279           content:
280             application/json:
281               schema:
282                 type: "object"
283             text/plain:
284               schema:
285                 type: "string"
286             text/xml:
287               schema:
288                 type: "object"
289             application/xml:
290               schema:
291                 type: "object"
292             application/json-p:
293               schema:
294                 type: "string"
295   /suggestions/{number}.{format}:
296     get:
297       tags:
298       - "Suggestions"
299       summary: "Retrieve Suggested Podcasts"
300       parameters:
301       - name: "number"
302         in: "path"
303         description: "maximum number of podcasts to return"
304         required: true
305         schema:
306           type: "integer"
307       - name: "format"
308         in: "path"
309         description: "Format of the response"
310         required: true
311         schema:
312           $ref: "#/components/schemas/Format"
313       - name: "jsonp"
314         in: "query"
315         description: "a functionname on which the response is wrapped (only valid for format jsonp; since 2.8)"
316         schema:
317           type: "string"
318       security:
319         - basicAuth: []
320       responses:
321         200:
322           description: "OK"
323           content:
324             application/json:
325               schema:
326                 type: "object"
327             text/plain:
328               schema:
329                 type: "string"
330             text/xml:
331               schema:
332                 type: "object"
333             application/xml:
334               schema:
335                 type: "object"
336             application/json-p:
337               schema:
338                 type: "string"
339   /api/2/devices/{username}/{deviceid}.json:
340     post:
341       tags:
342       - "Device"
343       summary: "Update Device Data"
344       parameters:
345       - name: "username"
346         in: "path"
347         description: "Username to login"
348         required: true
349         schema:
350           type: "string"
351       - name: "deviceid"
352         in: "path"
353         description: "Device Id"
354         required: true
355         schema:
356           $ref: "#/components/schemas/DeviceId"
357       security:
358         - basicAuth: []
359       requestBody:
360         required: true
361         content:
362           application/json:
363             schema:
364               $ref: '#/components/schemas/DeviceUpdateData'
365       responses:
366         200:
367           description: "OK"
368   /api/2/devices/{username}.json:
369     get:
370       tags:
371       - "Device"
372       summary: "List Devices"
373       parameters:
374       - name: "username"
375         in: "path"
376         description: "Username to login"
377         required: true
378         schema:
379           type: "string"
380       security:
381         - basicAuth: []
382       responses:
383         200:
384           description: "OK"
385           content:
386             application/json:
387               schema:
388                 type: "object"
389   /api/2/updates/{username}/{deviceid}.json:
390     get:
391       tags:
392       - "Device"
393       summary: "Get Device Updates"
394       parameters:
395       - name: "username"
396         in: "path"
397         description: "Username to login"
398         required: true
399         schema:
400           type: "string"
401       - name: "deviceid"
402         in: "path"
403         description: "Device Id"
404         required: true
405         schema:
406           $ref: "#/components/schemas/DeviceId"
407       - name: "since"
408         in: "query"
409         description: "`timestamp` when updates have last been retrieved"
410         required: true
411         schema:
412           type: "integer"
413       - name: "include_actions"
414         in: "query"
415         description: "Default: false, since 2.10"
416         schema:
417           $ref: "#/components/schemas/DeviceId"
418       security:
419         - basicAuth: []
420       responses:
421         200:
422           description: "OK"
423           content:
424             application/json:
425               schema:
426                 type: "object"
427   /api/2/sync-devices/{username}.json:
428     get:
429       tags:
430       - "Device Synchronization"
431       summary: "Get Sync Status"
432       parameters:
433       - name: "username"
434         in: "path"
435         description: "Username to login"
436         required: true
437         schema:
438           type: "string"
439       security:
440         - basicAuth: []
441       responses:
442         200:
443           description: "OK"
444           content:
445             application/json:
446               schema:
447                 type: "object"
448     post:
449       tags:
450       - "Device Synchronization"
451       summary: "Start / Stop Sync"
452       parameters:
453       - name: "username"
454         in: "path"
455         description: "Username to login"
456         required: true
457         schema:
458           type: "string"
459       security:
460         - basicAuth: []
461       requestBody:
462         required: true
463         content:
464           application/json:
465             schema:
466               $ref: '#/components/schemas/DeviceSynchronizationRequest'
467       responses:
468         200:
469           description: "OK"
470           content:
471             application/json:
472               schema:
473                 type: "object"
474   /api/2/favorites/{username}.json:
475     get:
476       tags:
477       - "Favorites"
478       summary: "Get Favorite Episodes"
479       parameters:
480       - name: "username"
481         in: "path"
482         description: "username for which the favorites should be returned"
483         required: true
484         schema:
485           type: "string"
486       security:
487         - basicAuth: []
488       responses:
489         200:
490           description: "OK"
491           content:
492             application/json:
493               schema:
494                 type: "object"
495   /subscriptions/{username}/{deviceid}.{format}:
496     get:
497       tags:
498       - "Subscriptions"
499       summary: "Update Device Data"
500       parameters:
501       - name: "username"
502         in: "path"
503         description: "username for which subscriptions should be returned"
504         required: true
505         schema:
506           type: "string"
507       - name: "deviceid"
508         in: "path"
509         description: "Device Id"
510         required: true
511         schema:
512           $ref: "#/components/schemas/DeviceId"
513       - name: "format"
514         in: "path"
515         description: "Format of the response"
516         required: true
517         schema:
518           $ref: "#/components/schemas/Format"
519       - name: "jsonp"
520         in: "query"
521         description: "a function name on which the response is wrapped (only valid for format jsonp; since 2.8)"
522         schema:
523           type: "string"
524       security:
525         - basicAuth: []
526       responses:
527         200:
528           description: "OK"
529           content:
530             application/json:
531               schema:
532                 type: "object"
533         401:
534           description: "Invalid user"
535         404:
536           description: "Invalid device ID"
537         400:
538           description: "Invalid format"
539     put:
540       tags:
541       - "Subscriptions"
542       summary: "Upload Subscriptions of Device"
543       parameters:
544       - name: "username"
545         in: "path"
546         description: "username for which subscriptions should be returned"
547         required: true
548         schema:
549           type: "string"
550       - name: "deviceid"
551         in: "path"
552         description: "Device Id"
553         required: true
554         schema:
555           $ref: "#/components/schemas/DeviceId"
556       - name: "format"
557         in: "path"
558         description: "Format of the response"
559         required: true
560         schema:
561           $ref: "#/components/schemas/Format"
562       security:
563         - basicAuth: []
564       requestBody:
565         required: true
566         content:
567           application/json:
568             schema:
569               $ref: '#/components/schemas/UploadSubscriptionRequest'
570       responses:
571         200:
572           description: "OK"
573         401:
574           description: "Invalid user"
575         400:
576           description: "Invalid format"
577   /subscriptions/{username}.{format}:
578     get:
579       tags:
580       - "Subscriptions"
581       summary: "Get All Subscriptions"
582       parameters:
583       - name: "username"
584         in: "path"
585         description: "username for which subscriptions should be returned"
586         required: true
587         schema:
588           type: "string"
589       - name: "format"
590         in: "path"
591         description: "Format of the response"
592         required: true
593         schema:
594           $ref: "#/components/schemas/Format"
595       - name: "jsonp"
596         in: "query"
597         description: "a function name on which the response is wrapped (only valid for format jsonp; since 2.8)"
598         schema:
599           type: "string"
600       security:
601         - basicAuth: []
602       responses:
603         200:
604           description: "OK"
605           content:
606             application/json:
607               schema:
608                 type: "object"
609         401:
610           description: "Invalid user"
611         400:
612           description: "Invalid format"
613   /api/2/subscriptions/{username}/{deviceid}.json:
614     post:
615       tags:
616       - "Subscriptions"
617       summary: "Upload Subscription Changes"
618       parameters:
619       - name: "username"
620         in: "path"
621         description: "username for which subscriptions should be returned"
622         required: true
623         schema:
624           type: "string"
625       - name: "deviceid"
626         in: "path"
627         description: "Device Id"
628         required: true
629         schema:
630           $ref: "#/components/schemas/DeviceId"
631       security:
632         - basicAuth: []
633       requestBody:
634         required: true
635         content:
636           application/json:
637             schema:
638               $ref: '#/components/schemas/UploadSubscriptionChangesRequest'
639       responses:
640         200:
641           description: "OK"
642           content:
643             application/json:
644               schema:
645                 type: "object"
646         400:
647           description: "Invalid format"
648     get:
649       tags:
650       - "Subscriptions"
651       summary: "Get Subscription Changes"
652       parameters:
653       - name: "username"
654         in: "path"
655         description: "username for which subscriptions should be returned"
656         required: true
657         schema:
658           type: "string"
659       - name: "deviceid"
660         in: "path"
661         description: "Device Id"
662         required: true
663         schema:
664           $ref: "#/components/schemas/DeviceId"
665       - name: "since"
666         in: "query"
667         description: "the `timestamp` value of the last response"
668         required: true
669         schema:
670           type: "integer"
671       security:
672         - basicAuth: []
673       responses:
674         200:
675           description: "OK"
676           content:
677             application/json:
678               schema:
679                 type: "object"
680   /api/2/episodes/{username}.json:
681     post:
682       tags:
683       - "Episode Actions"
684       summary: "Upload Episode Actions"
685       parameters:
686       - name: "username"
687         in: "path"
688         description: "username for which the actions will be set"
689         required: true
690         schema:
691           type: "string"
692       security:
693         - basicAuth: []
694       requestBody:
695         required: true
696         content:
697           application/json:
698             schema:
699               $ref: '#/components/schemas/SetEpisodeActionsRequest'
700       responses:
701         200:
702           description: "OK"
703           content:
704             application/json:
705               schema:
706                 type: "object"
707     get:
708       tags:
709       - "Episode Actions"
710       summary: "Get Episode Actions"
711       parameters:
712       - name: "username"
713         in: "path"
714         description: "username for which the actions will be retrieved"
715         required: true
716         schema:
717           type: "string"
718       - name: "podcast"
719         in: "query"
720         description: "The URL of a Podcast feed; if set, only actions for episodes of the given podcast are returned"
721         required: true
722         schema:
723           type: "string"
724       - name: "device"
725         in: "query"
726         description: "A Device ID; if set, only actions for the given device are returned"
727         schema:
728           type: "string"
729       - name: "since"
730         in: "query"
731         description: "Only episode actions since the given timestamp are returned"
732         schema:
733           type: "integer"
734       - name: "aggregated"
735         in: "query"
736         description: "If true, only the latest actions is returned for each episode (added in 2.1)"
737         schema:
738           type: "string"
739       security:
740         - basicAuth: []
741       responses:
742         200:
743           description: "OK"
744           content:
745             application/json:
746               schema:
747                 type: "object"
748   /api/2/settings/{username}/{scope}.json:
749     post:
750       tags:
751       - "Settings"
752       summary: "Save Settings"
753       parameters:
754       - name: "username"
755         in: "path"
756         description: "username for which the settings will be saved"
757         required: true
758         schema:
759           type: "string"
760       - name: "scope"
761         in: "path"
762         required: true
763         schema:
764           $ref: "#/components/schemas/SettingsScope"
765       - name: "podcast"
766         in: "query"
767         description: "Feed URL of a podcast (required for scope podcast and episode)"
768         schema:
769           type: "string"
770       - name: "device"
771         in: "query"
772         description: "(required for scope device)"
773         schema:
774           $ref: "#/components/schemas/DeviceId"
775       - name: "episode"
776         in: "query"
777         description: "media URL of the episode (required for scope episode)"
778         schema:
779           type: "string"
780       security:
781         - basicAuth: []
782       requestBody:
783         required: true
784         content:
785           application/json:
786             schema:
787               $ref: '#/components/schemas/SaveSettingsRequest'
788       responses:
789         200:
790           description: "OK"
791           content:
792             application/json:
793               schema:
794                 type: "object"
795     get:
796       tags:
797       - "Settings"
798       summary: "Save Settings"
799       parameters:
800       - name: "username"
801         in: "path"
802         description: "username for which the settings will be saved"
803         required: true
804         schema:
805           type: "string"
806       - name: "scope"
807         in: "path"
808         required: true
809         schema:
810           $ref: "#/components/schemas/SettingsScope"
811       - name: "podcast"
812         in: "query"
813         description: "Feed URL of a podcast (required for scope podcast and episode)"
814         schema:
815           type: "string"
816       - name: "device"
817         in: "query"
818         description: "(required for scope device)"
819         schema:
820           $ref: "#/components/schemas/DeviceId"
821       - name: "episode"
822         in: "query"
823         description: "media URL of the episode (required for scope episode)"
824         schema:
825           type: "string"
826       security:
827         - basicAuth: []
828       responses:
829         200:
830           description: "OK"
831         409:
832           description: "if the the user already has a podcast list with the (generated) name"
833   /api/2/lists/{username}/create.{format}:
834     post:
835       tags:
836       - "Podcast Lists"
837       summary: "Create Podcast List"
838       parameters:
839       - name: "username"
840         in: "path"
841         description: "username for which a new podcast list should be created"
842         required: true
843         schema:
844           type: "string"
845       - name: "format"
846         in: "path"
847         required: true
848         schema:
849           $ref: "#/components/schemas/Format"
850       - name: "title"
851         in: "query"
852         required: true
853         schema:
854           type: "string"
855       security:
856         - basicAuth: []
857       requestBody:
858         required: true
859         content:
860           application/json:
861             schema:
862               type: "array"
863               items:
864                 type: "string"
865       responses:
866         200:
867           description: "OK"
868           content:
869             application/json:
870               schema:
871                 type: "object"
872   /api/2/lists/{username}.json:
873     get:
874       tags:
875       - "Podcast Lists"
876       summary: "Get User’s Lists"
877       parameters:
878       - name: "username"
879         in: "path"
880         description: "username for which a new podcast list should be created"
881         required: true
882         schema:
883           type: "string"
884       responses:
885         200:
886           description: "OK"
887           content:
888             application/json:
889               schema:
890                 type: "object"
891         404:
892           description: "the user was not found"
893   /api/2/lists/{username}/list/{listname}.{format}:
894     get:
895       tags:
896       - "Podcast Lists"
897       summary: "Get a Podcast List"
898       parameters:
899       - name: "username"
900         in: "path"
901         description: "username for which a new podcast list should be created"
902         required: true
903         schema:
904           type: "string"
905       - name: "listname"
906         in: "path"
907         description: "name of the requested podcast list"
908         required: true
909         schema:
910           type: "string"
911       - name: "format"
912         in: "path"
913         required: true
914         schema:
915           $ref: "#/components/schemas/Format"
916       responses:
917         200:
918           description: "the podcast list is returned in in the requested format"
919           content:
920             application/json:
921               schema:
922                 type: "object"
923         404:
924           description: "if the user or the list do not exist"
925     put:
926       tags:
927       - "Podcast Lists"
928       summary: "Update a Podcast List"
929       parameters:
930       - name: "username"
931         in: "path"
932         description: "username to which the list belongs"
933         required: true
934         schema:
935           type: "string"
936       - name: "listname"
937         in: "path"
938         description: "name of the requested podcast list"
939         required: true
940         schema:
941           type: "string"
942       - name: "format"
943         in: "path"
944         required: true
945         schema:
946           $ref: "#/components/schemas/Format"
947       security:
948         - basicAuth: []
949       requestBody:
950         required: true
951         content:
952           application/json:
953             schema:
954               type: "array"
955               items:
956                 type: "string"
957       responses:
958         204:
959           description: "if the podcast list has been created / updated"
960         404:
961           description: "if the user or the list do not exist"
962     delete:
963       tags:
964       - "Podcast Lists"
965       summary: "Delete a Podcast List"
966       parameters:
967       - name: "username"
968         in: "path"
969         description: "username to which the list belongs"
970         required: true
971         schema:
972           type: "string"
973       - name: "listname"
974         in: "path"
975         description: "name of the requested podcast list"
976         required: true
977         schema:
978           type: "string"
979       - name: "format"
980         in: "path"
981         required: true
982         schema:
983           $ref: "#/components/schemas/Format"
984       security:
985         - basicAuth: []
986       responses:
987         204:
988           description: "if the podcast list has been created / updated"
989         404:
990           description: "if the podcast list has been deleted"
991 components:
992   securitySchemes:
993     basicAuth:
994       type: http
995       scheme: basic
996   schemas:
997     ClientConfiguration:
998       type: "object"
999       properties:
1000         mygpo:
1001           type: "object"
1002           properties:
1003             baseurl:
1004               type: "string"
1005               description: "URL to which the gpodder.net API Endpoints should be appended"
1006         mygpo-feedservice:
1007           properties:
1008             baseurl:
1009               type: "string"
1010               description: "Base URL of the gpodder.net feed service"
1011         update_timeout:
1012           type: "integer"
1013           description: "Time in seconds for which the values in this file can be considered valid."
1014     Format:
1015       type: "string"
1016       enum: 
1017       - "json"
1018       - "xml"
1019       - "opml"
1020       - "txt"
1021       - "jsonp"
1022     DeviceId:
1023       type: "string"
1024       pattern: "^[\\w.-]+$"
1025     DeviceUpdateData:
1026       type: "object"
1027       properties:
1028         caption:
1029           type: "string"
1030         type:
1031           type: "string"
1032           enum:
1033           - "desktop"
1034           - "laptop"
1035           - "mobile"
1036           - "server"
1037           - "other"
1038     DeviceSynchronizationRequest:
1039       type: "object"
1040       properties:
1041         synchronize:
1042           type: "array"
1043           items:
1044             type: "array"
1045             items:
1046               $ref: "#/components/schemas/DeviceId"
1047         stop-synchronize:
1048           type: "array"
1049           items:
1050             $ref: "#/components/schemas/DeviceId"
1051     UploadSubscriptionRequest:
1052       type: "array"
1053       items:
1054         $ref: "#/components/schemas/DeviceId"
1055     UploadSubscriptionChangesRequest:
1056       type: "object"
1057       properties:
1058         add:
1059           type: "array"
1060           items:
1061             $ref: "#/components/schemas/DeviceId"
1062         remove:
1063           type: "array"
1064           items:
1065             $ref: "#/components/schemas/DeviceId"
1066     EpisodeActionTypes:
1067       type: "string"
1068       enum:
1069       - "download"
1070       - "delete"
1071       - "play"
1072       - "new"
1073       - "flattr"
1074     SetEpisodeActionsRequest:
1075       type: "array"
1076       items:
1077         type: "object"
1078         properties:
1079           podcast:
1080             type: "string"
1081           episode:
1082             type: "string"
1083           device:
1084             $ref: "#/components/schemas/DeviceId"
1085           action:
1086             $ref: "#/components/schemas/EpisodeActionTypes"
1087           timestamp:
1088             type: "integer"
1089           started:
1090             type: "integer"
1091           position:
1092             type: "integer"
1093           total:
1094             type: "integer"
1095     SettingsScope:
1096       type: "string"
1097       enum:
1098       - "account"
1099       - "device"
1100       - "podcast"
1101       - "episode"
1102     SaveSettingsRequest:
1103       type: "object"
1104       properties:
1105         set:
1106           type: "object"
1107         remove:
1108           type: "array"
1109           items:
1110             type: "string"