openapi.json 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326
  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. "OutOfOfficeData": {
  70. "type": "object",
  71. "required": [
  72. "id",
  73. "userId",
  74. "firstDay",
  75. "lastDay",
  76. "status",
  77. "message"
  78. ],
  79. "properties": {
  80. "id": {
  81. "type": "integer",
  82. "format": "int64"
  83. },
  84. "userId": {
  85. "type": "string"
  86. },
  87. "firstDay": {
  88. "type": "string"
  89. },
  90. "lastDay": {
  91. "type": "string"
  92. },
  93. "status": {
  94. "type": "string"
  95. },
  96. "message": {
  97. "type": "string"
  98. }
  99. }
  100. }
  101. }
  102. },
  103. "paths": {
  104. "/ocs/v2.php/apps/dav/api/v1/direct": {
  105. "post": {
  106. "operationId": "direct-get-url",
  107. "summary": "Get a direct link to a file",
  108. "tags": [
  109. "direct"
  110. ],
  111. "security": [
  112. {
  113. "bearer_auth": []
  114. },
  115. {
  116. "basic_auth": []
  117. }
  118. ],
  119. "parameters": [
  120. {
  121. "name": "fileId",
  122. "in": "query",
  123. "description": "ID of the file",
  124. "required": true,
  125. "schema": {
  126. "type": "integer",
  127. "format": "int64"
  128. }
  129. },
  130. {
  131. "name": "expirationTime",
  132. "in": "query",
  133. "description": "Duration until the link expires",
  134. "schema": {
  135. "type": "integer",
  136. "format": "int64"
  137. }
  138. },
  139. {
  140. "name": "OCS-APIRequest",
  141. "in": "header",
  142. "description": "Required to be true for the API request to pass",
  143. "required": true,
  144. "schema": {
  145. "type": "boolean",
  146. "default": true
  147. }
  148. }
  149. ],
  150. "responses": {
  151. "200": {
  152. "description": "Direct link returned",
  153. "content": {
  154. "application/json": {
  155. "schema": {
  156. "type": "object",
  157. "required": [
  158. "ocs"
  159. ],
  160. "properties": {
  161. "ocs": {
  162. "type": "object",
  163. "required": [
  164. "meta",
  165. "data"
  166. ],
  167. "properties": {
  168. "meta": {
  169. "$ref": "#/components/schemas/OCSMeta"
  170. },
  171. "data": {
  172. "type": "object",
  173. "required": [
  174. "url"
  175. ],
  176. "properties": {
  177. "url": {
  178. "type": "string"
  179. }
  180. }
  181. }
  182. }
  183. }
  184. }
  185. }
  186. }
  187. }
  188. },
  189. "404": {
  190. "description": "File not found",
  191. "content": {
  192. "text/plain": {
  193. "schema": {
  194. "type": "string"
  195. }
  196. }
  197. }
  198. },
  199. "400": {
  200. "description": "Getting direct link is not possible",
  201. "content": {
  202. "text/plain": {
  203. "schema": {
  204. "type": "string"
  205. }
  206. }
  207. }
  208. },
  209. "403": {
  210. "description": "Missing permissions to get direct link",
  211. "content": {
  212. "text/plain": {
  213. "schema": {
  214. "type": "string"
  215. }
  216. }
  217. }
  218. }
  219. }
  220. }
  221. },
  222. "/ocs/v2.php/apps/dav/api/v1/outOfOffice/{userId}": {
  223. "get": {
  224. "operationId": "out_of_office-get-current-out-of-office-data",
  225. "summary": "Get the currently configured out-of-office data of a user.",
  226. "tags": [
  227. "out_of_office"
  228. ],
  229. "security": [
  230. {
  231. "bearer_auth": []
  232. },
  233. {
  234. "basic_auth": []
  235. }
  236. ],
  237. "parameters": [
  238. {
  239. "name": "userId",
  240. "in": "path",
  241. "description": "The user id to get out-of-office data for.",
  242. "required": true,
  243. "schema": {
  244. "type": "string"
  245. }
  246. },
  247. {
  248. "name": "OCS-APIRequest",
  249. "in": "header",
  250. "description": "Required to be true for the API request to pass",
  251. "required": true,
  252. "schema": {
  253. "type": "boolean",
  254. "default": true
  255. }
  256. }
  257. ],
  258. "responses": {
  259. "200": {
  260. "description": "Out-of-office data",
  261. "content": {
  262. "application/json": {
  263. "schema": {
  264. "type": "object",
  265. "required": [
  266. "ocs"
  267. ],
  268. "properties": {
  269. "ocs": {
  270. "type": "object",
  271. "required": [
  272. "meta",
  273. "data"
  274. ],
  275. "properties": {
  276. "meta": {
  277. "$ref": "#/components/schemas/OCSMeta"
  278. },
  279. "data": {
  280. "$ref": "#/components/schemas/OutOfOfficeData",
  281. "nullable": true
  282. }
  283. }
  284. }
  285. }
  286. }
  287. }
  288. }
  289. },
  290. "404": {
  291. "description": "No out-of-office data was found",
  292. "content": {
  293. "application/json": {
  294. "schema": {
  295. "type": "object",
  296. "required": [
  297. "ocs"
  298. ],
  299. "properties": {
  300. "ocs": {
  301. "type": "object",
  302. "required": [
  303. "meta",
  304. "data"
  305. ],
  306. "properties": {
  307. "meta": {
  308. "$ref": "#/components/schemas/OCSMeta"
  309. },
  310. "data": {
  311. "$ref": "#/components/schemas/OutOfOfficeData",
  312. "nullable": true
  313. }
  314. }
  315. }
  316. }
  317. }
  318. }
  319. }
  320. }
  321. }
  322. }
  323. }
  324. },
  325. "tags": []
  326. }