aboutsummaryrefslogtreecommitdiffhomepage
path: root/support/doc
diff options
context:
space:
mode:
authorRigel Kent <sendmemail@rigelk.eu>2018-11-16 12:11:00 +0100
committerRigel Kent <sendmemail@rigelk.eu>2018-11-16 13:31:24 +0100
commit6441981bc6e5063dd09e742e4e34ab848ab00ea8 (patch)
tree82e8ec2fdcadc85fafa2559d3cb37bfa16cf32b6 /support/doc
parentcfd140abd6b748b4307d64fc33ea5aac73f94262 (diff)
downloadPeerTube-6441981bc6e5063dd09e742e4e34ab848ab00ea8.tar.gz
PeerTube-6441981bc6e5063dd09e742e4e34ab848ab00ea8.tar.zst
PeerTube-6441981bc6e5063dd09e742e4e34ab848ab00ea8.zip
adding ownership and watching video APIs to the spec
Diffstat (limited to 'support/doc')
-rw-r--r--support/doc/api/openapi.yaml132
1 files changed, 130 insertions, 2 deletions
diff --git a/support/doc/api/openapi.yaml b/support/doc/api/openapi.yaml
index 9f2997774..8f5f886a1 100644
--- a/support/doc/api/openapi.yaml
+++ b/support/doc/api/openapi.yaml
@@ -22,6 +22,8 @@ info:
22 When you sign up for an account, you are given the possibility to generate 22 When you sign up for an account, you are given the possibility to generate
23 sessions, and authenticate using this session token. One session token can 23 sessions, and authenticate using this session token. One session token can
24 currently be used at a time. 24 currently be used at a time.
25externalDocs:
26 url: https://docs.joinpeertube.org/api.html
25tags: 27tags:
26 - name: Accounts 28 - name: Accounts
27 description: > 29 description: >
@@ -144,7 +146,7 @@ paths:
144 get: 146 get:
145 tags: 147 tags:
146 - Config 148 - Config
147 summary: Get the configuration of the server 149 summary: Get the public configuration of the server
148 responses: 150 responses:
149 '200': 151 '200':
150 description: successful operation 152 description: successful operation
@@ -152,6 +154,45 @@ paths:
152 application/json: 154 application/json:
153 schema: 155 schema:
154 $ref: '#/components/schemas/ServerConfig' 156 $ref: '#/components/schemas/ServerConfig'
157 /config/about:
158 get:
159 summary: Get the instance about page content
160 tags:
161 - Config
162 responses:
163 '200':
164 description: successful operation
165 /config/custom:
166 get:
167 summary: Get the runtime configuration of the server
168 tags:
169 - Config
170 security:
171 - OAuth2:
172 - admin
173 responses:
174 '200':
175 description: successful operation
176 put:
177 summary: Set the runtime configuration of the server
178 tags:
179 - Config
180 security:
181 - OAuth2:
182 - admin
183 responses:
184 '200':
185 description: successful operation
186 delete:
187 summary: Delete the runtime configuration of the server
188 tags:
189 - Config
190 security:
191 - OAuth2:
192 - admin
193 responses:
194 '200':
195 description: successful operation
155 '/feeds/videos.{format}': 196 '/feeds/videos.{format}':
156 get: 197 get:
157 summary: >- 198 summary: >-
@@ -701,6 +742,85 @@ paths:
701 responses: 742 responses:
702 '204': 743 '204':
703 $ref: '#/paths/~1users~1me/put/responses/204' 744 $ref: '#/paths/~1users~1me/put/responses/204'
745 '/videos/{id}/watching':
746 put:
747 summary: Indicate progress of in watching the video by its id for a user
748 tags:
749 - Video
750 security:
751 - OAuth2: []
752 parameters:
753 - $ref: '#/components/parameters/id2'
754 requestBody:
755 content:
756 application/json:
757 schema:
758 $ref: '#/components/schemas/UserWatchingVideo'
759 required: true
760 responses:
761 '204':
762 $ref: '#/paths/~1users~1me/put/responses/204'
763 /videos/ownership:
764 get:
765 summary: Get list of video ownership changes requests
766 tags:
767 - Video
768 security:
769 - OAuth2: []
770 parameters:
771 - $ref: '#/components/parameters/id2'
772 responses:
773 '200':
774 description: successful operation
775 '/videos/ownership/{id}/accept':
776 post:
777 summary: Refuse ownership change request for video by its id
778 tags:
779 - Video
780 security:
781 - OAuth2: []
782 parameters:
783 - $ref: '#/components/parameters/id2'
784 responses:
785 '204':
786 $ref: '#/paths/~1users~1me/put/responses/204'
787 '/videos/ownership/{id}/refuse':
788 post:
789 summary: Accept ownership change request for video by its id
790 tags:
791 - Video
792 security:
793 - OAuth2: []
794 parameters:
795 - $ref: '#/components/parameters/id2'
796 responses:
797 '204':
798 $ref: '#/paths/~1users~1me/put/responses/204'
799 '/videos/{id}/give-ownership':
800 post:
801 summary: Request change of ownership for a video you own, by its id
802 tags:
803 - Video
804 security:
805 - OAuth2: []
806 parameters:
807 - $ref: '#/components/parameters/id2'
808 requestBody:
809 required: true
810 content:
811 application/x-www-form-urlencoded:
812 schema:
813 type: object
814 properties:
815 username:
816 type: string
817 required:
818 - username
819 responses:
820 '204':
821 $ref: '#/paths/~1users~1me/put/responses/204'
822 '400':
823 description: 'Changing video ownership to a remote account is not supported yet'
704 /videos/upload: 824 /videos/upload:
705 post: 825 post:
706 summary: Upload a video file with its metadata 826 summary: Upload a video file with its metadata
@@ -1093,8 +1213,12 @@ paths:
1093 items: 1213 items:
1094 $ref: '#/components/schemas/Video' 1214 $ref: '#/components/schemas/Video'
1095servers: 1215servers:
1216 - url: 'https://peertube.cpy.re/api/v1'
1217 description: Live Test Server (live data - stable version)
1096 - url: 'https://peertube2.cpy.re/api/v1' 1218 - url: 'https://peertube2.cpy.re/api/v1'
1097 description: Live Server 1219 description: Live Test Server (live data - bleeding edge version)
1220 - url: 'https://peertube3.cpy.re/api/v1'
1221 description: Live Test Server (live data - bleeding edge version)
1098components: 1222components:
1099 parameters: 1223 parameters:
1100 start: 1224 start:
@@ -1414,6 +1538,10 @@ components:
1414 type: array 1538 type: array
1415 items: 1539 items:
1416 $ref: '#/components/schemas/VideoChannel' 1540 $ref: '#/components/schemas/VideoChannel'
1541 UserWatchingVideo:
1542 properties:
1543 currentTime:
1544 type: number
1417 ServerConfig: 1545 ServerConfig:
1418 properties: 1546 properties:
1419 signup: 1547 signup: