An unfinished system to manage all your paper documentation in an easy way.
Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

openapi.json 19KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560
  1. {
  2. "openapi": "3.0.2",
  3. "info": {
  4. "title": "AutoDoc API",
  5. "description": "API description of AutoDoc",
  6. "version": "1.0"
  7. },
  8. "servers": [
  9. {
  10. "url": "https://autodoc.home.spale.com/v1",
  11. "description": "Gloor AutoDoc Server"
  12. }
  13. ],
  14. "tags": [
  15. {
  16. "name": "Create",
  17. "description": "Create new documents/pages"
  18. },
  19. {
  20. "name": "Images",
  21. "description": "Get documents/pages images/thumbnails"
  22. },
  23. {
  24. "name": "Objects",
  25. "description": "Retrieve a document/page meta data"
  26. },
  27. {
  28. "name": "Properties",
  29. "description": "Manipulate properties"
  30. }
  31. ],
  32. "components": {
  33. "schemas": {
  34. "page": {
  35. "description": "page object",
  36. "type": "object",
  37. "properties": {
  38. "id": {
  39. "readOnly": true,
  40. "type": "integer",
  41. "minimum": 0,
  42. "maximum": 18446744073709551615
  43. },
  44. "documentId": {
  45. "readOnly": true,
  46. "description": "Link to Document",
  47. "type": "integer",
  48. "minimum": 0,
  49. "maximum": 18446744073709551615
  50. },
  51. "name": {
  52. "readOnly": false,
  53. "description": "Document name, may be empty",
  54. "type": "string"
  55. },
  56. "created": {
  57. "readOnly": true,
  58. "type": "integer",
  59. "minimum": 0,
  60. "maximum": 18446744073709551615
  61. },
  62. "owner": {
  63. "readOnly": true,
  64. "description": "Username of document owner",
  65. "type": "string"
  66. },
  67. "status": {
  68. "readOnly": true,
  69. "description": "Status of document",
  70. "type": "string",
  71. "enum": [
  72. "nodata",
  73. "inprogress",
  74. "deleted",
  75. "ok"
  76. ]
  77. },
  78. "languages": {
  79. "readOnly": true,
  80. "description": "Languages in document in order of importance",
  81. "type": "array",
  82. "items": {
  83. "type": "string",
  84. "enum": [
  85. "en",
  86. "de",
  87. "it",
  88. "fr"
  89. ]
  90. }
  91. }
  92. }
  93. },
  94. "document": {
  95. "description": "Document object",
  96. "type": "object",
  97. "properties": {
  98. "id": {
  99. "readOnly": true,
  100. "type": "integer",
  101. "minimum": 0,
  102. "maximum": 18446744073709551615
  103. },
  104. "pageId": {
  105. "readOnly": true,
  106. "description": "Link to PageIds",
  107. "type": "array",
  108. "items": {
  109. "type": "integer",
  110. "minimum": 0,
  111. "maximum": 18446744073709551615
  112. }
  113. },
  114. "primaryPage": {
  115. "readOnly": true,
  116. "description": "Which page is the default page",
  117. "type": "string"
  118. },
  119. "name": {
  120. "readOnly": false,
  121. "description": "Document name, may be empty",
  122. "type": "string"
  123. },
  124. "created": {
  125. "readOnly": true,
  126. "type": "integer",
  127. "minimum": 0,
  128. "maximum": 18446744073709551615
  129. },
  130. "owner": {
  131. "readOnly": true,
  132. "description": "Username of document owner",
  133. "type": "string"
  134. },
  135. "status": {
  136. "readOnly": true,
  137. "description": "Status of document",
  138. "type": "string",
  139. "enum": [
  140. "nodata",
  141. "inprogress",
  142. "deleted",
  143. "ok"
  144. ]
  145. },
  146. "languages": {
  147. "readOnly": true,
  148. "description": "Languages in document in order of importance",
  149. "type": "array",
  150. "items": {
  151. "type": "string",
  152. "enum": [
  153. "en",
  154. "de",
  155. "it",
  156. "fr"
  157. ]
  158. }
  159. },
  160. "tags": {
  161. "readOnly": true,
  162. "description": "List of all tags",
  163. "type": "array",
  164. "items": {
  165. "type": "string"
  166. }
  167. }
  168. }
  169. }
  170. },
  171. "parameters": {},
  172. "securitySchemes": {
  173. "basicAuth": {
  174. "type": "http",
  175. "scheme": "basic"
  176. }
  177. }
  178. },
  179. "security": [
  180. {
  181. "basicAuth": []
  182. }
  183. ],
  184. "paths": {
  185. "/documents": {
  186. "post": {
  187. "summary": "Create a new document",
  188. "tags": [
  189. "Create"
  190. ],
  191. "responses": {
  192. "200": {
  193. "description": "OK",
  194. "content": {
  195. "application/json": {
  196. "schema": {
  197. "$ref": "#/components/schemas/document"
  198. }
  199. }
  200. }
  201. }
  202. }
  203. },
  204. "get": {
  205. "summary": "Returns a list of documents",
  206. "tags": [
  207. "Objects"
  208. ],
  209. "parameters": [
  210. {
  211. "in": "query",
  212. "name": "pageSize",
  213. "schema": {
  214. "type": "integer",
  215. "minimum": 0,
  216. "maximum": 1000,
  217. "default": 50
  218. }
  219. },
  220. {
  221. "in": "query",
  222. "name": "pageIndex",
  223. "schema": {
  224. "type": "integer",
  225. "minimum": 0,
  226. "maximum": 65535,
  227. "default": 0
  228. }
  229. },
  230. {
  231. "in": "query",
  232. "name": "filterLanguage",
  233. "schema": {
  234. "type": "array",
  235. "items": {
  236. "type": "string",
  237. "enum": [
  238. "fr",
  239. "de",
  240. "it",
  241. "en"
  242. ]
  243. }
  244. }
  245. },
  246. {
  247. "in": "query",
  248. "name": "filterKeyword",
  249. "schema": {
  250. "type": "array",
  251. "items": {
  252. "type": "string"
  253. }
  254. }
  255. },
  256. {
  257. "in": "query",
  258. "name": "filterTag",
  259. "schema": {
  260. "type": "array",
  261. "items": {
  262. "type": "string"
  263. }
  264. }
  265. }
  266. ],
  267. "responses": {
  268. "200": {
  269. "description": "OK",
  270. "content": {
  271. "application/json": {
  272. "schema": {
  273. "type": "array",
  274. "items": {
  275. "$ref": "#/components/schemas/document"
  276. }
  277. }
  278. }
  279. }
  280. }
  281. }
  282. }
  283. },
  284. "/documents/{documentId}": {
  285. "patch": {
  286. "summary": "Manipulate document properties",
  287. "tags": [
  288. "Properties"
  289. ],
  290. "parameters": [
  291. {
  292. "in": "path",
  293. "name": "documentId",
  294. "required": true,
  295. "schema": {
  296. "type": "integer",
  297. "minimum": 0,
  298. "maximum": 18446744073709551615
  299. }
  300. },
  301. {
  302. "in": "query",
  303. "name": "addTags",
  304. "required": false,
  305. "schema": {
  306. "type": "array",
  307. "maxItems": 64,
  308. "items": {
  309. "type": "string",
  310. "minLength": 1,
  311. "maxLength": 64
  312. }
  313. }
  314. },
  315. {
  316. "in": "query",
  317. "name": "deleteTags",
  318. "required": false,
  319. "schema": {
  320. "type": "array",
  321. "maxItems": 64,
  322. "items": {
  323. "type": "string",
  324. "minLength": 1,
  325. "maxLength": 64
  326. }
  327. }
  328. },
  329. {
  330. "in": "query",
  331. "name": "name",
  332. "required": false,
  333. "schema": {
  334. "type": "string"
  335. }
  336. }
  337. ],
  338. "responses": {
  339. "200": {
  340. "description": "OK"
  341. }
  342. }
  343. },
  344. "get": {
  345. "summary": "retrieve a document meta data",
  346. "tags": [
  347. "Objects"
  348. ],
  349. "parameters": [
  350. {
  351. "in": "path",
  352. "name": "documentId",
  353. "required": true,
  354. "schema": {
  355. "type": "integer",
  356. "minimum": 0,
  357. "maximum": 18446744073709551615
  358. }
  359. }
  360. ],
  361. "responses": {
  362. "200": {
  363. "description": "OK",
  364. "content": {
  365. "application/json": {
  366. "schema": {
  367. "$ref": "#/components/schemas/document"
  368. }
  369. }
  370. }
  371. },
  372. "404": {
  373. "description": "Document not found"
  374. }
  375. }
  376. }
  377. },
  378. "/documents/{documentId}/image": {
  379. "get": {
  380. "summary": "Get an image or thumbnail of the document",
  381. "tags": [
  382. "Images"
  383. ],
  384. "parameters": [
  385. {
  386. "in": "path",
  387. "name": "documentId",
  388. "required": true,
  389. "schema": {
  390. "type": "integer",
  391. "minimum": 0,
  392. "maximum": 18446744073709551615
  393. }
  394. },
  395. {
  396. "in": "query",
  397. "name": "maxWidth",
  398. "schema": {
  399. "type": "integer",
  400. "minimum": 1,
  401. "maximum": 10000
  402. }
  403. },
  404. {
  405. "in": "query",
  406. "name": "maxHeight",
  407. "schema": {
  408. "type": "integer",
  409. "minimum": 1,
  410. "maximum": 10000
  411. }
  412. }
  413. ],
  414. "responses": {
  415. "200": {
  416. "description": "OK",
  417. "content": {
  418. "image/*": {
  419. "schema": {
  420. "type": "string",
  421. "format": "binary"
  422. }
  423. }
  424. }
  425. }
  426. }
  427. }
  428. },
  429. "/documents/{documentId}/data": {
  430. "post": {
  431. "summary": "Add one (or multiple if PDF) page to the document",
  432. "tags": [
  433. "Create"
  434. ],
  435. "parameters": [
  436. {
  437. "in": "path",
  438. "name": "documentId",
  439. "required": true,
  440. "schema": {
  441. "type": "integer",
  442. "minimum": 0,
  443. "maximum": 18446744073709551615
  444. }
  445. }
  446. ],
  447. "requestBody": {
  448. "content": {
  449. "image/png": {
  450. "schema": {
  451. "type": "string",
  452. "format": "binary"
  453. }
  454. },
  455. "image/jpeg": {
  456. "schema": {
  457. "type": "string",
  458. "format": "binary"
  459. }
  460. },
  461. "application/pdf": {
  462. "schema": {
  463. "type": "string",
  464. "format": "binary"
  465. }
  466. }
  467. }
  468. },
  469. "responses": {
  470. "200": {
  471. "description": "OK"
  472. }
  473. }
  474. }
  475. },
  476. "/pages/{pageId}": {
  477. "get": {
  478. "summary": "Get page properties",
  479. "tags": [
  480. "Objects"
  481. ],
  482. "parameters": [
  483. {
  484. "in": "path",
  485. "name": "pageId",
  486. "required": true,
  487. "schema": {
  488. "type": "integer",
  489. "minimum": 0,
  490. "maximum": 18446744073709551615
  491. }
  492. }
  493. ],
  494. "responses": {
  495. "200": {
  496. "description": "OK",
  497. "content": {
  498. "application/json": {
  499. "schema": {
  500. "$ref": "#/components/schemas/page"
  501. }
  502. }
  503. }
  504. }
  505. }
  506. }
  507. },
  508. "/pages/{pageId}/image": {
  509. "get": {
  510. "summary": "get an image or thumbnail of the page",
  511. "tags": [
  512. "Images"
  513. ],
  514. "parameters": [
  515. {
  516. "in": "path",
  517. "name": "pageId",
  518. "required": true,
  519. "schema": {
  520. "type": "integer",
  521. "minimum": 0,
  522. "maximum": 18446744073709551615
  523. }
  524. },
  525. {
  526. "in": "query",
  527. "name": "maxWidth",
  528. "schema": {
  529. "type": "integer",
  530. "minimum": 1,
  531. "maximum": 10000
  532. }
  533. },
  534. {
  535. "in": "query",
  536. "name": "maxHeight",
  537. "schema": {
  538. "type": "integer",
  539. "minimum": 1,
  540. "maximum": 10000
  541. }
  542. }
  543. ],
  544. "responses": {
  545. "200": {
  546. "description": "OK",
  547. "content": {
  548. "image/*": {
  549. "schema": {
  550. "type": "string",
  551. "format": "binary"
  552. }
  553. }
  554. }
  555. }
  556. }
  557. }
  558. }
  559. }
  560. }