1
0

openapi.json 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498
  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. "parameters": [
  181. {
  182. "name": "dueDate",
  183. "in": "query",
  184. "description": "ISO 8601 formatted date time string",
  185. "required": true,
  186. "schema": {
  187. "type": "string"
  188. }
  189. },
  190. {
  191. "name": "version",
  192. "in": "path",
  193. "required": true,
  194. "schema": {
  195. "type": "string",
  196. "pattern": "^1$"
  197. }
  198. },
  199. {
  200. "name": "fileId",
  201. "in": "path",
  202. "description": "ID of the file",
  203. "required": true,
  204. "schema": {
  205. "type": "integer",
  206. "format": "int64"
  207. }
  208. },
  209. {
  210. "name": "OCS-APIRequest",
  211. "in": "header",
  212. "description": "Required to be true for the API request to pass",
  213. "required": true,
  214. "schema": {
  215. "type": "boolean",
  216. "default": true
  217. }
  218. }
  219. ],
  220. "responses": {
  221. "200": {
  222. "description": "Reminder updated",
  223. "content": {
  224. "application/json": {
  225. "schema": {
  226. "type": "object",
  227. "required": [
  228. "ocs"
  229. ],
  230. "properties": {
  231. "ocs": {
  232. "type": "object",
  233. "required": [
  234. "meta",
  235. "data"
  236. ],
  237. "properties": {
  238. "meta": {
  239. "$ref": "#/components/schemas/OCSMeta"
  240. },
  241. "data": {}
  242. }
  243. }
  244. }
  245. }
  246. }
  247. }
  248. },
  249. "201": {
  250. "description": "Reminder created successfully",
  251. "content": {
  252. "application/json": {
  253. "schema": {
  254. "type": "object",
  255. "required": [
  256. "ocs"
  257. ],
  258. "properties": {
  259. "ocs": {
  260. "type": "object",
  261. "required": [
  262. "meta",
  263. "data"
  264. ],
  265. "properties": {
  266. "meta": {
  267. "$ref": "#/components/schemas/OCSMeta"
  268. },
  269. "data": {}
  270. }
  271. }
  272. }
  273. }
  274. }
  275. }
  276. },
  277. "400": {
  278. "description": "Creating reminder is not possible",
  279. "content": {
  280. "application/json": {
  281. "schema": {
  282. "type": "object",
  283. "required": [
  284. "ocs"
  285. ],
  286. "properties": {
  287. "ocs": {
  288. "type": "object",
  289. "required": [
  290. "meta",
  291. "data"
  292. ],
  293. "properties": {
  294. "meta": {
  295. "$ref": "#/components/schemas/OCSMeta"
  296. },
  297. "data": {}
  298. }
  299. }
  300. }
  301. }
  302. }
  303. }
  304. },
  305. "401": {
  306. "description": "Account not found",
  307. "content": {
  308. "application/json": {
  309. "schema": {
  310. "type": "object",
  311. "required": [
  312. "ocs"
  313. ],
  314. "properties": {
  315. "ocs": {
  316. "type": "object",
  317. "required": [
  318. "meta",
  319. "data"
  320. ],
  321. "properties": {
  322. "meta": {
  323. "$ref": "#/components/schemas/OCSMeta"
  324. },
  325. "data": {}
  326. }
  327. }
  328. }
  329. }
  330. }
  331. }
  332. },
  333. "404": {
  334. "description": "File not found",
  335. "content": {
  336. "application/json": {
  337. "schema": {
  338. "type": "object",
  339. "required": [
  340. "ocs"
  341. ],
  342. "properties": {
  343. "ocs": {
  344. "type": "object",
  345. "required": [
  346. "meta",
  347. "data"
  348. ],
  349. "properties": {
  350. "meta": {
  351. "$ref": "#/components/schemas/OCSMeta"
  352. },
  353. "data": {}
  354. }
  355. }
  356. }
  357. }
  358. }
  359. }
  360. }
  361. }
  362. },
  363. "delete": {
  364. "operationId": "api-remove",
  365. "summary": "Remove a reminder",
  366. "tags": [
  367. "api"
  368. ],
  369. "security": [
  370. {
  371. "bearer_auth": []
  372. },
  373. {
  374. "basic_auth": []
  375. }
  376. ],
  377. "parameters": [
  378. {
  379. "name": "version",
  380. "in": "path",
  381. "required": true,
  382. "schema": {
  383. "type": "string",
  384. "pattern": "^1$"
  385. }
  386. },
  387. {
  388. "name": "fileId",
  389. "in": "path",
  390. "description": "ID of the file",
  391. "required": true,
  392. "schema": {
  393. "type": "integer",
  394. "format": "int64"
  395. }
  396. },
  397. {
  398. "name": "OCS-APIRequest",
  399. "in": "header",
  400. "description": "Required to be true for the API request to pass",
  401. "required": true,
  402. "schema": {
  403. "type": "boolean",
  404. "default": true
  405. }
  406. }
  407. ],
  408. "responses": {
  409. "200": {
  410. "description": "Reminder deleted successfully",
  411. "content": {
  412. "application/json": {
  413. "schema": {
  414. "type": "object",
  415. "required": [
  416. "ocs"
  417. ],
  418. "properties": {
  419. "ocs": {
  420. "type": "object",
  421. "required": [
  422. "meta",
  423. "data"
  424. ],
  425. "properties": {
  426. "meta": {
  427. "$ref": "#/components/schemas/OCSMeta"
  428. },
  429. "data": {}
  430. }
  431. }
  432. }
  433. }
  434. }
  435. }
  436. },
  437. "401": {
  438. "description": "Account not found",
  439. "content": {
  440. "application/json": {
  441. "schema": {
  442. "type": "object",
  443. "required": [
  444. "ocs"
  445. ],
  446. "properties": {
  447. "ocs": {
  448. "type": "object",
  449. "required": [
  450. "meta",
  451. "data"
  452. ],
  453. "properties": {
  454. "meta": {
  455. "$ref": "#/components/schemas/OCSMeta"
  456. },
  457. "data": {}
  458. }
  459. }
  460. }
  461. }
  462. }
  463. }
  464. },
  465. "404": {
  466. "description": "Reminder not found",
  467. "content": {
  468. "application/json": {
  469. "schema": {
  470. "type": "object",
  471. "required": [
  472. "ocs"
  473. ],
  474. "properties": {
  475. "ocs": {
  476. "type": "object",
  477. "required": [
  478. "meta",
  479. "data"
  480. ],
  481. "properties": {
  482. "meta": {
  483. "$ref": "#/components/schemas/OCSMeta"
  484. },
  485. "data": {}
  486. }
  487. }
  488. }
  489. }
  490. }
  491. }
  492. }
  493. }
  494. }
  495. }
  496. },
  497. "tags": []
  498. }