openapi.json 6.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191
  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": "string"
  162. }
  163. }
  164. }
  165. },
  166. "400": {
  167. "description": "Getting direct link is not possible",
  168. "content": {
  169. "text/plain": {
  170. "schema": {
  171. "type": "string"
  172. }
  173. }
  174. }
  175. },
  176. "403": {
  177. "description": "Missing permissions to get direct link",
  178. "content": {
  179. "text/plain": {
  180. "schema": {
  181. "type": "string"
  182. }
  183. }
  184. }
  185. }
  186. }
  187. }
  188. }
  189. },
  190. "tags": []
  191. }