An unfinished system to manage all your paper documentation in an easy way.
Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

openapi.json 17KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515
  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": "Tags",
  29. "description": "Manipulate tags"
  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 tags",
  282. "tags": [
  283. "Tags"
  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. "responses": {
  326. "200": {
  327. "description": "OK"
  328. }
  329. }
  330. },
  331. "get": {
  332. "summary": "retrieve a document meta data",
  333. "tags": [
  334. "Objects"
  335. ],
  336. "parameters": [
  337. {
  338. "in": "path",
  339. "name": "documentId",
  340. "required": true,
  341. "schema": {
  342. "type": "integer",
  343. "minimum": 0,
  344. "maximum": 18446744073709551615
  345. }
  346. }
  347. ],
  348. "responses": {
  349. "200": {
  350. "description": "OK",
  351. "content": {
  352. "application/json": {
  353. "schema": {
  354. "$ref": "#/components/schemas/document"
  355. }
  356. }
  357. }
  358. },
  359. "404": {
  360. "description": "Document not found"
  361. }
  362. }
  363. }
  364. },
  365. "/documents/{documentId}/image": {
  366. "get": {
  367. "summary": "Get an image or thumbnail of the document",
  368. "tags": [
  369. "Images"
  370. ],
  371. "parameters": [
  372. {
  373. "in": "query",
  374. "name": "maxWidth",
  375. "schema": {
  376. "type": "integer",
  377. "minimum": 1,
  378. "maximum": 10000
  379. }
  380. },
  381. {
  382. "in": "query",
  383. "name": "maxHeight",
  384. "schema": {
  385. "type": "integer",
  386. "minimum": 1,
  387. "maximum": 10000
  388. }
  389. }
  390. ],
  391. "responses": {
  392. "200": {
  393. "description": "OK",
  394. "content": {
  395. "image/*": {
  396. "schema": {
  397. "type": "string",
  398. "format": "binary"
  399. }
  400. }
  401. }
  402. }
  403. }
  404. }
  405. },
  406. "/documents/{documentId}/data": {
  407. "post": {
  408. "summary": "Add one (or multiple if PDF) page to the document",
  409. "tags": [
  410. "Create"
  411. ],
  412. "requestBody": {
  413. "content": {
  414. "image/png": {
  415. "schema": {
  416. "type": "string",
  417. "format": "binary"
  418. }
  419. },
  420. "image/jpeg": {
  421. "schema": {
  422. "type": "string",
  423. "format": "binary"
  424. }
  425. },
  426. "application/pdf": {
  427. "schema": {
  428. "type": "string",
  429. "format": "binary"
  430. }
  431. }
  432. }
  433. },
  434. "responses": {
  435. "200": {
  436. "description": "OK"
  437. }
  438. }
  439. }
  440. },
  441. "/pages/{pageId}": {
  442. "get": {
  443. "summary": "Get page properties",
  444. "tags": [
  445. "Objects"
  446. ],
  447. "parameters": [
  448. {
  449. "in": "path",
  450. "name": "pageId",
  451. "required": true,
  452. "schema": {
  453. "type": "integer",
  454. "minimum": 0,
  455. "maximum": 18446744073709551615
  456. }
  457. }
  458. ],
  459. "responses": {
  460. "200": {
  461. "description": "OK",
  462. "content": {
  463. "application/json": {
  464. "schema": {
  465. "$ref": "#/components/schemas/page"
  466. }
  467. }
  468. }
  469. }
  470. }
  471. }
  472. },
  473. "/pages/{pageId}/image": {
  474. "get": {
  475. "summary": "get an image or thumbnail of the page",
  476. "tags": [
  477. "Images"
  478. ],
  479. "parameters": [
  480. {
  481. "in": "query",
  482. "name": "maxWidth",
  483. "schema": {
  484. "type": "integer",
  485. "minimum": 1,
  486. "maximum": 10000
  487. }
  488. },
  489. {
  490. "in": "query",
  491. "name": "maxHeight",
  492. "schema": {
  493. "type": "integer",
  494. "minimum": 1,
  495. "maximum": 10000
  496. }
  497. }
  498. ],
  499. "responses": {
  500. "200": {
  501. "description": "OK",
  502. "content": {
  503. "image/*": {
  504. "schema": {
  505. "type": "string",
  506. "format": "binary"
  507. }
  508. }
  509. }
  510. }
  511. }
  512. }
  513. }
  514. }
  515. }