An unfinished system to manage all your paper documentation in an easy way.
Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523
  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. "tags": {
  93. "readOnly": true,
  94. "description": "List of all tags",
  95. "type": "array",
  96. "items": {
  97. "type": "string"
  98. }
  99. }
  100. }
  101. },
  102. "document": {
  103. "description": "Document object",
  104. "type": "object",
  105. "properties": {
  106. "id": {
  107. "readOnly": true,
  108. "type": "integer",
  109. "minimum": 0,
  110. "maximum": 18446744073709551615
  111. },
  112. "pageId": {
  113. "readOnly": true,
  114. "description": "Link to PageIds",
  115. "type": "array",
  116. "items": {
  117. "type": "integer",
  118. "minimum": 0,
  119. "maximum": 18446744073709551615
  120. }
  121. },
  122. "name": {
  123. "readOnly": false,
  124. "description": "Document name, may be empty",
  125. "type": "string"
  126. },
  127. "created": {
  128. "readOnly": true,
  129. "type": "integer",
  130. "minimum": 0,
  131. "maximum": 18446744073709551615
  132. },
  133. "owner": {
  134. "readOnly": true,
  135. "description": "Username of document owner",
  136. "type": "string"
  137. },
  138. "status": {
  139. "readOnly": true,
  140. "description": "Status of document",
  141. "type": "string",
  142. "enum": [
  143. "nodata",
  144. "inprogress",
  145. "deleted",
  146. "ok"
  147. ]
  148. },
  149. "languages": {
  150. "readOnly": true,
  151. "description": "Languages in document in order of importance",
  152. "type": "array",
  153. "items": {
  154. "type": "string",
  155. "enum": [
  156. "en",
  157. "de",
  158. "it",
  159. "fr"
  160. ]
  161. }
  162. }
  163. }
  164. }
  165. },
  166. "parameters": {},
  167. "securitySchemes": {
  168. "basicAuth": {
  169. "type": "http",
  170. "scheme": "basic"
  171. }
  172. }
  173. },
  174. "security": [
  175. {
  176. "basicAuth": []
  177. }
  178. ],
  179. "paths": {
  180. "/documents": {
  181. "post": {
  182. "summary": "Create a new document",
  183. "tags": [
  184. "Create"
  185. ],
  186. "responses": {
  187. "200": {
  188. "description": "OK",
  189. "content": {
  190. "application/json": {
  191. "schema": {
  192. "$ref": "#/components/schemas/document"
  193. }
  194. }
  195. }
  196. }
  197. }
  198. },
  199. "get": {
  200. "summary": "Returns a list of documents",
  201. "tags": [
  202. "Objects"
  203. ],
  204. "parameters": [
  205. {
  206. "in": "query",
  207. "name": "pageSize",
  208. "schema": {
  209. "type": "integer",
  210. "minimum": 0,
  211. "maximum": 1000,
  212. "default": 50
  213. }
  214. },
  215. {
  216. "in": "query",
  217. "name": "pageIndex",
  218. "schema": {
  219. "type": "integer",
  220. "minimum": 0,
  221. "maximum": 65535,
  222. "default": 0
  223. }
  224. },
  225. {
  226. "in": "query",
  227. "name": "filterLanguage",
  228. "schema": {
  229. "type": "array",
  230. "items": {
  231. "type": "string",
  232. "enum": [
  233. "fr",
  234. "de",
  235. "it",
  236. "en"
  237. ]
  238. }
  239. }
  240. },
  241. {
  242. "in": "query",
  243. "name": "filterKeyword",
  244. "schema": {
  245. "type": "array",
  246. "items": {
  247. "type": "string"
  248. }
  249. }
  250. },
  251. {
  252. "in": "query",
  253. "name": "filterTag",
  254. "schema": {
  255. "type": "array",
  256. "items": {
  257. "type": "string"
  258. }
  259. }
  260. }
  261. ],
  262. "responses": {
  263. "200": {
  264. "description": "OK",
  265. "content": {
  266. "application/json": {
  267. "schema": {
  268. "type": "array",
  269. "items": {
  270. "$ref": "#/components/schemas/document"
  271. }
  272. }
  273. }
  274. }
  275. }
  276. }
  277. }
  278. },
  279. "/documents/{documentId}": {
  280. "patch": {
  281. "summary": "Manipulate document properties",
  282. "tags": [
  283. "Properties"
  284. ],
  285. "parameters": [
  286. {
  287. "in": "path",
  288. "name": "documentId",
  289. "required": true,
  290. "schema": {
  291. "type": "integer",
  292. "minimum": 0,
  293. "maximum": 18446744073709551615
  294. }
  295. },
  296. {
  297. "in": "query",
  298. "name": "addTags",
  299. "required": false,
  300. "schema": {
  301. "type": "array",
  302. "maxItems": 64,
  303. "items": {
  304. "type": "string",
  305. "minLength": 1,
  306. "maxLength": 64
  307. }
  308. }
  309. },
  310. {
  311. "in": "query",
  312. "name": "deleteTags",
  313. "required": false,
  314. "schema": {
  315. "type": "array",
  316. "maxItems": 64,
  317. "items": {
  318. "type": "string",
  319. "minLength": 1,
  320. "maxLength": 64
  321. }
  322. }
  323. },
  324. {
  325. "in": "query",
  326. "name": "name",
  327. "required": false,
  328. "schema": {
  329. "type": "string"
  330. }
  331. }
  332. ],
  333. "responses": {
  334. "200": {
  335. "description": "OK"
  336. }
  337. }
  338. },
  339. "get": {
  340. "summary": "retrieve a document meta data",
  341. "tags": [
  342. "Objects"
  343. ],
  344. "parameters": [
  345. {
  346. "in": "path",
  347. "name": "documentId",
  348. "required": true,
  349. "schema": {
  350. "type": "integer",
  351. "minimum": 0,
  352. "maximum": 18446744073709551615
  353. }
  354. }
  355. ],
  356. "responses": {
  357. "200": {
  358. "description": "OK",
  359. "content": {
  360. "application/json": {
  361. "schema": {
  362. "$ref": "#/components/schemas/document"
  363. }
  364. }
  365. }
  366. },
  367. "404": {
  368. "description": "Document not found"
  369. }
  370. }
  371. }
  372. },
  373. "/documents/{documentId}/image": {
  374. "get": {
  375. "summary": "Get an image or thumbnail of the document",
  376. "tags": [
  377. "Images"
  378. ],
  379. "parameters": [
  380. {
  381. "in": "query",
  382. "name": "maxWidth",
  383. "schema": {
  384. "type": "integer",
  385. "minimum": 1,
  386. "maximum": 10000
  387. }
  388. },
  389. {
  390. "in": "query",
  391. "name": "maxHeight",
  392. "schema": {
  393. "type": "integer",
  394. "minimum": 1,
  395. "maximum": 10000
  396. }
  397. }
  398. ],
  399. "responses": {
  400. "200": {
  401. "description": "OK",
  402. "content": {
  403. "image/*": {
  404. "schema": {
  405. "type": "string",
  406. "format": "binary"
  407. }
  408. }
  409. }
  410. }
  411. }
  412. }
  413. },
  414. "/documents/{documentId}/data": {
  415. "post": {
  416. "summary": "Add one (or multiple if PDF) page to the document",
  417. "tags": [
  418. "Create"
  419. ],
  420. "requestBody": {
  421. "content": {
  422. "image/png": {
  423. "schema": {
  424. "type": "string",
  425. "format": "binary"
  426. }
  427. },
  428. "image/jpeg": {
  429. "schema": {
  430. "type": "string",
  431. "format": "binary"
  432. }
  433. },
  434. "application/pdf": {
  435. "schema": {
  436. "type": "string",
  437. "format": "binary"
  438. }
  439. }
  440. }
  441. },
  442. "responses": {
  443. "200": {
  444. "description": "OK"
  445. }
  446. }
  447. }
  448. },
  449. "/pages/{pageId}": {
  450. "get": {
  451. "summary": "Get page properties",
  452. "tags": [
  453. "Objects"
  454. ],
  455. "parameters": [
  456. {
  457. "in": "path",
  458. "name": "pageId",
  459. "required": true,
  460. "schema": {
  461. "type": "integer",
  462. "minimum": 0,
  463. "maximum": 18446744073709551615
  464. }
  465. }
  466. ],
  467. "responses": {
  468. "200": {
  469. "description": "OK",
  470. "content": {
  471. "application/json": {
  472. "schema": {
  473. "$ref": "#/components/schemas/page"
  474. }
  475. }
  476. }
  477. }
  478. }
  479. }
  480. },
  481. "/pages/{pageId}/image": {
  482. "get": {
  483. "summary": "get an image or thumbnail of the page",
  484. "tags": [
  485. "Images"
  486. ],
  487. "parameters": [
  488. {
  489. "in": "query",
  490. "name": "maxWidth",
  491. "schema": {
  492. "type": "integer",
  493. "minimum": 1,
  494. "maximum": 10000
  495. }
  496. },
  497. {
  498. "in": "query",
  499. "name": "maxHeight",
  500. "schema": {
  501. "type": "integer",
  502. "minimum": 1,
  503. "maximum": 10000
  504. }
  505. }
  506. ],
  507. "responses": {
  508. "200": {
  509. "description": "OK",
  510. "content": {
  511. "image/*": {
  512. "schema": {
  513. "type": "string",
  514. "format": "binary"
  515. }
  516. }
  517. }
  518. }
  519. }
  520. }
  521. }
  522. }
  523. }