You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

openapi.json 7.8KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238
  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. "required": true,
  193. "schema": {
  194. "type": "string",
  195. "default": "true"
  196. }
  197. }
  198. ],
  199. "responses": {
  200. "200": {
  201. "description": "User mounts returned",
  202. "content": {
  203. "application/json": {
  204. "schema": {
  205. "type": "object",
  206. "required": [
  207. "ocs"
  208. ],
  209. "properties": {
  210. "ocs": {
  211. "type": "object",
  212. "required": [
  213. "meta",
  214. "data"
  215. ],
  216. "properties": {
  217. "meta": {
  218. "$ref": "#/components/schemas/OCSMeta"
  219. },
  220. "data": {
  221. "type": "array",
  222. "items": {
  223. "$ref": "#/components/schemas/Mount"
  224. }
  225. }
  226. }
  227. }
  228. }
  229. }
  230. }
  231. }
  232. }
  233. }
  234. }
  235. }
  236. },
  237. "tags": []
  238. }