aboutsummaryrefslogtreecommitdiffhomepage
path: root/support/doc/api
diff options
context:
space:
mode:
Diffstat (limited to 'support/doc/api')
-rw-r--r--support/doc/api/openapi.yaml108
1 files changed, 82 insertions, 26 deletions
diff --git a/support/doc/api/openapi.yaml b/support/doc/api/openapi.yaml
index 6e3653102..a6f61b3b2 100644
--- a/support/doc/api/openapi.yaml
+++ b/support/doc/api/openapi.yaml
@@ -96,6 +96,7 @@ x-tagGroups:
96 tags: 96 tags:
97 - Accounts 97 - Accounts
98 - User 98 - User
99 - My User
99 - name: Videos 100 - name: Videos
100 tags: 101 tags:
101 - Video 102 - Video
@@ -489,6 +490,20 @@ paths:
489 schema: 490 schema:
490 $ref: '#/components/schemas/UpdateUser' 491 $ref: '#/components/schemas/UpdateUser'
491 required: true 492 required: true
493 /users/register:
494 post:
495 summary: Register a user
496 tags:
497 - User
498 responses:
499 '204':
500 $ref: '#/paths/~1users~1me/put/responses/204'
501 requestBody:
502 content:
503 application/json:
504 schema:
505 $ref: '#/components/schemas/RegisterUser'
506 required: true
492 /users/me: 507 /users/me:
493 get: 508 get:
494 summary: Get current user information 509 summary: Get current user information
@@ -496,7 +511,7 @@ paths:
496 - OAuth2: 511 - OAuth2:
497 - user 512 - user
498 tags: 513 tags:
499 - User 514 - My User
500 responses: 515 responses:
501 '200': 516 '200':
502 description: successful operation 517 description: successful operation
@@ -512,7 +527,7 @@ paths:
512 - OAuth2: 527 - OAuth2:
513 - user 528 - user
514 tags: 529 tags:
515 - User 530 - My User
516 responses: 531 responses:
517 '204': 532 '204':
518 description: Successful operation 533 description: Successful operation
@@ -522,6 +537,25 @@ paths:
522 schema: 537 schema:
523 $ref: '#/components/schemas/UpdateMe' 538 $ref: '#/components/schemas/UpdateMe'
524 required: true 539 required: true
540 /users/me/videos/imports:
541 get:
542 summary: Get video imports of current user
543 security:
544 - OAuth2:
545 - user
546 tags:
547 - My User
548 parameters:
549 - $ref: '#/components/parameters/start'
550 - $ref: '#/components/parameters/count'
551 - $ref: '#/components/parameters/sort'
552 responses:
553 '200':
554 description: successful operation
555 content:
556 application/json:
557 schema:
558 $ref: '#/components/schemas/VideoImport'
525 /users/me/video-quota-used: 559 /users/me/video-quota-used:
526 get: 560 get:
527 summary: Get current user used quota 561 summary: Get current user used quota
@@ -529,7 +563,7 @@ paths:
529 - OAuth2: 563 - OAuth2:
530 - user 564 - user
531 tags: 565 tags:
532 - User 566 - My User
533 responses: 567 responses:
534 '200': 568 '200':
535 description: successful operation 569 description: successful operation
@@ -543,7 +577,7 @@ paths:
543 security: 577 security:
544 - OAuth2: [] 578 - OAuth2: []
545 tags: 579 tags:
546 - User 580 - My User
547 parameters: 581 parameters:
548 - name: videoId 582 - name: videoId
549 in: path 583 in: path
@@ -565,7 +599,7 @@ paths:
565 - OAuth2: 599 - OAuth2:
566 - user 600 - user
567 tags: 601 tags:
568 - User 602 - My User
569 parameters: 603 parameters:
570 - $ref: '#/components/parameters/start' 604 - $ref: '#/components/parameters/start'
571 - $ref: '#/components/parameters/count' 605 - $ref: '#/components/parameters/count'
@@ -584,7 +618,7 @@ paths:
584 - OAuth2: 618 - OAuth2:
585 - user 619 - user
586 tags: 620 tags:
587 - User 621 - My User
588 parameters: 622 parameters:
589 - $ref: '#/components/parameters/start' 623 - $ref: '#/components/parameters/start'
590 - $ref: '#/components/parameters/count' 624 - $ref: '#/components/parameters/count'
@@ -598,7 +632,7 @@ paths:
598 - OAuth2: 632 - OAuth2:
599 - user 633 - user
600 tags: 634 tags:
601 - User 635 - My User
602 responses: 636 responses:
603 '200': 637 '200':
604 description: successful operation 638 description: successful operation
@@ -609,7 +643,7 @@ paths:
609 - OAuth2: 643 - OAuth2:
610 - user 644 - user
611 tags: 645 tags:
612 - User 646 - My User
613 parameters: 647 parameters:
614 - $ref: '#/components/parameters/subscriptionsUris' 648 - $ref: '#/components/parameters/subscriptionsUris'
615 responses: 649 responses:
@@ -626,7 +660,7 @@ paths:
626 - OAuth2: 660 - OAuth2:
627 - user 661 - user
628 tags: 662 tags:
629 - User 663 - My User
630 parameters: 664 parameters:
631 - $ref: '#/components/parameters/start' 665 - $ref: '#/components/parameters/start'
632 - $ref: '#/components/parameters/count' 666 - $ref: '#/components/parameters/count'
@@ -645,7 +679,7 @@ paths:
645 - OAuth2: 679 - OAuth2:
646 - user 680 - user
647 tags: 681 tags:
648 - User 682 - My User
649 parameters: 683 parameters:
650 - $ref: '#/components/parameters/subscriptionHandle' 684 - $ref: '#/components/parameters/subscriptionHandle'
651 responses: 685 responses:
@@ -661,33 +695,19 @@ paths:
661 - OAuth2: 695 - OAuth2:
662 - user 696 - user
663 tags: 697 tags:
664 - User 698 - My User
665 parameters: 699 parameters:
666 - $ref: '#/components/parameters/subscriptionHandle' 700 - $ref: '#/components/parameters/subscriptionHandle'
667 responses: 701 responses:
668 '200': 702 '200':
669 description: successful operation 703 description: successful operation
670 /users/register:
671 post:
672 summary: Register a user
673 tags:
674 - User
675 responses:
676 '204':
677 $ref: '#/paths/~1users~1me/put/responses/204'
678 requestBody:
679 content:
680 application/json:
681 schema:
682 $ref: '#/components/schemas/RegisterUser'
683 required: true
684 /users/me/avatar/pick: 704 /users/me/avatar/pick:
685 post: 705 post:
686 summary: Update current user avatar 706 summary: Update current user avatar
687 security: 707 security:
688 - OAuth2: [] 708 - OAuth2: []
689 tags: 709 tags:
690 - User 710 - My User
691 responses: 711 responses:
692 '200': 712 '200':
693 description: successful operation 713 description: successful operation
@@ -2045,6 +2065,42 @@ components:
2045 type: array 2065 type: array
2046 items: 2066 items:
2047 $ref: '#/components/schemas/VideoStreamingPlaylists' 2067 $ref: '#/components/schemas/VideoStreamingPlaylists'
2068 VideoImportStateConstant:
2069 properties:
2070 id:
2071 type: integer
2072 enum:
2073 - 1
2074 - 2
2075 - 3
2076 description: 'The video import state (Pending = 1, Success = 2, Failed = 3)'
2077 label:
2078 type: string
2079 VideoImport:
2080 properties:
2081 id:
2082 type: number
2083 targetUrl:
2084 type: string
2085 magnetUri:
2086 type: string
2087 torrentName:
2088 type: string
2089 state:
2090 type: object
2091 properties:
2092 id:
2093 $ref: '#/components/schemas/VideoImportStateConstant'
2094 label:
2095 type: string
2096 error:
2097 type: string
2098 createdAt:
2099 type: string
2100 updatedAt:
2101 type: string
2102 video:
2103 $ref: '#/components/schemas/Video'
2048 VideoAbuse: 2104 VideoAbuse:
2049 properties: 2105 properties:
2050 id: 2106 id: