1
0

openapi.json 9.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251
  1. {
  2. "openapi": "3.0.3",
  3. "info": {
  4. "title": "dav",
  5. "version": "0.0.1",
  6. "description": "WebDAV endpoint",
  7. "license": {
  8. "name": "agpl"
  9. }
  10. },
  11. "components": {
  12. "securitySchemes": {
  13. "basic_auth": {
  14. "type": "http",
  15. "scheme": "basic"
  16. },
  17. "bearer_auth": {
  18. "type": "http",
  19. "scheme": "bearer"
  20. }
  21. },
  22. "schemas": {
  23. "Capabilities": {
  24. "type": "object",
  25. "required": [
  26. "dav"
  27. ],
  28. "properties": {
  29. "dav": {
  30. "type": "object",
  31. "required": [
  32. "chunking"
  33. ],
  34. "properties": {
  35. "chunking": {
  36. "type": "string"
  37. },
  38. "bulkupload": {
  39. "type": "string"
  40. }
  41. }
  42. }
  43. }
  44. },
  45. "OCSMeta": {
  46. "type": "object",
  47. "required": [
  48. "status",
  49. "statuscode"
  50. ],
  51. "properties": {
  52. "status": {
  53. "type": "string"
  54. },
  55. "statuscode": {
  56. "type": "integer"
  57. },
  58. "message": {
  59. "type": "string"
  60. },
  61. "totalitems": {
  62. "type": "string"
  63. },
  64. "itemsperpage": {
  65. "type": "string"
  66. }
  67. }
  68. }
  69. }
  70. },
  71. "paths": {
  72. "/ocs/v2.php/apps/dav/api/v1/direct": {
  73. "post": {
  74. "operationId": "direct-get-url",
  75. "summary": "Get a direct link to a file",
  76. "tags": [
  77. "direct"
  78. ],
  79. "security": [
  80. {
  81. "bearer_auth": []
  82. },
  83. {
  84. "basic_auth": []
  85. }
  86. ],
  87. "parameters": [
  88. {
  89. "name": "fileId",
  90. "in": "query",
  91. "description": "ID of the file",
  92. "required": true,
  93. "schema": {
  94. "type": "integer",
  95. "format": "int64"
  96. }
  97. },
  98. {
  99. "name": "expirationTime",
  100. "in": "query",
  101. "description": "Duration until the link expires",
  102. "schema": {
  103. "type": "integer",
  104. "format": "int64"
  105. }
  106. },
  107. {
  108. "name": "OCS-APIRequest",
  109. "in": "header",
  110. "required": true,
  111. "schema": {
  112. "type": "string",
  113. "default": "true"
  114. }
  115. }
  116. ],
  117. "responses": {
  118. "200": {
  119. "description": "Direct link returned",
  120. "content": {
  121. "application/json": {
  122. "schema": {
  123. "type": "object",
  124. "required": [
  125. "ocs"
  126. ],
  127. "properties": {
  128. "ocs": {
  129. "type": "object",
  130. "required": [
  131. "meta",
  132. "data"
  133. ],
  134. "properties": {
  135. "meta": {
  136. "$ref": "#/components/schemas/OCSMeta"
  137. },
  138. "data": {
  139. "type": "object",
  140. "required": [
  141. "url"
  142. ],
  143. "properties": {
  144. "url": {
  145. "type": "string"
  146. }
  147. }
  148. }
  149. }
  150. }
  151. }
  152. }
  153. }
  154. }
  155. },
  156. "404": {
  157. "description": "File not found",
  158. "content": {
  159. "text/plain": {
  160. "schema": {
  161. "type": "object",
  162. "required": [
  163. "ocs"
  164. ],
  165. "properties": {
  166. "ocs": {
  167. "type": "object",
  168. "required": [
  169. "meta",
  170. "data"
  171. ],
  172. "properties": {
  173. "meta": {
  174. "$ref": "#/components/schemas/OCSMeta"
  175. },
  176. "data": {
  177. "type": "string"
  178. }
  179. }
  180. }
  181. }
  182. }
  183. }
  184. }
  185. },
  186. "400": {
  187. "description": "Getting direct link is not possible",
  188. "content": {
  189. "text/plain": {
  190. "schema": {
  191. "type": "object",
  192. "required": [
  193. "ocs"
  194. ],
  195. "properties": {
  196. "ocs": {
  197. "type": "object",
  198. "required": [
  199. "meta",
  200. "data"
  201. ],
  202. "properties": {
  203. "meta": {
  204. "$ref": "#/components/schemas/OCSMeta"
  205. },
  206. "data": {
  207. "type": "string"
  208. }
  209. }
  210. }
  211. }
  212. }
  213. }
  214. }
  215. },
  216. "403": {
  217. "description": "Missing permissions to get direct link",
  218. "content": {
  219. "text/plain": {
  220. "schema": {
  221. "type": "object",
  222. "required": [
  223. "ocs"
  224. ],
  225. "properties": {
  226. "ocs": {
  227. "type": "object",
  228. "required": [
  229. "meta",
  230. "data"
  231. ],
  232. "properties": {
  233. "meta": {
  234. "$ref": "#/components/schemas/OCSMeta"
  235. },
  236. "data": {
  237. "type": "string"
  238. }
  239. }
  240. }
  241. }
  242. }
  243. }
  244. }
  245. }
  246. }
  247. }
  248. }
  249. },
  250. "tags": []
  251. }