openapi.json 7.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239
  1. {
  2. "openapi": "3.0.3",
  3. "info": {
  4. "title": "files_external",
  5. "version": "0.0.1",
  6. "description": "Adds basic external storage support",
  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. "Mount": {
  24. "type": "object",
  25. "required": [
  26. "name",
  27. "path",
  28. "type",
  29. "backend",
  30. "scope",
  31. "permissions",
  32. "id",
  33. "class",
  34. "config"
  35. ],
  36. "properties": {
  37. "name": {
  38. "type": "string"
  39. },
  40. "path": {
  41. "type": "string"
  42. },
  43. "type": {
  44. "type": "string",
  45. "enum": [
  46. "dir"
  47. ]
  48. },
  49. "backend": {
  50. "type": "string"
  51. },
  52. "scope": {
  53. "type": "string",
  54. "enum": [
  55. "system",
  56. "personal"
  57. ]
  58. },
  59. "permissions": {
  60. "type": "integer",
  61. "format": "int64"
  62. },
  63. "id": {
  64. "type": "integer",
  65. "format": "int64"
  66. },
  67. "class": {
  68. "type": "string"
  69. },
  70. "config": {
  71. "$ref": "#/components/schemas/StorageConfig"
  72. }
  73. }
  74. },
  75. "OCSMeta": {
  76. "type": "object",
  77. "required": [
  78. "status",
  79. "statuscode"
  80. ],
  81. "properties": {
  82. "status": {
  83. "type": "string"
  84. },
  85. "statuscode": {
  86. "type": "integer"
  87. },
  88. "message": {
  89. "type": "string"
  90. },
  91. "totalitems": {
  92. "type": "string"
  93. },
  94. "itemsperpage": {
  95. "type": "string"
  96. }
  97. }
  98. },
  99. "StorageConfig": {
  100. "type": "object",
  101. "required": [
  102. "authMechanism",
  103. "backend",
  104. "backendOptions",
  105. "mountPoint",
  106. "type",
  107. "userProvided"
  108. ],
  109. "properties": {
  110. "applicableGroups": {
  111. "type": "array",
  112. "items": {
  113. "type": "string"
  114. }
  115. },
  116. "applicableUsers": {
  117. "type": "array",
  118. "items": {
  119. "type": "string"
  120. }
  121. },
  122. "authMechanism": {
  123. "type": "string"
  124. },
  125. "backend": {
  126. "type": "string"
  127. },
  128. "backendOptions": {
  129. "type": "object",
  130. "additionalProperties": {
  131. "type": "object"
  132. }
  133. },
  134. "id": {
  135. "type": "integer",
  136. "format": "int64"
  137. },
  138. "mountOptions": {
  139. "type": "object",
  140. "additionalProperties": {
  141. "type": "object"
  142. }
  143. },
  144. "mountPoint": {
  145. "type": "string"
  146. },
  147. "priority": {
  148. "type": "integer",
  149. "format": "int64"
  150. },
  151. "status": {
  152. "type": "integer",
  153. "format": "int64"
  154. },
  155. "statusMessage": {
  156. "type": "string"
  157. },
  158. "type": {
  159. "type": "string",
  160. "enum": [
  161. "personal",
  162. "system"
  163. ]
  164. },
  165. "userProvided": {
  166. "type": "boolean"
  167. }
  168. }
  169. }
  170. }
  171. },
  172. "paths": {
  173. "/ocs/v2.php/apps/files_external/api/v1/mounts": {
  174. "get": {
  175. "operationId": "api-get-user-mounts",
  176. "summary": "Get the mount points visible for this user",
  177. "tags": [
  178. "api"
  179. ],
  180. "security": [
  181. {
  182. "bearer_auth": []
  183. },
  184. {
  185. "basic_auth": []
  186. }
  187. ],
  188. "parameters": [
  189. {
  190. "name": "OCS-APIRequest",
  191. "in": "header",
  192. "description": "Required to be true for the API request to pass",
  193. "required": true,
  194. "schema": {
  195. "type": "boolean",
  196. "default": true
  197. }
  198. }
  199. ],
  200. "responses": {
  201. "200": {
  202. "description": "User mounts returned",
  203. "content": {
  204. "application/json": {
  205. "schema": {
  206. "type": "object",
  207. "required": [
  208. "ocs"
  209. ],
  210. "properties": {
  211. "ocs": {
  212. "type": "object",
  213. "required": [
  214. "meta",
  215. "data"
  216. ],
  217. "properties": {
  218. "meta": {
  219. "$ref": "#/components/schemas/OCSMeta"
  220. },
  221. "data": {
  222. "type": "array",
  223. "items": {
  224. "$ref": "#/components/schemas/Mount"
  225. }
  226. }
  227. }
  228. }
  229. }
  230. }
  231. }
  232. }
  233. }
  234. }
  235. }
  236. }
  237. },
  238. "tags": []
  239. }