aboutsummaryrefslogtreecommitdiffhomepage
path: root/support/doc/api
diff options
context:
space:
mode:
authorFlorent <florent.git@zeteo.me>2022-08-10 09:53:39 +0200
committerGitHub <noreply@github.com>2022-08-10 09:53:39 +0200
commit2a491182e483b97afb1b65c908b23cb48d591807 (patch)
treeec13503216ad72a3ea8f1ce3b659899f8167fb47 /support/doc/api
parent06ac128958c489efe1008eeca1df683819bd2f18 (diff)
downloadPeerTube-2a491182e483b97afb1b65c908b23cb48d591807.tar.gz
PeerTube-2a491182e483b97afb1b65c908b23cb48d591807.tar.zst
PeerTube-2a491182e483b97afb1b65c908b23cb48d591807.zip
Channel sync (#5135)
* Add external channel URL for channel update / creation (#754) * Disallow synchronisation if user has no video quota (#754) * More constraints serverside (#754) * Disable sync if server configuration does not allow HTTP import (#754) * Working version synchronizing videos with a job (#754) TODO: refactoring, too much code duplication * More logs and try/catch (#754) * Fix eslint error (#754) * WIP: support synchronization time change (#754) * New frontend #754 * WIP: Create sync front (#754) * Enhance UI, sync creation form (#754) * Warning message when HTTP upload is disallowed * More consistent names (#754) * Binding Front with API (#754) * Add a /me API (#754) * Improve list UI (#754) * Implement creation and deletion routes (#754) * Lint (#754) * Lint again (#754) * WIP: UI for triggering import existing videos (#754) * Implement jobs for syncing and importing channels * Don't sync videos before sync creation + avoid concurrency issue (#754) * Cleanup (#754) * Cleanup: OpenAPI + API rework (#754) * Remove dead code (#754) * Eslint (#754) * Revert the mess with whitespaces in constants.ts (#754) * Some fixes after rebase (#754) * Several fixes after PR remarks (#754) * Front + API: Rename video-channels-sync to video-channel-syncs (#754) * Allow enabling channel sync through UI (#754) * getChannelInfo (#754) * Minor fixes: openapi + model + sql (#754) * Simplified API validators (#754) * Rename MChannelSync to MChannelSyncChannel (#754) * Add command for VideoChannelSync (#754) * Use synchronization.enabled config (#754) * Check parameters test + some fixes (#754) * Fix conflict mistake (#754) * Restrict access to video channel sync list API (#754) * Start adding unit test for synchronization (#754) * Continue testing (#754) * Tests finished + convertion of job to scheduler (#754) * Add lastSyncAt field (#754) * Fix externalRemoteUrl sort + creation date not well formatted (#754) * Small fix (#754) * Factorize addYoutubeDLImport and buildVideo (#754) * Check duplicates on channel not on users (#754) * factorize thumbnail generation (#754) * Fetch error should return status 400 (#754) * Separate video-channel-import and video-channel-sync-latest (#754) * Bump DB migration version after rebase (#754) * Prettier states in UI table (#754) * Add DefaultScope in VideoChannelSyncModel (#754) * Fix audit logs (#754) * Ensure user can upload when importing channel + minor fixes (#754) * Mark synchronization as failed on exception + typos (#754) * Change REST API for importing videos into channel (#754) * Add option for fully synchronize a chnanel (#754) * Return a whole sync object on creation to avoid tricks in Front (#754) * Various remarks (#754) * Single quotes by default (#754) * Rename synchronization to video_channel_synchronization * Add check.latest_videos_count and max_per_user options (#754) * Better channel rendering in list #754 * Allow sorting with channel name and state (#754) * Add missing tests for channel imports (#754) * Prefer using a parent job for channel sync * Styling * Client styling Co-authored-by: Chocobozzz <me@florianbigard.com>
Diffstat (limited to 'support/doc/api')
-rw-r--r--support/doc/api/openapi.yaml143
1 files changed, 142 insertions, 1 deletions
diff --git a/support/doc/api/openapi.yaml b/support/doc/api/openapi.yaml
index 74963df14..ac8cde565 100644
--- a/support/doc/api/openapi.yaml
+++ b/support/doc/api/openapi.yaml
@@ -254,6 +254,8 @@ tags:
254 download it for you, saving you as much bandwidth and avoiding any instability or limitation your network might have. 254 download it for you, saving you as much bandwidth and avoiding any instability or limitation your network might have.
255 - name: Video Imports 255 - name: Video Imports
256 description: Operations dealing with listing, adding and removing video imports. 256 description: Operations dealing with listing, adding and removing video imports.
257 - name: Channels Sync
258 description: Operations dealing with synchronizing PeerTube user's channel with channels of other platforms
257 - name: Video Captions 259 - name: Video Captions
258 description: Operations dealing with listing, adding and removing closed captions of a video. 260 description: Operations dealing with listing, adding and removing closed captions of a video.
259 - name: Video Channels 261 - name: Video Channels
@@ -327,6 +329,7 @@ x-tagGroups:
327 - Video Transcoding 329 - Video Transcoding
328 - Live Videos 330 - Live Videos
329 - Feeds 331 - Feeds
332 - Channels Sync
330 - name: Search 333 - name: Search
331 tags: 334 tags:
332 - Search 335 - Search
@@ -3050,7 +3053,7 @@ paths:
3050 tags: 3053 tags:
3051 - Video Channels 3054 - Video Channels
3052 responses: 3055 responses:
3053 '204': 3056 '200':
3054 description: successful operation 3057 description: successful operation
3055 content: 3058 content:
3056 application/json: 3059 application/json:
@@ -3288,6 +3291,59 @@ paths:
3288 '204': 3291 '204':
3289 description: successful operation 3292 description: successful operation
3290 3293
3294 '/video-channel-syncs':
3295 post:
3296 summary: Create a synchronization for a video channel
3297 operationId: addVideoChannelSync
3298 security:
3299 - OAuth2: []
3300 tags:
3301 - Channels Sync
3302 requestBody:
3303 content:
3304 application/json:
3305 schema:
3306 $ref: '#/components/schemas/VideoChannelSyncCreate'
3307 responses:
3308 '200':
3309 description: successful operation
3310 content:
3311 application/json:
3312 schema:
3313 type: object
3314 properties:
3315 videoChannelSync:
3316 $ref: "#/components/schemas/VideoChannelSync"
3317
3318 '/video-channel-syncs/{channelSyncId}':
3319 delete:
3320 summary: Delete a video channel synchronization
3321 operationId: delVideoChannelSync
3322 security:
3323 - OAuth2: []
3324 tags:
3325 - Channels Sync
3326 parameters:
3327 - $ref: '#/components/parameters/channelSyncId'
3328 responses:
3329 '204':
3330 description: successful operation
3331
3332 '/video-channel-syncs/{channelSyncId}/sync':
3333 post:
3334 summary: Triggers the channel synchronization job, fetching all the videos from the remote channel
3335 operationId: triggerVideoChannelSync
3336 security:
3337 - OAuth2: []
3338 tags:
3339 - Channels Sync
3340 parameters:
3341 - $ref: '#/components/parameters/channelSyncId'
3342 responses:
3343 '204':
3344 description: successful operation
3345
3346
3291 /video-playlists/privacies: 3347 /video-playlists/privacies:
3292 get: 3348 get:
3293 summary: List available playlist privacy policies 3349 summary: List available playlist privacy policies
@@ -3659,6 +3715,26 @@ paths:
3659 schema: 3715 schema:
3660 $ref: '#/components/schemas/VideoChannelList' 3716 $ref: '#/components/schemas/VideoChannelList'
3661 3717
3718 '/accounts/{name}/video-channel-syncs':
3719 get:
3720 summary: List the synchronizations of video channels of an account
3721 tags:
3722 - Video Channels
3723 - Channels Sync
3724 - Accounts
3725 parameters:
3726 - $ref: '#/components/parameters/name'
3727 - $ref: '#/components/parameters/start'
3728 - $ref: '#/components/parameters/count'
3729 - $ref: '#/components/parameters/sort'
3730 responses:
3731 '200':
3732 description: successful operation
3733 content:
3734 application/json:
3735 schema:
3736 $ref: '#/components/schemas/VideoChannelSyncList'
3737
3662 '/accounts/{name}/ratings': 3738 '/accounts/{name}/ratings':
3663 get: 3739 get:
3664 summary: List ratings of an account 3740 summary: List ratings of an account
@@ -5141,6 +5217,13 @@ components:
5141 schema: 5217 schema:
5142 type: string 5218 type: string
5143 example: my_username | my_username@example.com 5219 example: my_username | my_username@example.com
5220 channelSyncId:
5221 name: channelSyncId
5222 in: path
5223 required: true
5224 description: Channel Sync id
5225 schema:
5226 $ref: '#/components/schemas/Abuse/properties/id'
5144 subscriptionHandle: 5227 subscriptionHandle:
5145 name: subscriptionHandle 5228 name: subscriptionHandle
5146 in: path 5229 in: path
@@ -5347,6 +5430,7 @@ components:
5347 - activitypub-refresher 5430 - activitypub-refresher
5348 - video-redundancy 5431 - video-redundancy
5349 - video-live-ending 5432 - video-live-ending
5433 - video-channel-import
5350 followState: 5434 followState:
5351 name: state 5435 name: state
5352 in: query 5436 in: query
@@ -6497,6 +6581,11 @@ components:
6497 properties: 6581 properties:
6498 enabled: 6582 enabled:
6499 type: boolean 6583 type: boolean
6584 videoChannelSynchronization:
6585 type: object
6586 properties:
6587 enabled:
6588 type: boolean
6500 autoBlacklist: 6589 autoBlacklist:
6501 type: object 6590 type: object
6502 properties: 6591 properties:
@@ -6861,6 +6950,11 @@ components:
6861 properties: 6950 properties:
6862 enabled: 6951 enabled:
6863 type: boolean 6952 type: boolean
6953 video_channel_synchronization:
6954 type: object
6955 properties:
6956 enabled:
6957 type: boolean
6864 autoBlacklist: 6958 autoBlacklist:
6865 type: object 6959 type: object
6866 properties: 6960 properties:
@@ -6953,6 +7047,7 @@ components:
6953 - videos-views-stats 7047 - videos-views-stats
6954 - activitypub-refresher 7048 - activitypub-refresher
6955 - video-redundancy 7049 - video-redundancy
7050 - video-channel-import
6956 data: 7051 data:
6957 type: object 7052 type: object
6958 additionalProperties: true 7053 additionalProperties: true
@@ -7473,6 +7568,7 @@ components:
7473 type: integer 7568 type: integer
7474 uuid: 7569 uuid:
7475 $ref: '#/components/schemas/UUIDv4' 7570 $ref: '#/components/schemas/UUIDv4'
7571
7476 VideoChannelCreate: 7572 VideoChannelCreate:
7477 allOf: 7573 allOf:
7478 - $ref: '#/components/schemas/VideoChannel' 7574 - $ref: '#/components/schemas/VideoChannel'
@@ -7503,6 +7599,51 @@ components:
7503 - $ref: '#/components/schemas/VideoChannel' 7599 - $ref: '#/components/schemas/VideoChannel'
7504 - $ref: '#/components/schemas/Actor' 7600 - $ref: '#/components/schemas/Actor'
7505 7601
7602 VideoChannelSync:
7603 type: object
7604 properties:
7605 id:
7606 $ref: '#/components/schemas/id'
7607 state:
7608 type: object
7609 properties:
7610 id:
7611 type: integer
7612 example: 2
7613 label:
7614 type: string
7615 example: PROCESSING
7616 externalChannelUrl:
7617 type: string
7618 example: 'https://youtube.com/c/UC_myfancychannel'
7619 createdAt:
7620 type: string
7621 format: date-time
7622 lastSyncAt:
7623 type: string
7624 format: date-time
7625 nullable: true
7626 channel:
7627 $ref: '#/components/schemas/VideoChannel'
7628 VideoChannelSyncList:
7629 type: object
7630 properties:
7631 total:
7632 type: integer
7633 example: 1
7634 data:
7635 type: array
7636 items:
7637 allOf:
7638 - $ref: '#/components/schemas/VideoChannelSync'
7639 VideoChannelSyncCreate:
7640 type: object
7641 properties:
7642 externalChannelUrl:
7643 type: string
7644 example: https://youtube.com/c/UC_myfancychannel
7645 videoChannelId:
7646 $ref: '#/components/schemas/id'
7506 MRSSPeerLink: 7647 MRSSPeerLink:
7507 type: object 7648 type: object
7508 xml: 7649 xml: