openapi.json 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508
  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. "description": "Required to be true for the API request to pass",
  89. "required": true,
  90. "schema": {
  91. "type": "boolean",
  92. "default": true
  93. }
  94. }
  95. ],
  96. "responses": {
  97. "200": {
  98. "description": "Reminder returned",
  99. "content": {
  100. "application/json": {
  101. "schema": {
  102. "type": "object",
  103. "required": [
  104. "ocs"
  105. ],
  106. "properties": {
  107. "ocs": {
  108. "type": "object",
  109. "required": [
  110. "meta",
  111. "data"
  112. ],
  113. "properties": {
  114. "meta": {
  115. "$ref": "#/components/schemas/OCSMeta"
  116. },
  117. "data": {
  118. "type": "object",
  119. "required": [
  120. "dueDate"
  121. ],
  122. "properties": {
  123. "dueDate": {
  124. "type": "string",
  125. "nullable": true
  126. }
  127. }
  128. }
  129. }
  130. }
  131. }
  132. }
  133. }
  134. }
  135. },
  136. "401": {
  137. "description": "Account not found",
  138. "content": {
  139. "application/json": {
  140. "schema": {
  141. "type": "object",
  142. "required": [
  143. "ocs"
  144. ],
  145. "properties": {
  146. "ocs": {
  147. "type": "object",
  148. "required": [
  149. "meta",
  150. "data"
  151. ],
  152. "properties": {
  153. "meta": {
  154. "$ref": "#/components/schemas/OCSMeta"
  155. },
  156. "data": {}
  157. }
  158. }
  159. }
  160. }
  161. }
  162. }
  163. }
  164. }
  165. },
  166. "put": {
  167. "operationId": "api-set",
  168. "summary": "Set a reminder",
  169. "tags": [
  170. "api"
  171. ],
  172. "security": [
  173. {
  174. "bearer_auth": []
  175. },
  176. {
  177. "basic_auth": []
  178. }
  179. ],
  180. "requestBody": {
  181. "required": true,
  182. "content": {
  183. "application/json": {
  184. "schema": {
  185. "type": "object",
  186. "required": [
  187. "dueDate"
  188. ],
  189. "properties": {
  190. "dueDate": {
  191. "type": "string",
  192. "description": "ISO 8601 formatted date time string"
  193. }
  194. }
  195. }
  196. }
  197. }
  198. },
  199. "parameters": [
  200. {
  201. "name": "version",
  202. "in": "path",
  203. "required": true,
  204. "schema": {
  205. "type": "string",
  206. "pattern": "^1$"
  207. }
  208. },
  209. {
  210. "name": "fileId",
  211. "in": "path",
  212. "description": "ID of the file",
  213. "required": true,
  214. "schema": {
  215. "type": "integer",
  216. "format": "int64"
  217. }
  218. },
  219. {
  220. "name": "OCS-APIRequest",
  221. "in": "header",
  222. "description": "Required to be true for the API request to pass",
  223. "required": true,
  224. "schema": {
  225. "type": "boolean",
  226. "default": true
  227. }
  228. }
  229. ],
  230. "responses": {
  231. "200": {
  232. "description": "Reminder updated",
  233. "content": {
  234. "application/json": {
  235. "schema": {
  236. "type": "object",
  237. "required": [
  238. "ocs"
  239. ],
  240. "properties": {
  241. "ocs": {
  242. "type": "object",
  243. "required": [
  244. "meta",
  245. "data"
  246. ],
  247. "properties": {
  248. "meta": {
  249. "$ref": "#/components/schemas/OCSMeta"
  250. },
  251. "data": {}
  252. }
  253. }
  254. }
  255. }
  256. }
  257. }
  258. },
  259. "201": {
  260. "description": "Reminder created successfully",
  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. }
  281. }
  282. }
  283. }
  284. }
  285. }
  286. },
  287. "400": {
  288. "description": "Creating reminder is not possible",
  289. "content": {
  290. "application/json": {
  291. "schema": {
  292. "type": "object",
  293. "required": [
  294. "ocs"
  295. ],
  296. "properties": {
  297. "ocs": {
  298. "type": "object",
  299. "required": [
  300. "meta",
  301. "data"
  302. ],
  303. "properties": {
  304. "meta": {
  305. "$ref": "#/components/schemas/OCSMeta"
  306. },
  307. "data": {}
  308. }
  309. }
  310. }
  311. }
  312. }
  313. }
  314. },
  315. "401": {
  316. "description": "Account not found",
  317. "content": {
  318. "application/json": {
  319. "schema": {
  320. "type": "object",
  321. "required": [
  322. "ocs"
  323. ],
  324. "properties": {
  325. "ocs": {
  326. "type": "object",
  327. "required": [
  328. "meta",
  329. "data"
  330. ],
  331. "properties": {
  332. "meta": {
  333. "$ref": "#/components/schemas/OCSMeta"
  334. },
  335. "data": {}
  336. }
  337. }
  338. }
  339. }
  340. }
  341. }
  342. },
  343. "404": {
  344. "description": "File not found",
  345. "content": {
  346. "application/json": {
  347. "schema": {
  348. "type": "object",
  349. "required": [
  350. "ocs"
  351. ],
  352. "properties": {
  353. "ocs": {
  354. "type": "object",
  355. "required": [
  356. "meta",
  357. "data"
  358. ],
  359. "properties": {
  360. "meta": {
  361. "$ref": "#/components/schemas/OCSMeta"
  362. },
  363. "data": {}
  364. }
  365. }
  366. }
  367. }
  368. }
  369. }
  370. }
  371. }
  372. },
  373. "delete": {
  374. "operationId": "api-remove",
  375. "summary": "Remove a reminder",
  376. "tags": [
  377. "api"
  378. ],
  379. "security": [
  380. {
  381. "bearer_auth": []
  382. },
  383. {
  384. "basic_auth": []
  385. }
  386. ],
  387. "parameters": [
  388. {
  389. "name": "version",
  390. "in": "path",
  391. "required": true,
  392. "schema": {
  393. "type": "string",
  394. "pattern": "^1$"
  395. }
  396. },
  397. {
  398. "name": "fileId",
  399. "in": "path",
  400. "description": "ID of the file",
  401. "required": true,
  402. "schema": {
  403. "type": "integer",
  404. "format": "int64"
  405. }
  406. },
  407. {
  408. "name": "OCS-APIRequest",
  409. "in": "header",
  410. "description": "Required to be true for the API request to pass",
  411. "required": true,
  412. "schema": {
  413. "type": "boolean",
  414. "default": true
  415. }
  416. }
  417. ],
  418. "responses": {
  419. "200": {
  420. "description": "Reminder deleted successfully",
  421. "content": {
  422. "application/json": {
  423. "schema": {
  424. "type": "object",
  425. "required": [
  426. "ocs"
  427. ],
  428. "properties": {
  429. "ocs": {
  430. "type": "object",
  431. "required": [
  432. "meta",
  433. "data"
  434. ],
  435. "properties": {
  436. "meta": {
  437. "$ref": "#/components/schemas/OCSMeta"
  438. },
  439. "data": {}
  440. }
  441. }
  442. }
  443. }
  444. }
  445. }
  446. },
  447. "401": {
  448. "description": "Account not found",
  449. "content": {
  450. "application/json": {
  451. "schema": {
  452. "type": "object",
  453. "required": [
  454. "ocs"
  455. ],
  456. "properties": {
  457. "ocs": {
  458. "type": "object",
  459. "required": [
  460. "meta",
  461. "data"
  462. ],
  463. "properties": {
  464. "meta": {
  465. "$ref": "#/components/schemas/OCSMeta"
  466. },
  467. "data": {}
  468. }
  469. }
  470. }
  471. }
  472. }
  473. }
  474. },
  475. "404": {
  476. "description": "Reminder not found",
  477. "content": {
  478. "application/json": {
  479. "schema": {
  480. "type": "object",
  481. "required": [
  482. "ocs"
  483. ],
  484. "properties": {
  485. "ocs": {
  486. "type": "object",
  487. "required": [
  488. "meta",
  489. "data"
  490. ],
  491. "properties": {
  492. "meta": {
  493. "$ref": "#/components/schemas/OCSMeta"
  494. },
  495. "data": {}
  496. }
  497. }
  498. }
  499. }
  500. }
  501. }
  502. }
  503. }
  504. }
  505. }
  506. },
  507. "tags": []
  508. }