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.yaml139
1 files changed, 127 insertions, 12 deletions
diff --git a/support/doc/api/openapi.yaml b/support/doc/api/openapi.yaml
index 9848c93ee..f2bb945f9 100644
--- a/support/doc/api/openapi.yaml
+++ b/support/doc/api/openapi.yaml
@@ -1,7 +1,7 @@
1openapi: 3.0.0 1openapi: 3.0.0
2info: 2info:
3 title: PeerTube 3 title: PeerTube
4 version: 1.1.0 4 version: 1.2.0
5 contact: 5 contact:
6 name: PeerTube Community 6 name: PeerTube Community
7 url: 'https://joinpeertube.org' 7 url: 'https://joinpeertube.org'
@@ -23,7 +23,7 @@ info:
23 23
24 # Authentication 24 # Authentication
25 When you sign up for an account, you are given the possibility to generate 25 When you sign up for an account, you are given the possibility to generate
26 sessions, and authenticate using this session token. One session token can 26 sessions, and authenticate using this session token. One session token can
27 currently be used at a time. 27 currently be used at a time.
28 28
29 # Errors 29 # Errors
@@ -61,7 +61,7 @@ tags:
61 description: > 61 description: >
62 Managing servers which the instance interacts with is crucial to the 62 Managing servers which the instance interacts with is crucial to the
63 concept of federation in PeerTube and external video indexation. The PeerTube 63 concept of federation in PeerTube and external video indexation. The PeerTube
64 server then deals with inter-server ActivityPub operations and propagates 64 server then deals with inter-server ActivityPub operations and propagates
65 information across its social graph by posting activities to actors' inbox 65 information across its social graph by posting activities to actors' inbox
66 endpoints. 66 endpoints.
67 - name: Video Abuse 67 - name: Video Abuse
@@ -492,7 +492,8 @@ paths:
492 get: 492 get:
493 summary: Get current user information 493 summary: Get current user information
494 security: 494 security:
495 - OAuth2: [] 495 - OAuth2:
496 - user
496 tags: 497 tags:
497 - User 498 - User
498 responses: 499 responses:
@@ -507,7 +508,8 @@ paths:
507 put: 508 put:
508 summary: Update current user information 509 summary: Update current user information
509 security: 510 security:
510 - OAuth2: [] 511 - OAuth2:
512 - user
511 tags: 513 tags:
512 - User 514 - User
513 responses: 515 responses:
@@ -523,7 +525,8 @@ paths:
523 get: 525 get:
524 summary: Get current user used quota 526 summary: Get current user used quota
525 security: 527 security:
526 - OAuth2: [] 528 - OAuth2:
529 - user
527 tags: 530 tags:
528 - User 531 - User
529 responses: 532 responses:
@@ -558,7 +561,71 @@ paths:
558 get: 561 get:
559 summary: Get videos of the current user 562 summary: Get videos of the current user
560 security: 563 security:
561 - OAuth2: [] 564 - OAuth2:
565 - user
566 tags:
567 - User
568 parameters:
569 - $ref: '#/components/parameters/start'
570 - $ref: '#/components/parameters/count'
571 - $ref: '#/components/parameters/sort'
572 responses:
573 '200':
574 description: successful operation
575 content:
576 application/json:
577 schema:
578 type: array
579 items:
580 $ref: '#/components/schemas/Video'
581 /users/me/subscriptions:
582 get:
583 summary: Get subscriptions of the current user
584 security:
585 - OAuth2:
586 - user
587 tags:
588 - User
589 parameters:
590 - $ref: '#/components/parameters/start'
591 - $ref: '#/components/parameters/count'
592 - $ref: '#/components/parameters/sort'
593 responses:
594 '200':
595 description: successful operation
596 post:
597 summary: Add subscription to the current user
598 security:
599 - OAuth2:
600 - user
601 tags:
602 - User
603 responses:
604 '200':
605 description: successful operation
606 /users/me/subscriptions/exist:
607 get:
608 summary: Get if subscriptions exist for the current user
609 security:
610 - OAuth2:
611 - user
612 tags:
613 - User
614 parameters:
615 - $ref: '#/components/parameters/subscriptionsUris'
616 responses:
617 '200':
618 description: successful operation
619 content:
620 application/json:
621 schema:
622 type: object
623 /users/me/subscriptions/videos:
624 get:
625 summary: Get videos of subscriptions of the current user
626 security:
627 - OAuth2:
628 - user
562 tags: 629 tags:
563 - User 630 - User
564 parameters: 631 parameters:
@@ -574,6 +641,31 @@ paths:
574 type: array 641 type: array
575 items: 642 items:
576 $ref: '#/components/schemas/Video' 643 $ref: '#/components/schemas/Video'
644 '/users/me/subscriptions/{uri}':
645 get:
646 summary: Get subscription of the current user for a given uri
647 security:
648 - OAuth2:
649 - user
650 tags:
651 - User
652 responses:
653 '200':
654 description: successful operation
655 content:
656 application/json:
657 schema:
658 $ref: '#/components/schemas/VideoChannel'
659 delete:
660 summary: Delete subscription of the current user for a given uri
661 security:
662 - OAuth2:
663 - user
664 tags:
665 - User
666 responses:
667 '200':
668 description: successful operation
577 /users/register: 669 /users/register:
578 post: 670 post:
579 summary: Register a user 671 summary: Register a user
@@ -751,7 +843,9 @@ paths:
751 type: string 843 type: string
752 tags: 844 tags:
753 description: Video tags 845 description: Video tags
754 type: string 846 type: array
847 items:
848 type: string
755 commentsEnabled: 849 commentsEnabled:
756 description: Enable or disable comments for this video 850 description: Enable or disable comments for this video
757 type: string 851 type: string
@@ -820,7 +914,7 @@ paths:
820 $ref: '#/paths/~1users~1me/put/responses/204' 914 $ref: '#/paths/~1users~1me/put/responses/204'
821 '/videos/{id}/watching': 915 '/videos/{id}/watching':
822 put: 916 put:
823 summary: Indicate progress of in watching the video by its id for a user 917 summary: Set watching progress of a video by its id for a user
824 tags: 918 tags:
825 - Video 919 - Video
826 security: 920 security:
@@ -958,7 +1052,9 @@ paths:
958 type: string 1052 type: string
959 tags: 1053 tags:
960 description: Video tags 1054 description: Video tags
961 type: string 1055 type: array
1056 items:
1057 type: string
962 commentsEnabled: 1058 commentsEnabled:
963 description: Enable or disable comments for this video 1059 description: Enable or disable comments for this video
964 type: string 1060 type: string
@@ -1434,6 +1530,8 @@ components:
1434 - type: array 1530 - type: array
1435 items: 1531 items:
1436 type: number 1532 type: number
1533 style: form
1534 explode: false
1437 tagsOneOf: 1535 tagsOneOf:
1438 name: tagsOneOf 1536 name: tagsOneOf
1439 in: query 1537 in: query
@@ -1445,6 +1543,8 @@ components:
1445 - type: array 1543 - type: array
1446 items: 1544 items:
1447 type: string 1545 type: string
1546 style: form
1547 explode: false
1448 tagsAllOf: 1548 tagsAllOf:
1449 name: tagsAllOf 1549 name: tagsAllOf
1450 in: query 1550 in: query
@@ -1456,6 +1556,8 @@ components:
1456 - type: array 1556 - type: array
1457 items: 1557 items:
1458 type: string 1558 type: string
1559 style: form
1560 explode: false
1459 languageOneOf: 1561 languageOneOf:
1460 name: languageOneOf 1562 name: languageOneOf
1461 in: query 1563 in: query
@@ -1463,10 +1565,12 @@ components:
1463 description: language id of the video 1565 description: language id of the video
1464 schema: 1566 schema:
1465 oneOf: 1567 oneOf:
1466 - type: number 1568 - type: string
1467 - type: array 1569 - type: array
1468 items: 1570 items:
1469 type: number 1571 type: string
1572 style: form
1573 explode: false
1470 licenceOneOf: 1574 licenceOneOf:
1471 name: licenceOneOf 1575 name: licenceOneOf
1472 in: query 1576 in: query
@@ -1478,6 +1582,8 @@ components:
1478 - type: array 1582 - type: array
1479 items: 1583 items:
1480 type: number 1584 type: number
1585 style: form
1586 explode: false
1481 nsfw: 1587 nsfw:
1482 name: nsfw 1588 name: nsfw
1483 in: query 1589 in: query
@@ -1501,6 +1607,15 @@ components:
1501 enum: 1607 enum:
1502 - local 1608 - local
1503 - all-local 1609 - all-local
1610 subscriptionsUris:
1611 name: uris
1612 in: query
1613 required: true
1614 description: list of uris to check if each is part of the user subscriptions
1615 schema:
1616 type: array
1617 items:
1618 type: string
1504 requestBodies: 1619 requestBodies:
1505 VideoChannelInput: 1620 VideoChannelInput:
1506 content: 1621 content: