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 14KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429
  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": "Upload",
  21. "description": "Upload new documents"
  22. },
  23. {
  24. "name": "Images",
  25. "description": "Get documents/pages images/thumbnails"
  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. }
  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. "name": {
  115. "readOnly": false,
  116. "description": "Document name, may be empty",
  117. "type": "string"
  118. },
  119. "created": {
  120. "readOnly": true,
  121. "type": "integer",
  122. "minimum": 0,
  123. "maximum": 18446744073709551615
  124. },
  125. "owner": {
  126. "readOnly": true,
  127. "description": "Username of document owner",
  128. "type": "string"
  129. },
  130. "status": {
  131. "readOnly": true,
  132. "description": "Status of document",
  133. "type": "string",
  134. "enum": [
  135. "nodata",
  136. "inprogress",
  137. "deleted",
  138. "ok"
  139. ]
  140. },
  141. "languages": {
  142. "readOnly": true,
  143. "description": "Languages in document in order of importance",
  144. "type": "array",
  145. "items": {
  146. "type": "string",
  147. "enum": [
  148. "en",
  149. "de",
  150. "it",
  151. "fr"
  152. ]
  153. }
  154. }
  155. }
  156. }
  157. },
  158. "parameters": {},
  159. "securitySchemes": {
  160. "basicAuth": {
  161. "type": "http",
  162. "scheme": "basic"
  163. }
  164. }
  165. },
  166. "security": [
  167. {
  168. "basicAuth": []
  169. }
  170. ],
  171. "paths": {
  172. "/documents": {
  173. "post": {
  174. "summary": "Create a new document",
  175. "responses": {
  176. "200": {
  177. "description": "OK",
  178. "content": {
  179. "application/json": {
  180. "schema": {
  181. "$ref": "#/components/schemas/document"
  182. }
  183. }
  184. }
  185. }
  186. }
  187. },
  188. "get": {
  189. "summary": "Returns a list of documents",
  190. "parameters": [
  191. {
  192. "in": "query",
  193. "name": "pageSize",
  194. "schema": {
  195. "type": "integer",
  196. "minimum": 0,
  197. "maximum": 1000,
  198. "default": 50
  199. }
  200. },
  201. {
  202. "in": "query",
  203. "name": "pageIndex",
  204. "schema": {
  205. "type": "integer",
  206. "minimum": 0,
  207. "maximum": 65535,
  208. "default": 0
  209. }
  210. },
  211. {
  212. "in": "query",
  213. "name": "filterLanguage",
  214. "schema": {
  215. "type": "array",
  216. "items": {
  217. "type": "string",
  218. "enum": [
  219. "fr",
  220. "de",
  221. "it",
  222. "en"
  223. ]
  224. }
  225. }
  226. },
  227. {
  228. "in": "query",
  229. "name": "filterKeyword",
  230. "schema": {
  231. "type": "array",
  232. "items": {
  233. "type": "string"
  234. }
  235. }
  236. },
  237. {
  238. "in": "query",
  239. "name": "filterTag",
  240. "schema": {
  241. "type": "array",
  242. "items": {
  243. "type": "string"
  244. }
  245. }
  246. }
  247. ],
  248. "responses": {
  249. "200": {
  250. "description": "OK",
  251. "content": {
  252. "application/json": {
  253. "schema": {
  254. "type": "array",
  255. "items": {
  256. "$ref": "#/components/schemas/document"
  257. }
  258. }
  259. }
  260. }
  261. }
  262. }
  263. }
  264. },
  265. "/documents/{documentId}": {
  266. "get": {
  267. "summary": "retrieve a document meta data",
  268. "parameters": [
  269. {
  270. "in": "path",
  271. "name": "documentId",
  272. "required": true,
  273. "schema": {
  274. "type": "integer",
  275. "minimum": 0,
  276. "maximum": 18446744073709551615
  277. }
  278. }
  279. ],
  280. "responses": {
  281. "200": {
  282. "description": "OK",
  283. "content": {
  284. "application/json": {
  285. "schema": {
  286. "$ref": "#/components/schemas/document"
  287. }
  288. }
  289. }
  290. },
  291. "404": {
  292. "description": "Document not found"
  293. }
  294. }
  295. }
  296. },
  297. "/documents/{documentId}/image": {
  298. "get": {
  299. "summary": "Get an image or thumbnail of the document",
  300. "parameters": [
  301. {
  302. "in": "query",
  303. "name": "maxWidth",
  304. "schema": {
  305. "type": "integer",
  306. "minimum": 1,
  307. "maximum": 10000
  308. }
  309. },
  310. {
  311. "in": "query",
  312. "name": "maxHeight",
  313. "schema": {
  314. "type": "integer",
  315. "minimum": 1,
  316. "maximum": 10000
  317. }
  318. }
  319. ],
  320. "responses": {
  321. "200": {
  322. "description": "OK",
  323. "content": {
  324. "image/*": {
  325. "schema": {
  326. "type": "string",
  327. "format": "binary"
  328. }
  329. }
  330. }
  331. }
  332. }
  333. }
  334. },
  335. "/documents/{documentId}/data": {
  336. "post": {
  337. "summary": "Add one (or multiple if PDF) page to the document",
  338. "requestBody": {
  339. "content": {
  340. "image/*": {
  341. "schema": {
  342. "type": "string",
  343. "format": "binary"
  344. }
  345. },
  346. "application/pdf": {
  347. "schema": {
  348. "type": "string",
  349. "format": "binary"
  350. }
  351. }
  352. }
  353. },
  354. "responses": {
  355. "200": {
  356. "description": "OK"
  357. }
  358. }
  359. }
  360. },
  361. "/pages/{pageId}": {
  362. "get": {
  363. "summary": "Get page properties",
  364. "parameters": [
  365. {
  366. "in": "path",
  367. "name": "pageId",
  368. "required": true,
  369. "schema": {
  370. "type": "integer",
  371. "minimum": 0,
  372. "maximum": 18446744073709551615
  373. }
  374. }
  375. ],
  376. "responses": {
  377. "200": {
  378. "description": "OK",
  379. "content": {
  380. "application/json": {
  381. "schema": {
  382. "$ref": "#/components/schemas/page"
  383. }
  384. }
  385. }
  386. }
  387. }
  388. }
  389. },
  390. "/pages/{pageId}/image": {
  391. "get": {
  392. "summary": "get an image or thumbnail of the page",
  393. "parameters": [
  394. {
  395. "in": "query",
  396. "name": "maxWidth",
  397. "schema": {
  398. "type": "integer",
  399. "minimum": 1,
  400. "maximum": 10000
  401. }
  402. },
  403. {
  404. "in": "query",
  405. "name": "maxHeight",
  406. "schema": {
  407. "type": "integer",
  408. "minimum": 1,
  409. "maximum": 10000
  410. }
  411. }
  412. ],
  413. "responses": {
  414. "200": {
  415. "description": "OK",
  416. "content": {
  417. "image/*": {
  418. "schema": {
  419. "type": "string",
  420. "format": "binary"
  421. }
  422. }
  423. }
  424. }
  425. }
  426. }
  427. }
  428. }
  429. }