openapi.json 6.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192
  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. "description": "Required to be true for the API request to pass",
  111. "required": true,
  112. "schema": {
  113. "type": "boolean",
  114. "default": true
  115. }
  116. }
  117. ],
  118. "responses": {
  119. "200": {
  120. "description": "Direct link returned",
  121. "content": {
  122. "application/json": {
  123. "schema": {
  124. "type": "object",
  125. "required": [
  126. "ocs"
  127. ],
  128. "properties": {
  129. "ocs": {
  130. "type": "object",
  131. "required": [
  132. "meta",
  133. "data"
  134. ],
  135. "properties": {
  136. "meta": {
  137. "$ref": "#/components/schemas/OCSMeta"
  138. },
  139. "data": {
  140. "type": "object",
  141. "required": [
  142. "url"
  143. ],
  144. "properties": {
  145. "url": {
  146. "type": "string"
  147. }
  148. }
  149. }
  150. }
  151. }
  152. }
  153. }
  154. }
  155. }
  156. },
  157. "404": {
  158. "description": "File not found",
  159. "content": {
  160. "text/plain": {
  161. "schema": {
  162. "type": "string"
  163. }
  164. }
  165. }
  166. },
  167. "400": {
  168. "description": "Getting direct link is not possible",
  169. "content": {
  170. "text/plain": {
  171. "schema": {
  172. "type": "string"
  173. }
  174. }
  175. }
  176. },
  177. "403": {
  178. "description": "Missing permissions to get direct link",
  179. "content": {
  180. "text/plain": {
  181. "schema": {
  182. "type": "string"
  183. }
  184. }
  185. }
  186. }
  187. }
  188. }
  189. }
  190. },
  191. "tags": []
  192. }