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.

583 lines
25 KiB

  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. "anyOf": [
  142. {
  143. "type": "object",
  144. "required": [
  145. "ocs"
  146. ],
  147. "properties": {
  148. "ocs": {
  149. "type": "object",
  150. "required": [
  151. "meta",
  152. "data"
  153. ],
  154. "properties": {
  155. "meta": {
  156. "$ref": "#/components/schemas/OCSMeta"
  157. },
  158. "data": {}
  159. }
  160. }
  161. }
  162. },
  163. {
  164. "type": "object",
  165. "required": [
  166. "ocs"
  167. ],
  168. "properties": {
  169. "ocs": {
  170. "type": "object",
  171. "required": [
  172. "meta",
  173. "data"
  174. ],
  175. "properties": {
  176. "meta": {
  177. "$ref": "#/components/schemas/OCSMeta"
  178. },
  179. "data": {}
  180. }
  181. }
  182. }
  183. }
  184. ]
  185. }
  186. }
  187. }
  188. }
  189. }
  190. },
  191. "put": {
  192. "operationId": "api-set",
  193. "summary": "Set a reminder",
  194. "tags": [
  195. "api"
  196. ],
  197. "security": [
  198. {
  199. "bearer_auth": []
  200. },
  201. {
  202. "basic_auth": []
  203. }
  204. ],
  205. "requestBody": {
  206. "required": true,
  207. "content": {
  208. "application/json": {
  209. "schema": {
  210. "type": "object",
  211. "required": [
  212. "dueDate"
  213. ],
  214. "properties": {
  215. "dueDate": {
  216. "type": "string",
  217. "description": "ISO 8601 formatted date time string"
  218. }
  219. }
  220. }
  221. }
  222. }
  223. },
  224. "parameters": [
  225. {
  226. "name": "version",
  227. "in": "path",
  228. "required": true,
  229. "schema": {
  230. "type": "string",
  231. "pattern": "^1$"
  232. }
  233. },
  234. {
  235. "name": "fileId",
  236. "in": "path",
  237. "description": "ID of the file",
  238. "required": true,
  239. "schema": {
  240. "type": "integer",
  241. "format": "int64"
  242. }
  243. },
  244. {
  245. "name": "OCS-APIRequest",
  246. "in": "header",
  247. "description": "Required to be true for the API request to pass",
  248. "required": true,
  249. "schema": {
  250. "type": "boolean",
  251. "default": true
  252. }
  253. }
  254. ],
  255. "responses": {
  256. "200": {
  257. "description": "Reminder updated",
  258. "content": {
  259. "application/json": {
  260. "schema": {
  261. "type": "object",
  262. "required": [
  263. "ocs"
  264. ],
  265. "properties": {
  266. "ocs": {
  267. "type": "object",
  268. "required": [
  269. "meta",
  270. "data"
  271. ],
  272. "properties": {
  273. "meta": {
  274. "$ref": "#/components/schemas/OCSMeta"
  275. },
  276. "data": {}
  277. }
  278. }
  279. }
  280. }
  281. }
  282. }
  283. },
  284. "201": {
  285. "description": "Reminder created successfully",
  286. "content": {
  287. "application/json": {
  288. "schema": {
  289. "type": "object",
  290. "required": [
  291. "ocs"
  292. ],
  293. "properties": {
  294. "ocs": {
  295. "type": "object",
  296. "required": [
  297. "meta",
  298. "data"
  299. ],
  300. "properties": {
  301. "meta": {
  302. "$ref": "#/components/schemas/OCSMeta"
  303. },
  304. "data": {}
  305. }
  306. }
  307. }
  308. }
  309. }
  310. }
  311. },
  312. "400": {
  313. "description": "Creating reminder is not possible",
  314. "content": {
  315. "application/json": {
  316. "schema": {
  317. "type": "object",
  318. "required": [
  319. "ocs"
  320. ],
  321. "properties": {
  322. "ocs": {
  323. "type": "object",
  324. "required": [
  325. "meta",
  326. "data"
  327. ],
  328. "properties": {
  329. "meta": {
  330. "$ref": "#/components/schemas/OCSMeta"
  331. },
  332. "data": {}
  333. }
  334. }
  335. }
  336. }
  337. }
  338. }
  339. },
  340. "401": {
  341. "description": "Account not found",
  342. "content": {
  343. "application/json": {
  344. "schema": {
  345. "anyOf": [
  346. {
  347. "type": "object",
  348. "required": [
  349. "ocs"
  350. ],
  351. "properties": {
  352. "ocs": {
  353. "type": "object",
  354. "required": [
  355. "meta",
  356. "data"
  357. ],
  358. "properties": {
  359. "meta": {
  360. "$ref": "#/components/schemas/OCSMeta"
  361. },
  362. "data": {}
  363. }
  364. }
  365. }
  366. },
  367. {
  368. "type": "object",
  369. "required": [
  370. "ocs"
  371. ],
  372. "properties": {
  373. "ocs": {
  374. "type": "object",
  375. "required": [
  376. "meta",
  377. "data"
  378. ],
  379. "properties": {
  380. "meta": {
  381. "$ref": "#/components/schemas/OCSMeta"
  382. },
  383. "data": {}
  384. }
  385. }
  386. }
  387. }
  388. ]
  389. }
  390. }
  391. }
  392. },
  393. "404": {
  394. "description": "File not found",
  395. "content": {
  396. "application/json": {
  397. "schema": {
  398. "type": "object",
  399. "required": [
  400. "ocs"
  401. ],
  402. "properties": {
  403. "ocs": {
  404. "type": "object",
  405. "required": [
  406. "meta",
  407. "data"
  408. ],
  409. "properties": {
  410. "meta": {
  411. "$ref": "#/components/schemas/OCSMeta"
  412. },
  413. "data": {}
  414. }
  415. }
  416. }
  417. }
  418. }
  419. }
  420. }
  421. }
  422. },
  423. "delete": {
  424. "operationId": "api-remove",
  425. "summary": "Remove a reminder",
  426. "tags": [
  427. "api"
  428. ],
  429. "security": [
  430. {
  431. "bearer_auth": []
  432. },
  433. {
  434. "basic_auth": []
  435. }
  436. ],
  437. "parameters": [
  438. {
  439. "name": "version",
  440. "in": "path",
  441. "required": true,
  442. "schema": {
  443. "type": "string",
  444. "pattern": "^1$"
  445. }
  446. },
  447. {
  448. "name": "fileId",
  449. "in": "path",
  450. "description": "ID of the file",
  451. "required": true,
  452. "schema": {
  453. "type": "integer",
  454. "format": "int64"
  455. }
  456. },
  457. {
  458. "name": "OCS-APIRequest",
  459. "in": "header",
  460. "description": "Required to be true for the API request to pass",
  461. "required": true,
  462. "schema": {
  463. "type": "boolean",
  464. "default": true
  465. }
  466. }
  467. ],
  468. "responses": {
  469. "200": {
  470. "description": "Reminder deleted successfully",
  471. "content": {
  472. "application/json": {
  473. "schema": {
  474. "type": "object",
  475. "required": [
  476. "ocs"
  477. ],
  478. "properties": {
  479. "ocs": {
  480. "type": "object",
  481. "required": [
  482. "meta",
  483. "data"
  484. ],
  485. "properties": {
  486. "meta": {
  487. "$ref": "#/components/schemas/OCSMeta"
  488. },
  489. "data": {}
  490. }
  491. }
  492. }
  493. }
  494. }
  495. }
  496. },
  497. "401": {
  498. "description": "Account not found",
  499. "content": {
  500. "application/json": {
  501. "schema": {
  502. "anyOf": [
  503. {
  504. "type": "object",
  505. "required": [
  506. "ocs"
  507. ],
  508. "properties": {
  509. "ocs": {
  510. "type": "object",
  511. "required": [
  512. "meta",
  513. "data"
  514. ],
  515. "properties": {
  516. "meta": {
  517. "$ref": "#/components/schemas/OCSMeta"
  518. },
  519. "data": {}
  520. }
  521. }
  522. }
  523. },
  524. {
  525. "type": "object",
  526. "required": [
  527. "ocs"
  528. ],
  529. "properties": {
  530. "ocs": {
  531. "type": "object",
  532. "required": [
  533. "meta",
  534. "data"
  535. ],
  536. "properties": {
  537. "meta": {
  538. "$ref": "#/components/schemas/OCSMeta"
  539. },
  540. "data": {}
  541. }
  542. }
  543. }
  544. }
  545. ]
  546. }
  547. }
  548. }
  549. },
  550. "404": {
  551. "description": "Reminder not found",
  552. "content": {
  553. "application/json": {
  554. "schema": {
  555. "type": "object",
  556. "required": [
  557. "ocs"
  558. ],
  559. "properties": {
  560. "ocs": {
  561. "type": "object",
  562. "required": [
  563. "meta",
  564. "data"
  565. ],
  566. "properties": {
  567. "meta": {
  568. "$ref": "#/components/schemas/OCSMeta"
  569. },
  570. "data": {}
  571. }
  572. }
  573. }
  574. }
  575. }
  576. }
  577. }
  578. }
  579. }
  580. }
  581. },
  582. "tags": []
  583. }