X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=support%2Fdoc%2Fapi%2Fopenapi.yaml;h=74910c3133eb7df54fe89aa6526bddd08ede8731;hb=2539932e16129992a2c0889b4ff527c265a8e2c7;hp=61fd6c95ab56c497df5838dcb118b7958bfc4d27;hpb=20213fbd2a366dffc35aa7dddad71323893f8d62;p=github%2FChocobozzz%2FPeerTube.git diff --git a/support/doc/api/openapi.yaml b/support/doc/api/openapi.yaml index 61fd6c95a..74910c313 100644 --- a/support/doc/api/openapi.yaml +++ b/support/doc/api/openapi.yaml @@ -1,7 +1,7 @@ openapi: 3.0.0 info: title: PeerTube - version: 3.2.0-rc.1 + version: 3.2.0 contact: name: PeerTube Community url: https://joinpeertube.org @@ -22,7 +22,7 @@ info: - [Kotlin](https://framagit.org/framasoft/peertube/clients/kotlin) See the [REST API quick start](https://docs.joinpeertube.org/api-rest-getting-started) for a few - examples of using with the PeerTube API. + examples of using the PeerTube API. # Authentication @@ -108,7 +108,7 @@ info: This API features [Cross-Origin Resource Sharing (CORS)](https://fetch.spec.whatwg.org/), allowing cross-domain communication from the browser for some routes: - + | Endpoint | |------------------------- ---| | `/api/*` | @@ -124,8 +124,8 @@ tags: - name: Register description: | As a visitor, you can use this API to open an account (if registrations are open on - that PeerTube instance). As an admin, you should use the dedicated [User creation - API](#operation/createUser) instead. + that PeerTube instance). As an admin, you should use the dedicated [User creation + API](#operation/addUser) instead. - name: Session x-displayName: Login/Logout description: | @@ -247,6 +247,8 @@ tags: Administrators can also enable the use of a remote search system, indexing videos and channels not could be not federated by the instance. + - name: Homepage + description: Get and update the custom homepage - name: Video Mirroring description: | PeerTube instances can mirror videos from one another, and help distribute some videos. @@ -281,6 +283,9 @@ x-tagGroups: - name: Search tags: - Search + - name: Custom pages + tags: + - Homepage - name: Moderation tags: - Abuses @@ -477,6 +482,40 @@ paths: '200': description: successful operation + /custom-pages/homepage/instance: + get: + summary: Get instance custom homepage + tags: + - Homepage + responses: + '404': + description: No homepage set + '200': + description: successful operation + content: + application/json: + schema: + $ref: '#/components/schemas/CustomHomepage' + put: + summary: Set instance custom homepage + tags: + - Homepage + security: + - OAuth2: + - admin + requestBody: + content: + application/json: + schema: + type: object + properties: + content: + type: string + description: content of the homepage, that will be injected in the client + responses: + '204': + description: successful operation + /jobs/{state}: get: summary: List instance jobs @@ -690,7 +729,7 @@ paths: /users: post: summary: Create a user - operationId: createUser + operationId: addUser security: - OAuth2: - admin @@ -705,18 +744,18 @@ paths: $ref: '#/components/schemas/AddUserResponse' links: # GET /users/{id} - GetUserId: - operationId: getUserId + GetUser: + operationId: getUser parameters: id: '$response.body#/user/id' # PUT /users/{id} - PutUserId: - operationId: putUserId + PutUser: + operationId: putUser parameters: id: '$response.body#/user/id' # DELETE /users/{id} - DelUserId: - operationId: delUserId + DelUser: + operationId: delUser parameters: id: '$response.body#/user/id' '403': @@ -764,7 +803,7 @@ paths: - admin tags: - Users - operationId: delUserId + operationId: delUser responses: '204': description: successful operation @@ -774,7 +813,7 @@ paths: - OAuth2: [] tags: - Users - operationId: getUserId + operationId: getUser parameters: - name: withStats in: query @@ -799,7 +838,7 @@ paths: - OAuth2: [] tags: - Users - operationId: putUserId + operationId: putUser responses: '204': description: successful operation @@ -939,7 +978,7 @@ paths: operationId: verifyUser description: | Following a user registration, the new user will receive an email asking to click a link - containing a secret. + containing a secret. tags: - Users - Register @@ -1493,6 +1532,7 @@ paths: /videos: get: summary: List videos + operationId: getVideos tags: - Video parameters: @@ -2024,7 +2064,7 @@ paths: /videos/live: post: summary: Create a live - operationId: createLive + operationId: addLive security: - OAuth2: [] tags: @@ -2874,7 +2914,7 @@ paths: post: summary: Create a video playlist description: If the video playlist is set as public, `videoChannelId` is mandatory. - operationId: createPlaylist + operationId: addPlaylist security: - OAuth2: [] tags: @@ -2994,6 +3034,7 @@ paths: /video-playlists/{playlistId}/videos: get: summary: 'List videos of a playlist' + operationId: getVideoPlaylistVideos tags: - Videos - Video Playlists @@ -3008,6 +3049,7 @@ paths: $ref: '#/components/schemas/VideoListResponse' post: summary: Add a video in a playlist + operationId: addVideoPlaylistVideo security: - OAuth2: [] tags: @@ -3054,6 +3096,7 @@ paths: /video-playlists/{playlistId}/videos/reorder: post: summary: 'Reorder a playlist' + operationId: reorderVideoPlaylist security: - OAuth2: [] tags: @@ -3088,6 +3131,7 @@ paths: /video-playlists/{playlistId}/videos/{playlistElementId}: put: summary: Update a playlist element + operationId: putVideoPlaylistVideo security: - OAuth2: [] tags: @@ -3114,6 +3158,7 @@ paths: description: Stop the video at this specific timestamp delete: summary: Delete an element from a playlist + operationId: delVideoPlaylistVideo security: - OAuth2: [] tags: @@ -3368,6 +3413,7 @@ paths: tags: - Search summary: Search videos + operationId: searchVideos parameters: - name: search in: query @@ -3444,6 +3490,7 @@ paths: tags: - Search summary: Search channels + operationId: searchChannels parameters: - name: search in: query @@ -3632,6 +3679,7 @@ paths: tags: - Video Mirroring summary: List videos being mirrored + operationId: getMirroredVideos security: - OAuth2: - admin @@ -3661,6 +3709,7 @@ paths: tags: - Video Mirroring summary: Mirror a video + operationId: putMirroredVideo security: - OAuth2: - admin @@ -3689,6 +3738,7 @@ paths: tags: - Video Mirroring summary: Delete a mirror done on a video + operationId: delMirroredVideo security: - OAuth2: - admin @@ -3710,6 +3760,7 @@ paths: tags: - Feeds summary: List comments on videos + operationId: getSyndicatedComments parameters: - name: format in: path @@ -3804,6 +3855,7 @@ paths: tags: - Feeds summary: List videos + operationId: getSyndicatedVideos parameters: - name: format in: path @@ -3892,6 +3944,7 @@ paths: - Feeds - Account summary: List videos of subscriptions tied to a token + operationId: getSyndicatedSubscriptionVideos parameters: - name: format in: path @@ -3954,6 +4007,7 @@ paths: tags: - Plugins summary: List plugins + operationId: getPlugins security: - OAuth2: - admin @@ -3982,6 +4036,7 @@ paths: tags: - Plugins summary: List available plugins + operationId: getAvailablePlugins security: - OAuth2: - admin @@ -4016,6 +4071,7 @@ paths: tags: - Plugins summary: Install a plugin + operationId: addPlugin security: - OAuth2: - admin @@ -4050,6 +4106,7 @@ paths: tags: - Plugins summary: Update a plugin + operationId: updatePlugin security: - OAuth2: - admin @@ -4086,6 +4143,7 @@ paths: tags: - Plugins summary: Uninstall a plugin + operationId: uninstallPlugin security: - OAuth2: - admin @@ -4112,6 +4170,7 @@ paths: tags: - Plugins summary: Get a plugin + operationId: getPlugin security: - OAuth2: - admin @@ -4436,7 +4495,7 @@ components: required: true description: The thread id (root comment id) schema: - $ref: '#/components/schemas/VideoCommentThreadTree/properties/comment/properties/id' + type: integer commentId: name: commentId in: path @@ -5720,6 +5779,12 @@ components: indexUrl: type: string format: url + homepage: + type: object + properties: + enabled: + type: boolean + ServerConfigAbout: properties: instance: @@ -5910,6 +5975,12 @@ components: type: boolean manualApproval: type: boolean + + CustomHomepage: + properties: + content: + type: string + Follow: properties: id: @@ -6215,7 +6286,7 @@ components: # optionally present fields: they require WITH_STATS scope videosCount: type: integer - description: Count of videos published + description: Count of videos published abusesCount: type: integer description: Count of reports/abuses of which the user is a target