aboutsummaryrefslogtreecommitdiffhomepage
path: root/support
diff options
context:
space:
mode:
Diffstat (limited to 'support')
-rw-r--r--support/doc/api/openapi.yaml179
1 files changed, 172 insertions, 7 deletions
diff --git a/support/doc/api/openapi.yaml b/support/doc/api/openapi.yaml
index 0afa58709..33cb4bb23 100644
--- a/support/doc/api/openapi.yaml
+++ b/support/doc/api/openapi.yaml
@@ -66,6 +66,12 @@ tags:
66 server then deals with inter-server ActivityPub operations and propagates 66 server then deals with inter-server ActivityPub operations and propagates
67 information across its social graph by posting activities to actors' inbox 67 information across its social graph by posting activities to actors' inbox
68 endpoints. 68 endpoints.
69 - name: Instance Redundancy
70 description: >
71 Redundancy is part of the inter-server solidarity that PeerTube fosters.
72 Manage the list of instances you wish to help by seeding their videos according
73 to the policy of video selection of your choice. Note that you have a similar functionality
74 to mirror individual videos, see `Video Mirroring`.
69 - name: Video Abuses 75 - name: Video Abuses
70 description: | 76 description: |
71 Video abuses deal with reports of local or remote videos alike. 77 Video abuses deal with reports of local or remote videos alike.
@@ -113,12 +119,13 @@ x-tagGroups:
113 - name: Videos 119 - name: Videos
114 tags: 120 tags:
115 - Video 121 - Video
116 - Video Caption 122 - Video Captions
117 - Video Channels 123 - Video Channels
118 - Video Comments 124 - Video Comments
119 - Video Rates 125 - Video Rates
120 - Video Playlists 126 - Video Playlists
121 - Video Ownership Change 127 - Video Ownership Change
128 - Video Mirroring
122 - Feeds 129 - Feeds
123 - name: Search 130 - name: Search
124 tags: 131 tags:
@@ -133,6 +140,7 @@ x-tagGroups:
133 tags: 140 tags:
134 - Config 141 - Config
135 - Instance Follows 142 - Instance Follows
143 - Instance Redundancy
136 - name: Jobs 144 - name: Jobs
137 tags: 145 tags:
138 - Job 146 - Job
@@ -1525,7 +1533,7 @@ paths:
1525 get: 1533 get:
1526 summary: List captions of a video 1534 summary: List captions of a video
1527 tags: 1535 tags:
1528 - Video Caption 1536 - Video Captions
1529 parameters: 1537 parameters:
1530 - $ref: '#/components/parameters/idOrUUID' 1538 - $ref: '#/components/parameters/idOrUUID'
1531 responses: 1539 responses:
@@ -1546,7 +1554,7 @@ paths:
1546 put: 1554 put:
1547 summary: Add or replace a video caption 1555 summary: Add or replace a video caption
1548 tags: 1556 tags:
1549 - Video Caption 1557 - Video Captions
1550 parameters: 1558 parameters:
1551 - $ref: '#/components/parameters/idOrUUID' 1559 - $ref: '#/components/parameters/idOrUUID'
1552 - $ref: '#/components/parameters/captionLanguage' 1560 - $ref: '#/components/parameters/captionLanguage'
@@ -1571,7 +1579,7 @@ paths:
1571 delete: 1579 delete:
1572 summary: Delete a video caption 1580 summary: Delete a video caption
1573 tags: 1581 tags:
1574 - Video Caption 1582 - Video Captions
1575 parameters: 1583 parameters:
1576 - $ref: '#/components/parameters/idOrUUID' 1584 - $ref: '#/components/parameters/idOrUUID'
1577 - $ref: '#/components/parameters/captionLanguage' 1585 - $ref: '#/components/parameters/captionLanguage'
@@ -2360,6 +2368,113 @@ paths:
2360 description: successful operation 2368 description: successful operation
2361 '404': 2369 '404':
2362 description: account block does not exist 2370 description: account block does not exist
2371 /redundancy/{host}:
2372 put:
2373 tags:
2374 - Instance Redundancy
2375 summary: Update a server redundancy policy
2376 security:
2377 - OAuth2:
2378 - admin
2379 parameters:
2380 - name: host
2381 in: path
2382 required: true
2383 description: server domain to mirror
2384 schema:
2385 type: string
2386 requestBody:
2387 content:
2388 application/json:
2389 schema:
2390 type: object
2391 properties:
2392 redundancyAllowed:
2393 type: boolean
2394 description: allow mirroring of the host's local videos
2395 required:
2396 - redundancyAllowed
2397 responses:
2398 '204':
2399 description: successful operation
2400 '404':
2401 description: server is not already known
2402 /redundancy/videos:
2403 get:
2404 tags:
2405 - Video Mirroring
2406 summary: List videos being mirrored
2407 security:
2408 - OAuth2:
2409 - admin
2410 parameters:
2411 - name: target
2412 in: query
2413 required: true
2414 description: direction of the mirror
2415 schema:
2416 type: string
2417 enum:
2418 - my-videos
2419 - remote-videos
2420 - $ref: '#/components/parameters/start'
2421 - $ref: '#/components/parameters/count'
2422 - $ref: '#/components/parameters/videoRedundanciesSort'
2423 responses:
2424 '200':
2425 description: successful operation
2426 content:
2427 application/json:
2428 schema:
2429 type: array
2430 items:
2431 $ref: '#/components/schemas/VideoRedundancy'
2432 post:
2433 tags:
2434 - Video Mirroring
2435 summary: Mirror a video
2436 security:
2437 - OAuth2:
2438 - admin
2439 requestBody:
2440 content:
2441 application/json:
2442 schema:
2443 type: object
2444 properties:
2445 videoId:
2446 type: string
2447 required:
2448 - videoId
2449 responses:
2450 '204':
2451 description: successful operation
2452 '400':
2453 description: cannot mirror a local video
2454 '404':
2455 description: video does not exist
2456 '409':
2457 description: video is already mirrored
2458 /redundancy/videos/{redundancyId}:
2459 delete:
2460 tags:
2461 - Video Mirroring
2462 summary: Delete a mirror done on a video
2463 security:
2464 - OAuth2:
2465 - admin
2466 parameters:
2467 - name: redundancyId
2468 in: path
2469 required: true
2470 description: id of an existing redundancy on a video
2471 schema:
2472 type: string
2473 responses:
2474 '204':
2475 description: successful operation
2476 '404':
2477 description: video redundancy not found
2363 '/feeds/video-comments.{format}': 2478 '/feeds/video-comments.{format}':
2364 get: 2479 get:
2365 tags: 2480 tags:
@@ -2551,7 +2666,7 @@ components:
2551 schema: 2666 schema:
2552 type: string 2667 type: string
2553 enum: 2668 enum:
2554 - -name 2669 - name
2555 - -duration 2670 - -duration
2556 - -createdAt 2671 - -createdAt
2557 - -publishedAt 2672 - -publishedAt
@@ -2566,7 +2681,7 @@ components:
2566 schema: 2681 schema:
2567 type: string 2682 type: string
2568 enum: 2683 enum:
2569 - -name 2684 - name
2570 - -duration 2685 - -duration
2571 - -createdAt 2686 - -createdAt
2572 - -publishedAt 2687 - -publishedAt
@@ -2592,7 +2707,7 @@ components:
2592 type: string 2707 type: string
2593 enum: 2708 enum:
2594 - -id 2709 - -id
2595 - -name 2710 - name
2596 - -duration 2711 - -duration
2597 - -views 2712 - -views
2598 - -likes 2713 - -likes
@@ -2621,6 +2736,15 @@ components:
2621 - -id 2736 - -id
2622 - -createdAt 2737 - -createdAt
2623 - -state 2738 - -state
2739 videoRedundanciesSort:
2740 name: sort
2741 in: query
2742 required: false
2743 description: Sort abuses by criteria
2744 schema:
2745 type: string
2746 enum:
2747 - name
2624 name: 2748 name:
2625 name: name 2749 name: name
2626 in: path 2750 in: path
@@ -3150,6 +3274,46 @@ components:
3150 type: array 3274 type: array
3151 items: 3275 items:
3152 $ref: '#/components/schemas/VideoStreamingPlaylists' 3276 $ref: '#/components/schemas/VideoStreamingPlaylists'
3277 FileRedundancyInformation:
3278 properties:
3279 id:
3280 type: integer
3281 fileUrl:
3282 type: string
3283 strategy:
3284 type: string
3285 size:
3286 type: integer
3287 createdAt:
3288 type: string
3289 format: date-time
3290 updatedAt:
3291 type: string
3292 format: date-time
3293 expiresOn:
3294 type: string
3295 format: date-time
3296 VideoRedundancy:
3297 properties:
3298 id:
3299 type: integer
3300 name:
3301 type: string
3302 url:
3303 type: string
3304 uuid:
3305 type: string
3306 redundancies:
3307 type: object
3308 properties:
3309 files:
3310 type: array
3311 items:
3312 $ref: '#/components/schemas/FileRedundancyInformation'
3313 streamingPlaylists:
3314 type: array
3315 items:
3316 $ref: '#/components/schemas/FileRedundancyInformation'
3153 VideoImportStateConstant: 3317 VideoImportStateConstant:
3154 properties: 3318 properties:
3155 id: 3319 id:
@@ -3802,6 +3966,7 @@ components:
3802 $ref: '#/components/schemas/Actor' 3966 $ref: '#/components/schemas/Actor'
3803 score: 3967 score:
3804 type: number 3968 type: number
3969 description: score reflecting the reachability of the actor, with steps of `10` and a base score of `1000`.
3805 state: 3970 state:
3806 type: string 3971 type: string
3807 enum: 3972 enum: