openapi.json 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495
  1. {
  2. "openapi": "3.0.3",
  3. "info": {
  4. "title": "files_reminders",
  5. "version": "0.0.1",
  6. "description": "Set file reminders",
  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. "OCSMeta": {
  24. "type": "object",
  25. "required": [
  26. "status",
  27. "statuscode"
  28. ],
  29. "properties": {
  30. "status": {
  31. "type": "string"
  32. },
  33. "statuscode": {
  34. "type": "integer"
  35. },
  36. "message": {
  37. "type": "string"
  38. },
  39. "totalitems": {
  40. "type": "string"
  41. },
  42. "itemsperpage": {
  43. "type": "string"
  44. }
  45. }
  46. }
  47. }
  48. },
  49. "paths": {
  50. "/ocs/v2.php/apps/files_reminders/api/v{version}/{fileId}": {
  51. "get": {
  52. "operationId": "api-get",
  53. "summary": "Get a reminder",
  54. "tags": [
  55. "api"
  56. ],
  57. "security": [
  58. {
  59. "bearer_auth": []
  60. },
  61. {
  62. "basic_auth": []
  63. }
  64. ],
  65. "parameters": [
  66. {
  67. "name": "version",
  68. "in": "path",
  69. "required": true,
  70. "schema": {
  71. "type": "string",
  72. "pattern": "^1$"
  73. }
  74. },
  75. {
  76. "name": "fileId",
  77. "in": "path",
  78. "description": "ID of the file",
  79. "required": true,
  80. "schema": {
  81. "type": "integer",
  82. "format": "int64"
  83. }
  84. },
  85. {
  86. "name": "OCS-APIRequest",
  87. "in": "header",
  88. "required": true,
  89. "schema": {
  90. "type": "string",
  91. "default": "true"
  92. }
  93. }
  94. ],
  95. "responses": {
  96. "200": {
  97. "description": "Reminder returned",
  98. "content": {
  99. "application/json": {
  100. "schema": {
  101. "type": "object",
  102. "required": [
  103. "ocs"
  104. ],
  105. "properties": {
  106. "ocs": {
  107. "type": "object",
  108. "required": [
  109. "meta",
  110. "data"
  111. ],
  112. "properties": {
  113. "meta": {
  114. "$ref": "#/components/schemas/OCSMeta"
  115. },
  116. "data": {
  117. "type": "object",
  118. "required": [
  119. "dueDate"
  120. ],
  121. "properties": {
  122. "dueDate": {
  123. "type": "string",
  124. "nullable": true
  125. }
  126. }
  127. }
  128. }
  129. }
  130. }
  131. }
  132. }
  133. }
  134. },
  135. "401": {
  136. "description": "User not found",
  137. "content": {
  138. "application/json": {
  139. "schema": {
  140. "type": "object",
  141. "required": [
  142. "ocs"
  143. ],
  144. "properties": {
  145. "ocs": {
  146. "type": "object",
  147. "required": [
  148. "meta",
  149. "data"
  150. ],
  151. "properties": {
  152. "meta": {
  153. "$ref": "#/components/schemas/OCSMeta"
  154. },
  155. "data": {}
  156. }
  157. }
  158. }
  159. }
  160. }
  161. }
  162. }
  163. }
  164. },
  165. "put": {
  166. "operationId": "api-set",
  167. "summary": "Set a reminder",
  168. "tags": [
  169. "api"
  170. ],
  171. "security": [
  172. {
  173. "bearer_auth": []
  174. },
  175. {
  176. "basic_auth": []
  177. }
  178. ],
  179. "parameters": [
  180. {
  181. "name": "dueDate",
  182. "in": "query",
  183. "description": "ISO 8601 formatted date time string",
  184. "required": true,
  185. "schema": {
  186. "type": "string"
  187. }
  188. },
  189. {
  190. "name": "version",
  191. "in": "path",
  192. "required": true,
  193. "schema": {
  194. "type": "string",
  195. "pattern": "^1$"
  196. }
  197. },
  198. {
  199. "name": "fileId",
  200. "in": "path",
  201. "description": "ID of the file",
  202. "required": true,
  203. "schema": {
  204. "type": "integer",
  205. "format": "int64"
  206. }
  207. },
  208. {
  209. "name": "OCS-APIRequest",
  210. "in": "header",
  211. "required": true,
  212. "schema": {
  213. "type": "string",
  214. "default": "true"
  215. }
  216. }
  217. ],
  218. "responses": {
  219. "200": {
  220. "description": "Reminder updated",
  221. "content": {
  222. "application/json": {
  223. "schema": {
  224. "type": "object",
  225. "required": [
  226. "ocs"
  227. ],
  228. "properties": {
  229. "ocs": {
  230. "type": "object",
  231. "required": [
  232. "meta",
  233. "data"
  234. ],
  235. "properties": {
  236. "meta": {
  237. "$ref": "#/components/schemas/OCSMeta"
  238. },
  239. "data": {}
  240. }
  241. }
  242. }
  243. }
  244. }
  245. }
  246. },
  247. "201": {
  248. "description": "Reminder created successfully",
  249. "content": {
  250. "application/json": {
  251. "schema": {
  252. "type": "object",
  253. "required": [
  254. "ocs"
  255. ],
  256. "properties": {
  257. "ocs": {
  258. "type": "object",
  259. "required": [
  260. "meta",
  261. "data"
  262. ],
  263. "properties": {
  264. "meta": {
  265. "$ref": "#/components/schemas/OCSMeta"
  266. },
  267. "data": {}
  268. }
  269. }
  270. }
  271. }
  272. }
  273. }
  274. },
  275. "400": {
  276. "description": "Creating reminder is not possible",
  277. "content": {
  278. "application/json": {
  279. "schema": {
  280. "type": "object",
  281. "required": [
  282. "ocs"
  283. ],
  284. "properties": {
  285. "ocs": {
  286. "type": "object",
  287. "required": [
  288. "meta",
  289. "data"
  290. ],
  291. "properties": {
  292. "meta": {
  293. "$ref": "#/components/schemas/OCSMeta"
  294. },
  295. "data": {}
  296. }
  297. }
  298. }
  299. }
  300. }
  301. }
  302. },
  303. "401": {
  304. "description": "User not found",
  305. "content": {
  306. "application/json": {
  307. "schema": {
  308. "type": "object",
  309. "required": [
  310. "ocs"
  311. ],
  312. "properties": {
  313. "ocs": {
  314. "type": "object",
  315. "required": [
  316. "meta",
  317. "data"
  318. ],
  319. "properties": {
  320. "meta": {
  321. "$ref": "#/components/schemas/OCSMeta"
  322. },
  323. "data": {}
  324. }
  325. }
  326. }
  327. }
  328. }
  329. }
  330. },
  331. "404": {
  332. "description": "File not found",
  333. "content": {
  334. "application/json": {
  335. "schema": {
  336. "type": "object",
  337. "required": [
  338. "ocs"
  339. ],
  340. "properties": {
  341. "ocs": {
  342. "type": "object",
  343. "required": [
  344. "meta",
  345. "data"
  346. ],
  347. "properties": {
  348. "meta": {
  349. "$ref": "#/components/schemas/OCSMeta"
  350. },
  351. "data": {}
  352. }
  353. }
  354. }
  355. }
  356. }
  357. }
  358. }
  359. }
  360. },
  361. "delete": {
  362. "operationId": "api-remove",
  363. "summary": "Remove a reminder",
  364. "tags": [
  365. "api"
  366. ],
  367. "security": [
  368. {
  369. "bearer_auth": []
  370. },
  371. {
  372. "basic_auth": []
  373. }
  374. ],
  375. "parameters": [
  376. {
  377. "name": "version",
  378. "in": "path",
  379. "required": true,
  380. "schema": {
  381. "type": "string",
  382. "pattern": "^1$"
  383. }
  384. },
  385. {
  386. "name": "fileId",
  387. "in": "path",
  388. "description": "ID of the file",
  389. "required": true,
  390. "schema": {
  391. "type": "integer",
  392. "format": "int64"
  393. }
  394. },
  395. {
  396. "name": "OCS-APIRequest",
  397. "in": "header",
  398. "required": true,
  399. "schema": {
  400. "type": "string",
  401. "default": "true"
  402. }
  403. }
  404. ],
  405. "responses": {
  406. "200": {
  407. "description": "Reminder deleted successfully",
  408. "content": {
  409. "application/json": {
  410. "schema": {
  411. "type": "object",
  412. "required": [
  413. "ocs"
  414. ],
  415. "properties": {
  416. "ocs": {
  417. "type": "object",
  418. "required": [
  419. "meta",
  420. "data"
  421. ],
  422. "properties": {
  423. "meta": {
  424. "$ref": "#/components/schemas/OCSMeta"
  425. },
  426. "data": {}
  427. }
  428. }
  429. }
  430. }
  431. }
  432. }
  433. },
  434. "401": {
  435. "description": "User not found",
  436. "content": {
  437. "application/json": {
  438. "schema": {
  439. "type": "object",
  440. "required": [
  441. "ocs"
  442. ],
  443. "properties": {
  444. "ocs": {
  445. "type": "object",
  446. "required": [
  447. "meta",
  448. "data"
  449. ],
  450. "properties": {
  451. "meta": {
  452. "$ref": "#/components/schemas/OCSMeta"
  453. },
  454. "data": {}
  455. }
  456. }
  457. }
  458. }
  459. }
  460. }
  461. },
  462. "404": {
  463. "description": "Reminder not found",
  464. "content": {
  465. "application/json": {
  466. "schema": {
  467. "type": "object",
  468. "required": [
  469. "ocs"
  470. ],
  471. "properties": {
  472. "ocs": {
  473. "type": "object",
  474. "required": [
  475. "meta",
  476. "data"
  477. ],
  478. "properties": {
  479. "meta": {
  480. "$ref": "#/components/schemas/OCSMeta"
  481. },
  482. "data": {}
  483. }
  484. }
  485. }
  486. }
  487. }
  488. }
  489. }
  490. }
  491. }
  492. }
  493. },
  494. "tags": []
  495. }