aboutsummaryrefslogtreecommitdiffhomepage
path: root/support
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2019-06-11 10:01:13 +0200
committerChocobozzz <me@florianbigard.com>2019-06-11 10:01:22 +0200
commit5dce26d202d0bb2a794b4ab4075da541034c0381 (patch)
tree799ab656495f1aab2edf55a7aedf695c3378ec6e /support
parent9f167f12aafbcdda2e2cd2f436ff996ea41986ba (diff)
downloadPeerTube-5dce26d202d0bb2a794b4ab4075da541034c0381.tar.gz
PeerTube-5dce26d202d0bb2a794b4ab4075da541034c0381.tar.zst
PeerTube-5dce26d202d0bb2a794b4ab4075da541034c0381.zip
Improve video REST documentation
Diffstat (limited to 'support')
-rw-r--r--support/doc/api/openapi.yaml196
1 files changed, 170 insertions, 26 deletions
diff --git a/support/doc/api/openapi.yaml b/support/doc/api/openapi.yaml
index 332c0050c..e00fd0c83 100644
--- a/support/doc/api/openapi.yaml
+++ b/support/doc/api/openapi.yaml
@@ -844,21 +844,8 @@ paths:
844 commentsEnabled: 844 commentsEnabled:
845 description: Enable or disable comments for this video 845 description: Enable or disable comments for this video
846 type: string 846 type: string
847 scheduleUpdate: &ref_0 847 scheduleUpdate:
848 type: object 848 $ref: '#/components/schemas/VideoScheduledUpdate'
849 properties:
850 privacy:
851 type: string
852 enum:
853 - Public
854 - Unlisted
855 description: Video privacy target
856 updateAt:
857 type: string
858 format: date
859 description: When to update the video
860 required:
861 - updateAt
862 get: 849 get:
863 summary: Get a video by its id 850 summary: Get a video by its id
864 tags: 851 tags:
@@ -871,7 +858,7 @@ paths:
871 content: 858 content:
872 application/json: 859 application/json:
873 schema: 860 schema:
874 $ref: '#/components/schemas/Video' 861 $ref: '#/components/schemas/VideoDetails'
875 delete: 862 delete:
876 summary: Delete a video by its id 863 summary: Delete a video by its id
877 security: 864 security:
@@ -1053,7 +1040,8 @@ paths:
1053 commentsEnabled: 1040 commentsEnabled:
1054 description: Enable or disable comments for this video 1041 description: Enable or disable comments for this video
1055 type: string 1042 type: string
1056 scheduleUpdate: *ref_0 1043 scheduleUpdate:
1044 $ref: '#/components/schemas/VideoScheduledUpdate'
1057 required: 1045 required:
1058 - videofile 1046 - videofile
1059 - channelId 1047 - channelId
@@ -1157,7 +1145,8 @@ paths:
1157 commentsEnabled: 1145 commentsEnabled:
1158 description: Enable or disable comments for this video 1146 description: Enable or disable comments for this video
1159 type: string 1147 type: string
1160 scheduleUpdate: *ref_0 1148 scheduleUpdate:
1149 $ref: '#/components/schemas/VideoScheduledUpdate'
1161 required: 1150 required:
1162 - channelId 1151 - channelId
1163 - name 1152 - name
@@ -1834,6 +1823,112 @@ components:
1834 - 3 1823 - 3
1835 label: 1824 label:
1836 type: string 1825 type: string
1826 VideoStateConstant:
1827 properties:
1828 id:
1829 type: integer
1830 enum:
1831 - 1
1832 - 2
1833 - 3
1834 description: 'The video state (Published = 1, to transcode = 2, to import = 3)'
1835 label:
1836 type: string
1837 VideoResolutionConstant:
1838 properties:
1839 id:
1840 type: integer
1841 description: 'Video resolution (240, 360, 720 ...)'
1842 label:
1843 type: string
1844 VideoScheduledUpdate:
1845 properties:
1846 privacy:
1847 $ref: '#/components/schemas/VideoPrivacySet'
1848 description: Video privacy target
1849 updateAt:
1850 type: string
1851 format: date
1852 description: When to update the video
1853 required:
1854 - updateAt
1855 VideoAccountSummary:
1856 properties:
1857 id:
1858 type: number
1859 name:
1860 type: string
1861 displayName:
1862 type: string
1863 url:
1864 type: string
1865 host:
1866 type: string
1867 avatar:
1868 nullable: true
1869 $ref: '#/components/schemas/Avatar'
1870 VideoChannelSummary:
1871 properties:
1872 id:
1873 type: number
1874 name:
1875 type: string
1876 displayName:
1877 type: string
1878 url:
1879 type: string
1880 host:
1881 type: string
1882 avatar:
1883 nullable: true
1884 $ref: '#/components/schemas/Avatar'
1885 PlaylistElement:
1886 properties:
1887 position:
1888 type: number
1889 startTimestamp:
1890 type: number
1891 stopTimestamp:
1892 type: number
1893 VideoFile:
1894 properties:
1895 magnetUri:
1896 type: string
1897 resolution:
1898 $ref: '#/components/schemas/VideoResolutionConstant'
1899 size:
1900 type: number
1901 description: 'Video file size in bytes'
1902 torrentUrl:
1903 type: string
1904 torrentDownaloadUrl:
1905 type: string
1906 fileUrl:
1907 type: string
1908 fileDownloadUrl:
1909 type: string
1910 fps:
1911 type: number
1912 VideoStreamingPlaylists:
1913 properties:
1914 id:
1915 type: number
1916 type:
1917 type: number
1918 enum:
1919 - 1
1920 description: 'Playlist type (HLS = 1)'
1921 playlistUrl:
1922 type: string
1923 segmentsSha256Url:
1924 type: string
1925 redundancies:
1926 type: array
1927 items:
1928 type: object
1929 properties:
1930 baseUrl:
1931 type: string
1837 Video: 1932 Video:
1838 properties: 1933 properties:
1839 id: 1934 id:
@@ -1846,6 +1941,8 @@ components:
1846 type: string 1941 type: string
1847 updatedAt: 1942 updatedAt:
1848 type: string 1943 type: string
1944 originallyPublishedAt:
1945 type: string
1849 category: 1946 category:
1850 $ref: '#/components/schemas/VideoConstantNumber' 1947 $ref: '#/components/schemas/VideoConstantNumber'
1851 licence: 1948 licence:
@@ -1876,19 +1973,66 @@ components:
1876 type: number 1973 type: number
1877 nsfw: 1974 nsfw:
1878 type: boolean 1975 type: boolean
1976 waitTranscoding:
1977 type: boolean
1978 nullable: true
1979 state:
1980 $ref: '#/components/schemas/VideoStateConstant'
1981 scheduledUpdate:
1982 nullable: true
1983 $ref: '#/components/schemas/VideoScheduledUpdate'
1984 blacklisted:
1985 nullable: true
1986 type: boolean
1987 blacklistedReason:
1988 nullable: true
1989 type: string
1879 account: 1990 account:
1991 $ref: '#/components/schemas/VideoAccountSummary'
1992 channel:
1993 $ref: '#/components/schemas/VideoChannelSummary'
1994 userHistory:
1995 nullable: true
1880 type: object 1996 type: object
1881 properties: 1997 properties:
1882 name: 1998 currentTime:
1883 type: string 1999 type: number
1884 displayName: 2000 playlistElement:
1885 type: string 2001 nullable: true
1886 url: 2002 $ref: '#/components/schemas/PlaylistElement'
2003 VideoDetails:
2004 allOf:
2005 - $ref: '#/components/schemas/Video'
2006 - type: object
2007 properties:
2008 descriptionPath:
1887 type: string 2009 type: string
1888 host: 2010 support:
1889 type: string 2011 type: string
1890 avatar: 2012 channel:
1891 $ref: '#/components/schemas/Avatar' 2013 $ref: '#/components/schemas/VideoChannel'
2014 account:
2015 $ref: '#/components/schemas/Account'
2016 tags:
2017 type: array
2018 items:
2019 type: string
2020 files:
2021 type: array
2022 items:
2023 $ref: '#/components/schemas/VideoFile'
2024 commentsEnabled:
2025 type: boolean
2026 downloadEnabled:
2027 type: boolean
2028 trackerUrls:
2029 type: array
2030 items:
2031 type: string
2032 streamingPlaylists:
2033 type: array
2034 items:
2035 $ref: '#/components/schemas/VideoStreamingPlaylists'
1892 VideoAbuse: 2036 VideoAbuse:
1893 properties: 2037 properties:
1894 id: 2038 id: