Skip to content

ActivityPub-federated video streaming platform using P2P directly in your web browser

Improve REST API doc

Chocobozzz963e5b30a9cd
diff --git a/support/doc/api/openapi.yaml b/support/doc/api/openapi.yaml
index 3c148eaa1c..22852cb9cf 100644
--- a/support/doc/api/openapi.yaml
+++ b/support/doc/api/openapi.yaml
@@ -7523,12 +7523,13 @@ components:
name: nsfw
in: query
required: false
- description: whether to include nsfw videos, if any
+ description: Whether to include nsfw videos, if any. The default value is set by the admin.
schema:
type: string
enum:
- 'true'
- 'false'
+ - 'both'
isLocal:
name: isLocal
in: query
@@ -7555,8 +7556,27 @@ components:
in: query
required: false
schema:
- $ref: '#/components/schemas/VideoPrivacySet'
- description: '**PeerTube >= 4.0** Display only videos in this specific privacy/privacies'
+ allOf:
+ - $ref: '#/components/schemas/VideoPrivacySet'
+ description: >
+ **Only administrators and moderators can use this parameter**
+
+
+ Display only videos in this specific privacy/privacies. By default, list public videos for anonymous users and public/internal videos for authenticated users
+
+ - `1` PUBLIC
+
+ - `2` UNLISTED
+
+ - `3` PRIVATE
+
+ - `4` INTERNAL
+
+ - `5` PASSWORD_PROTECTED
+ examples:
+ password:
+ value: 5
+ summary: Display only password protected videos
excludeAlreadyWatched:
name: excludeAlreadyWatched
in: query
@@ -7600,11 +7620,14 @@ components:
- 8
- 16
- 32
+ - 64
+ - 128
description: >
**Only administrators and moderators can use this parameter**
- Include additional videos in results (can be combined using bitwise or operator)
+ Include additional videos in results (can be combined using bitwise or operator).
+ By default PeerTube only list published videos that are not blocked.
- `0` NONE
@@ -7619,6 +7642,17 @@ components:
- `16` CAPTIONS
- `32` VIDEO SOURCE
+
+ - `64`: AUTOMATIC_TAGS
+
+ - `128`: TAGS
+ examples:
+ includeAll:
+ value: 3
+ summary: Include not published and blacklisted videos (1 + 2)
+ includeAllWithFiles:
+ value: 24
+ summary: Add files and captions to video JSON representation (8 + 16)
subscriptionsUris:
name: uris
in: query