aboutsummaryrefslogtreecommitdiffhomepage
path: root/support/doc/api/openapi.yaml
diff options
context:
space:
mode:
Diffstat (limited to 'support/doc/api/openapi.yaml')
-rw-r--r--support/doc/api/openapi.yaml38
1 files changed, 27 insertions, 11 deletions
diff --git a/support/doc/api/openapi.yaml b/support/doc/api/openapi.yaml
index 20790faaa..fd227353d 100644
--- a/support/doc/api/openapi.yaml
+++ b/support/doc/api/openapi.yaml
@@ -47,7 +47,8 @@ info:
47 } 47 }
48 ``` 48 ```
49 49
50 Some errors benefit from a more detailed message: 50 Validation errors benefit from a more detailed error type and return the HTTP `400 Bad Request` status code.
51
51 ``` 52 ```
52 { 53 {
53 "errors": { 54 "errors": {
@@ -80,10 +81,10 @@ info:
80 81
81 | Header | Description | 82 | Header | Description |
82 |-------------------------|------------------------------------------------------------| 83 |-------------------------|------------------------------------------------------------|
83 | X-RateLimit-Limit | Number of max requests allowed in the current time period | 84 | `X-RateLimit-Limit` | Number of max requests allowed in the current time period |
84 | X-RateLimit-Remaining | Number of remaining requests in the current time period | 85 | `X-RateLimit-Remaining` | Number of remaining requests in the current time period |
85 | X-RateLimit-Reset | Timestamp of end of current time period as UNIX timestamp | 86 | `X-RateLimit-Reset` | Timestamp of end of current time period as UNIX timestamp |
86 | Retry-After | Seconds to delay after the first `429` is received | 87 | `Retry-After` | Seconds to delay after the first `429` is received |
87externalDocs: 88externalDocs:
88 url: https://docs.joinpeertube.org/api-rest-reference.html 89 url: https://docs.joinpeertube.org/api-rest-reference.html
89tags: 90tags:
@@ -1317,7 +1318,7 @@ paths:
1317 type: string 1318 type: string
1318 support: 1319 support:
1319 description: A text tell the audience how to support the video creator 1320 description: A text tell the audience how to support the video creator
1320 example: Please support my work on <insert crowdfunding plateform>! <3 1321 example: Please support our work on https://soutenir.framasoft.org/en/ <3
1321 type: string 1322 type: string
1322 nsfw: 1323 nsfw:
1323 description: Whether or not this video contains sensitive content 1324 description: Whether or not this video contains sensitive content
@@ -1747,7 +1748,7 @@ paths:
1747 type: string 1748 type: string
1748 support: 1749 support:
1749 description: A text tell the audience how to support the creator 1750 description: A text tell the audience how to support the creator
1750 example: Please support my work on <insert crowdfunding plateform>! <3 1751 example: Please support our work on https://soutenir.framasoft.org/en/ <3
1751 type: string 1752 type: string
1752 nsfw: 1753 nsfw:
1753 description: Whether or not this live video/replay contains sensitive content 1754 description: Whether or not this live video/replay contains sensitive content
@@ -2249,6 +2250,7 @@ paths:
2249 /video-channels: 2250 /video-channels:
2250 get: 2251 get:
2251 summary: List video channels 2252 summary: List video channels
2253 operationId: getVideoChannels
2252 tags: 2254 tags:
2253 - Video Channels 2255 - Video Channels
2254 parameters: 2256 parameters:
@@ -2264,6 +2266,7 @@ paths:
2264 $ref: '#/components/schemas/VideoChannelList' 2266 $ref: '#/components/schemas/VideoChannelList'
2265 post: 2267 post:
2266 summary: Create a video channel 2268 summary: Create a video channel
2269 operationId: createVideoChannel
2267 security: 2270 security:
2268 - OAuth2: [] 2271 - OAuth2: []
2269 tags: 2272 tags:
@@ -2271,6 +2274,16 @@ paths:
2271 responses: 2274 responses:
2272 '204': 2275 '204':
2273 description: successful operation 2276 description: successful operation
2277 content:
2278 application/json:
2279 schema:
2280 type: object
2281 properties:
2282 videoChannel:
2283 type: object
2284 properties:
2285 id:
2286 $ref: '#/components/schemas/VideoChannel/properties/id'
2274 requestBody: 2287 requestBody:
2275 content: 2288 content:
2276 application/json: 2289 application/json:
@@ -2279,6 +2292,7 @@ paths:
2279 '/video-channels/{channelHandle}': 2292 '/video-channels/{channelHandle}':
2280 get: 2293 get:
2281 summary: Get a video channel 2294 summary: Get a video channel
2295 operationId: getVideoChannel
2282 tags: 2296 tags:
2283 - Video Channels 2297 - Video Channels
2284 parameters: 2298 parameters:
@@ -2968,6 +2982,8 @@ paths:
2968 enum: 2982 enum:
2969 - like 2983 - like
2970 - dislike 2984 - dislike
2985 required:
2986 - rating
2971 responses: 2987 responses:
2972 '204': 2988 '204':
2973 description: successful operation 2989 description: successful operation
@@ -4215,7 +4231,7 @@ components:
4215 usernameChannel: 4231 usernameChannel:
4216 type: string 4232 type: string
4217 description: immutable name of the channel, used to interact with its actor 4233 description: immutable name of the channel, used to interact with its actor
4218 example: The Capybara Channel 4234 example: framasoft_videos
4219 pattern: '/^[ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789\\-_.:]+$/' 4235 pattern: '/^[ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789\\-_.:]+$/'
4220 password: 4236 password:
4221 type: string 4237 type: string
@@ -4649,7 +4665,7 @@ components:
4649 support: 4665 support:
4650 type: string 4666 type: string
4651 description: A text tell the audience how to support the video creator 4667 description: A text tell the audience how to support the video creator
4652 example: Please support my work on <insert crowdfunding plateform>! <3 4668 example: Please support our work on https://soutenir.framasoft.org/en/ <3
4653 minLength: 3 4669 minLength: 3
4654 maxLength: 1000 4670 maxLength: 1000
4655 channel: 4671 channel:
@@ -5589,7 +5605,7 @@ components:
5589 type: boolean 5605 type: boolean
5590 support: 5606 support:
5591 description: A text tell the audience how to support the video creator 5607 description: A text tell the audience how to support the video creator
5592 example: Please support my work on <insert crowdfunding plateform>! <3 5608 example: Please support our work on https://soutenir.framasoft.org/en/ <3
5593 type: string 5609 type: string
5594 nsfw: 5610 nsfw:
5595 description: Whether or not this video contains sensitive content 5611 description: Whether or not this video contains sensitive content
@@ -5963,7 +5979,7 @@ components:
5963 support: 5979 support:
5964 type: string 5980 type: string
5965 description: text shown by default on all videos of this channel, to tell the audience how to support it 5981 description: text shown by default on all videos of this channel, to tell the audience how to support it
5966 example: Please support my work on <insert crowdfunding plateform>! <3 5982 example: Please support our work on https://soutenir.framasoft.org/en/ <3
5967 minLength: 3 5983 minLength: 3
5968 maxLength: 1000 5984 maxLength: 1000
5969 # GET-only properties 5985 # GET-only properties