ActivityPub-federated video streaming platform using P2P directly in your web browser
grouping tags by main category in the spec
Rigel Kent5776f78e3b3f
diff --git a/support/doc/api/openapi.yaml b/support/doc/api/openapi.yamlindex 8f5f886a1b..5764a0e302 100644--- a/support/doc/api/openapi.yaml+++ b/support/doc/api/openapi.yaml@@ -10,29 +10,41 @@ info:url: 'https://github.com/Chocobozzz/PeerTube/blob/master/LICENSE'x-logo:url: 'https://joinpeertube.org/img/brand.png'+ altText: PeerTube Project Homepagedescription: |# IntroductionThe PeerTube API is built on HTTP(S). Our API is RESTful. It has predictableresource URLs. It returns HTTP response codes to indicate errors. It alsoaccepts and returns JSON in the HTTP body. You can use your favoriteHTTP/REST library for your programming language to use PeerTube. No official- SDK is currently provided.+ SDK is currently provided, but the spec API is fully compatible with+ [openapi-generator](https://github.com/OpenAPITools/openapi-generator/wiki/API-client-generator-HOWTO)+ which generates a client SDK in the language of your choice.# AuthenticationWhen you sign up for an account, you are given the possibility to generatesessions, and authenticate using this session token. One session token cancurrently be used at a time.++ # Errors+ The API uses standard HTTP status codes to indicate the success or failure+ of the API call. The body of the response will be JSON in the following+ format.++ ```+ {+ "code": "unauthorized_request", // example inner error code+ "error": "Token is invalid." // example exposed error message+ }+ ```externalDocs:url: https://docs.joinpeertube.org/api.htmltags:- name: Accountsdescription: >Using some features of PeerTube require authentication, for which Accounts-provide different levels of permission as well as associated user- information.-- Accounts also encompass remote accounts discovered across the federation.+ information. Accounts also encompass remote accounts discovered across the federation.- name: Configdescription: >Each server exposes public information regarding supported videos and@@ -44,23 +56,15 @@ tags:- name: Jobdescription: >Jobs are long-running tasks enqueued and processed by the instance- itself.-- No additional worker registration is currently available.- - name: ServerFollowing+ itself. No additional worker registration is currently available.+ - name: Server Followingdescription: >Managing servers which the instance interacts with is crucial to the- concept-- of federation in PeerTube and external video indexation. The PeerTube- server-- then deals with inter-server ActivityPub operations and propagates-+ concept of federation in PeerTube and external video indexation. The PeerTube+ server then deals with inter-server ActivityPub operations and propagatesinformation across its social graph by posting activities to actors' inbox-endpoints.- - name: VideoAbuse+ - name: Video Abusedescription: |Video abuses deal with reports of local or remote videos alike.- name: Video@@ -72,16 +76,50 @@ tags:Videos from other instances federated by the instance (that is, instancesfollowed by the instance) can be found via keywords and other criteria ofthe advanced search.- - name: VideoComment+ - name: Video Commentdescription: >Operations dealing with comments to a video. Comments are organized inthreads.- - name: VideoChannel+ - name: Video Channeldescription: >Operations dealing with creation, modification and video listing of a- user's-- channels.+ user's channels.+ - name: Video Blacklist+ description: >+ Operations dealing with blacklisting videos (removing them from view and+ preventing interactions).+ - name: Video Rate+ description: >+ Voting for a video.+x-tagGroups:+ - name: Accounts+ tags:+ - Accounts+ - User+ - name: Videos+ tags:+ - Video+ - Video Channel+ - Video Comment+ - Video Abuse+ - Video Following+ - Video Rate+ - name: Moderation+ tags:+ - Video Blacklist+ - name: Public Instance Information+ tags:+ - Config+ - Server Following+ - name: Notifications+ tags:+ - Feeds+ - name: Jobs+ tags:+ - Job+ - name: Search+ tags:+ - Searchpaths:'/accounts/{name}':get:@@ -128,6 +166,37 @@ paths:source: |# pip install httpiehttp -b GET https://peertube2.cpy.re/api/v1/accounts/{name}/videos+ - lang: Ruby+ source: |+ require 'uri'+ require 'net/http'++ url = URI("https://peertube2.cpy.re/api/v1/accounts/{name}/videos")++ http = Net::HTTP.new(url.host, url.port)+ http.use_ssl = true+ http.verify_mode = OpenSSL::SSL::VERIFY_NONE++ request = Net::HTTP::Post.new(url)+ request["content-type"] = 'application/json'+ response = http.request(request)+ puts response.read_body+ - lang: Python+ source: |+ import http.client++ conn = http.client.HTTPSConnection("https://peertube2.cpy.re/api/v1")++ headers = {+ 'content-type': "application/json"+ }++ conn.request("POST", "/accounts/{name}/videos", None, headers)++ res = conn.getresponse()+ data = res.read()++ print(data.decode("utf-8"))/accounts:get:tags:@@ -264,7 +333,7 @@ paths:- OAuth2:- admintags:- - ServerFollowing+ - Server Followingsummary: Unfollow a server by hostnameparameters:- name: host@@ -279,7 +348,7 @@ paths:/server/followers:get:tags:- - ServerFollowing+ - Server Followingsummary: Get followers of the serverparameters:- $ref: '#/components/parameters/start'@@ -297,7 +366,7 @@ paths:/server/following:get:tags:- - ServerFollowing+ - Server Followingsummary: Get servers followed by the serverparameters:- $ref: '#/components/parameters/start'@@ -317,7 +386,7 @@ paths:- OAuth2:- admintags:- - ServerFollowing+ - Server Followingsummary: Follow a serverresponses:'204':@@ -923,7 +992,7 @@ paths:security:- OAuth2: []tags:- - VideoAbuse+ - Video Abuseparameters:- $ref: '#/components/parameters/start'- $ref: '#/components/parameters/count'@@ -943,7 +1012,7 @@ paths:security:- OAuth2: []tags:- - VideoAbuse+ - Video Abuseparameters:- $ref: '#/components/parameters/id2'responses:@@ -957,7 +1026,7 @@ paths:- admin- moderatortags:- - VideoBlacklist+ - Video Blacklistparameters:- $ref: '#/components/parameters/id2'responses:@@ -970,7 +1039,7 @@ paths:- admin- moderatortags:- - VideoBlacklist+ - Video Blacklistparameters:- $ref: '#/components/parameters/id2'responses:@@ -984,7 +1053,7 @@ paths:- admin- moderatortags:- - VideoBlacklist+ - Video Blacklistparameters:- $ref: '#/components/parameters/start'- $ref: '#/components/parameters/count'@@ -1002,7 +1071,7 @@ paths:get:summary: Get list of video channelstags:- - VideoChannel+ - Video Channelparameters:- $ref: '#/components/parameters/start'- $ref: '#/components/parameters/count'@@ -1021,7 +1090,7 @@ paths:security:- OAuth2: []tags:- - VideoChannel+ - Video Channelresponses:'204':$ref: '#/paths/~1users~1me/put/responses/204'@@ -1031,7 +1100,7 @@ paths:get:summary: Get a video channel by its idtags:- - VideoChannel+ - Video Channelparameters:- $ref: '#/components/parameters/id3'responses:@@ -1046,7 +1115,7 @@ paths:security:- OAuth2: []tags:- - VideoChannel+ - Video Channelparameters:- $ref: '#/components/parameters/id3'responses:@@ -1059,7 +1128,7 @@ paths:security:- OAuth2: []tags:- - VideoChannel+ - Video Channelparameters:- $ref: '#/components/parameters/id3'responses:@@ -1069,7 +1138,7 @@ paths:get:summary: Get videos of a video channel by its idtags:- - VideoChannel+ - Video Channelparameters:- $ref: '#/components/parameters/id3'responses:@@ -1083,7 +1152,7 @@ paths:get:summary: Get video channels of an account by its nametags:- - VideoChannel+ - Video Channelparameters:- $ref: '#/components/parameters/name'responses:@@ -1099,7 +1168,7 @@ paths:get:summary: Get the comment threads of a video by its idtags:- - VideoComment+ - Video Commentparameters:- $ref: '#/components/parameters/id2'- $ref: '#/components/parameters/start'@@ -1117,7 +1186,7 @@ paths:security:- OAuth2: []tags:- - VideoComment+ - Video Commentparameters:- $ref: '#/components/parameters/id2'responses:@@ -1131,7 +1200,7 @@ paths:get:summary: 'Get the comment thread by its id, of a video by its id'tags:- - VideoComment+ - Video Commentparameters:- $ref: '#/components/parameters/id2'- name: threadId@@ -1153,7 +1222,7 @@ paths:security:- OAuth2: []tags:- - VideoComment+ - Video Commentparameters:- $ref: '#/components/parameters/id2'- $ref: '#/components/parameters/commentId'@@ -1169,7 +1238,7 @@ paths:security:- OAuth2: []tags:- - VideoComment+ - Video Commentparameters:- $ref: '#/components/parameters/id2'- $ref: '#/components/parameters/commentId'@@ -1182,7 +1251,7 @@ paths:security:- OAuth2: []tags:- - VideoRate+ - Video Rateparameters:- $ref: '#/components/parameters/id2'responses: