]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - support/doc/api/openapi.yaml
Allow user to search through their watch history (#3576)
[github/Chocobozzz/PeerTube.git] / support / doc / api / openapi.yaml
index 4f9bca72931f1681ac39aafdc9d59c1fff1ff4be..8ad98a9a9a13933a510467e8ef552ef356490f32 100644 (file)
@@ -1,7 +1,7 @@
 openapi: 3.0.0
 info:
   title: PeerTube
-  version: 2.4.0
+  version: 3.0.1
   contact:
     name: PeerTube Community
     url: 'https://joinpeertube.org'
@@ -72,7 +72,7 @@ tags:
       new videos, and how to keep up to date with their latest publications!
   - name: My History
     description: >
-      Operations related to your watch history. 
+      Operations related to your watch history.
   - name: My Notifications
     description: >
       Notifications following new videos, follows or reports. They allow you
@@ -356,15 +356,17 @@ paths:
         - name: state
           in: path
           required: true
-          description: The state of the job
+          description: The state of the job ('' for for no filter)
           schema:
             type: string
             enum:
+              - ''
               - active
               - completed
               - failed
               - waiting
               - delayed
+        - $ref: '#/components/parameters/jobType'
         - $ref: '#/components/parameters/start'
         - $ref: '#/components/parameters/count'
         - $ref: '#/components/parameters/sort'
@@ -931,6 +933,7 @@ paths:
       parameters:
         - $ref: '#/components/parameters/start'
         - $ref: '#/components/parameters/count'
+        - $ref: '#/components/parameters/search'
       responses:
         '200':
           description: successful operation
@@ -1312,20 +1315,24 @@ paths:
             application/json:
               schema:
                 $ref: '#/components/schemas/VideoUploadResponse'
+        '400':
+          description: invalid file field, schedule date or parameter
         '403':
-          description: user video quota is exceeded with this video
+          description: video didn't pass upload filter
         '408':
           description: upload has timed out
         '413':
-          description: video file too large
+          description: video file too large, due to quota or max body size limit set by the reverse-proxy
           headers:
             X-File-Maximum-Size:
               schema:
                 type: string
                 format: Nginx size
               description: Maximum file size for the video
+        '415':
+          description: video type unsupported
         '422':
-          description: invalid input file
+          description: video unreadable
       requestBody:
         content:
           multipart/form-data:
@@ -1534,10 +1541,12 @@ paths:
             application/json:
               schema:
                 $ref: '#/components/schemas/VideoUploadResponse'
-        '409':
-          description: HTTP or Torrent/magnetURI import not enabled
         '400':
           description: '`magnetUri` or `targetUrl` or a torrent file missing'
+        '403':
+          description: video didn't pass pre-import filter
+        '409':
+          description: HTTP or Torrent/magnetURI import not enabled
 
   /videos/live:
     post:
@@ -1567,6 +1576,9 @@ paths:
                   type: integer
                 saveReplay:
                   type: boolean
+                permanentLive:
+                  description: User can stream multiple times in a permanent live
+                  type: boolean
                 thumbnailfile:
                   description: Live video/replay thumbnail file
                   type: string
@@ -3569,7 +3581,7 @@ components:
       name: name
       in: path
       required: true
-      description: The name of the account
+      description: The username or handle of the account
       schema:
         type: string
         example: chocobozzz | chocobozzz@example.org
@@ -3771,6 +3783,26 @@ components:
       schema:
         type: string
         example: peertube-plugin-auth-ldap
+    jobType:
+      name: jobType
+      in: query
+      required: false
+      description: job type
+      schema:
+        type: string
+        enum:
+          - activitypub-follow
+          - activitypub-http-broadcast
+          - activitypub-http-fetcher
+          - activitypub-http-unicast
+          - email
+          - video-transcoding
+          - video-file-import
+          - video-import
+          - videos-views
+          - activitypub-refresher
+          - video-redundancy
+          - video-live-ending
   securitySchemes:
     OAuth2:
       description: >
@@ -3910,7 +3942,7 @@ components:
       properties:
         id:
           type: integer
-          description: 'Video resolution (240, 360, 720 ...)'
+          description: 'Video resolution (240, 360, 720, 1080, 1440 or 2160)'
           example: 240
         label:
           type: string
@@ -4798,6 +4830,8 @@ components:
                   type: boolean
                 1080p:
                   type: boolean
+                1440p:
+                  type: boolean
                 2160p:
                   type: boolean
             hls:
@@ -5172,7 +5206,7 @@ components:
           properties:
             name:
               type: string
-              description: The name for the default channel
+              description: The username for the default channel
               pattern: '/^[ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789\\-_.:]+$/'
             displayName:
               type: string
@@ -5614,6 +5648,9 @@ components:
       properties:
         saveReplay:
           type: boolean
+        permanentLive:
+          description: User can stream multiple times in a permanent live
+          type: boolean
 
     LiveVideoResponse:
       properties:
@@ -5624,6 +5661,9 @@ components:
           description: RTMP stream key to use to stream into this live video
         saveReplay:
           type: boolean
+        permanentLive:
+          description: User can stream multiple times in a permanent live
+          type: boolean
 
   callbacks:
     searchIndex: