]> Git — Sourcephile - gargantext.git/blob - swagger.json
[FIX] Maybe hyperdataDocument better written.
[gargantext.git] / swagger.json
1 {
2 "swagger": "2.0",
3 "info": {
4 "version": "O.1.0",
5 "title": "Gargantext API",
6 "license": {
7 "url": "https://gitlab.iscpif.fr/gargantext/haskell-gargantext/blob/master/LICENSE",
8 "name": "AGPL and CECILLv3"
9 },
10 "description": "This is the main API of Gargantext"
11 },
12 "definitions": {
13 "Status": {
14 "type": "object",
15 "properties": {
16 "status_date": {
17 "$ref": "#/definitions/UTCTime"
18 },
19 "status_complete": {
20 "type": "boolean"
21 },
22 "status_action": {
23 "type": "string"
24 },
25 "status_error": {
26 "type": "string"
27 },
28 "status_progress": {
29 "maximum": 9223372036854775807,
30 "minimum": -9223372036854775808,
31 "type": "integer"
32 }
33 }
34 },
35 "Scraper": {
36 "type": "string",
37 "enum": [
38 "Pubmed",
39 "Hal",
40 "IsTex",
41 "Isidore"
42 ]
43 },
44 "NodePoly": {
45 "required": [
46 "node_id",
47 "node_typename",
48 "node_userId",
49 "node_name",
50 "node_date",
51 "node_hyperdata"
52 ],
53 "type": "object",
54 "properties": {
55 "node_id": {
56 "maximum": 9223372036854775807,
57 "minimum": -9223372036854775808,
58 "type": "integer"
59 },
60 "node_name": {
61 "type": "string"
62 },
63 "node_date": {
64 "$ref": "#/definitions/UTCTime"
65 },
66 "node_userId": {
67 "maximum": 9223372036854775807,
68 "minimum": -9223372036854775808,
69 "type": "integer"
70 },
71 "node_hyperdata": {
72 "$ref": "#/definitions/HyperdataDocument"
73 },
74 "node_typename": {
75 "maximum": 9223372036854775807,
76 "minimum": -9223372036854775808,
77 "type": "integer"
78 },
79 "node_parentId": {
80 "maximum": 9223372036854775807,
81 "minimum": -9223372036854775808,
82 "type": "integer"
83 }
84 }
85 },
86 "Counts": {
87 "items": {
88 "$ref": "#/definitions/Count"
89 },
90 "type": "array"
91 },
92 "Count": {
93 "required": [
94 "count_name"
95 ],
96 "type": "object",
97 "properties": {
98 "count_count": {
99 "maximum": 9223372036854775807,
100 "minimum": -9223372036854775808,
101 "type": "integer"
102 },
103 "count_message": {
104 "$ref": "#/definitions/Message"
105 },
106 "count_name": {
107 "$ref": "#/definitions/Scraper"
108 }
109 }
110 },
111 "QueryBool": {
112 "type": "string"
113 },
114 "UTCTime": {
115 "example": "2016-07-22T00:00:00Z",
116 "format": "yyyy-mm-ddThh:MM:ssZ",
117 "type": "string"
118 },
119 "Query": {
120 "required": [
121 "query_query"
122 ],
123 "type": "object",
124 "properties": {
125 "query_query": {
126 "$ref": "#/definitions/QueryBool"
127 },
128 "query_name": {
129 "items": {
130 "$ref": "#/definitions/Scraper"
131 },
132 "type": "array"
133 }
134 }
135 },
136 "Facet": {
137 "required": [
138 "facetDoc_id",
139 "facetDoc_created",
140 "facetDoc_hyperdata",
141 "facetDoc_favorite"
142 ],
143 "type": "object",
144 "properties": {
145 "facetDoc_hyperdata": {
146 "$ref": "#/definitions/HyperdataDocument"
147 },
148 "facetDoc_created": {
149 "$ref": "#/definitions/UTCTime"
150 },
151 "facetDoc_favorite": {
152 "type": "boolean"
153 },
154 "facetDoc_id": {
155 "maximum": 9223372036854775807,
156 "minimum": -9223372036854775808,
157 "type": "integer"
158 }
159 }
160 },
161 "Message": {
162 "minItems": 2,
163 "items": [
164 {
165 "type": "integer"
166 },
167 {
168 "items": {
169 "type": "string"
170 },
171 "type": "array"
172 }
173 ],
174 "maxItems": 2,
175 "type": "array"
176 },
177 "HyperdataDocument": {
178 "type": "object",
179 "properties": {
180 "hyperdataDocument_bdd": {
181 "type": "string"
182 },
183 "hyperdataDocument_statuses": {
184 "items": {
185 "$ref": "#/definitions/Status"
186 },
187 "type": "array"
188 },
189 "hyperdataDocument_publication_year": {
190 "format": "double",
191 "type": "number"
192 },
193 "hyperdataDocument_publication_hour": {
194 "format": "double",
195 "type": "number"
196 },
197 "hyperdataDocument_authors": {
198 "type": "string"
199 },
200 "hyperdataDocument_languageIso2": {
201 "type": "string"
202 },
203 "hyperdataDocument_publication_date": {
204 "type": "string"
205 },
206 "hyperdataDocument_doi": {
207 "type": "string"
208 },
209 "hyperdataDocument_page": {
210 "maximum": 9223372036854775807,
211 "minimum": -9223372036854775808,
212 "type": "integer"
213 },
214 "hyperdataDocument_url": {
215 "type": "string"
216 },
217 "hyperdataDocument_publication_month": {
218 "format": "double",
219 "type": "number"
220 },
221 "hyperdataDocument_publication_second": {
222 "format": "double",
223 "type": "number"
224 },
225 "hyperdataDocument_publication_minute": {
226 "format": "double",
227 "type": "number"
228 },
229 "hyperdataDocument_title": {
230 "type": "string"
231 },
232 "hyperdataDocument_abstract": {
233 "type": "string"
234 }
235 }
236 }
237 },
238 "paths": {
239 "/count": {
240 "post": {
241 "consumes": [
242 "application/json;charset=utf-8"
243 ],
244 "responses": {
245 "400": {
246 "description": "Invalid `body`"
247 },
248 "200": {
249 "schema": {
250 "$ref": "#/definitions/Counts"
251 },
252 "description": ""
253 }
254 },
255 "produces": [
256 "application/json;charset=utf-8"
257 ],
258 "parameters": [
259 {
260 "required": true,
261 "schema": {
262 "$ref": "#/definitions/Query"
263 },
264 "in": "body",
265 "name": "body"
266 }
267 ]
268 }
269 },
270 "/node/{id}/children": {
271 "get": {
272 "responses": {
273 "404": {
274 "description": "`id` not found"
275 },
276 "400": {
277 "description": "Invalid `limit` or `offset` or `type`"
278 },
279 "200": {
280 "schema": {
281 "items": {
282 "$ref": "#/definitions/NodePoly"
283 },
284 "type": "array"
285 },
286 "description": ""
287 }
288 },
289 "produces": [
290 "application/json;charset=utf-8"
291 ],
292 "parameters": [
293 {
294 "maximum": 9223372036854775807,
295 "minimum": -9223372036854775808,
296 "required": true,
297 "in": "path",
298 "name": "id",
299 "type": "integer"
300 },
301 {
302 "in": "query",
303 "name": "type",
304 "type": "string",
305 "enum": [
306 "NodeUser",
307 "Project",
308 "Corpus",
309 "Document",
310 "DocumentCopy",
311 "Classification",
312 "Lists",
313 "Metrics",
314 "Occurrences"
315 ]
316 },
317 {
318 "maximum": 9223372036854775807,
319 "minimum": -9223372036854775808,
320 "in": "query",
321 "name": "offset",
322 "type": "integer"
323 },
324 {
325 "maximum": 9223372036854775807,
326 "minimum": -9223372036854775808,
327 "in": "query",
328 "name": "limit",
329 "type": "integer"
330 }
331 ]
332 }
333 },
334 "/roots": {
335 "get": {
336 "responses": {
337 "200": {
338 "schema": {
339 "items": {
340 "$ref": "#/definitions/NodePoly"
341 },
342 "type": "array"
343 },
344 "description": ""
345 }
346 },
347 "produces": [
348 "application/json;charset=utf-8"
349 ]
350 }
351 },
352 "/node/{id}": {
353 "get": {
354 "responses": {
355 "404": {
356 "description": "`id` not found"
357 },
358 "200": {
359 "schema": {
360 "$ref": "#/definitions/NodePoly"
361 },
362 "description": ""
363 }
364 },
365 "produces": [
366 "application/json;charset=utf-8"
367 ],
368 "parameters": [
369 {
370 "maximum": 9223372036854775807,
371 "minimum": -9223372036854775808,
372 "required": true,
373 "in": "path",
374 "name": "id",
375 "type": "integer"
376 }
377 ]
378 },
379 "delete": {
380 "responses": {
381 "404": {
382 "description": "`id` not found"
383 },
384 "200": {
385 "schema": {
386 "maximum": 9223372036854775807,
387 "minimum": -9223372036854775808,
388 "type": "integer"
389 },
390 "description": ""
391 }
392 },
393 "produces": [
394 "application/json;charset=utf-8"
395 ],
396 "parameters": [
397 {
398 "maximum": 9223372036854775807,
399 "minimum": -9223372036854775808,
400 "required": true,
401 "in": "path",
402 "name": "id",
403 "type": "integer"
404 }
405 ]
406 }
407 },
408 "/nodes": {
409 "delete": {
410 "consumes": [
411 "application/json;charset=utf-8"
412 ],
413 "responses": {
414 "400": {
415 "description": "Invalid `body`"
416 },
417 "200": {
418 "schema": {
419 "maximum": 9223372036854775807,
420 "minimum": -9223372036854775808,
421 "type": "integer"
422 },
423 "description": ""
424 }
425 },
426 "produces": [
427 "application/json;charset=utf-8"
428 ],
429 "parameters": [
430 {
431 "required": true,
432 "schema": {
433 "items": {
434 "maximum": 9223372036854775807,
435 "minimum": -9223372036854775808,
436 "type": "integer"
437 },
438 "type": "array"
439 },
440 "in": "body",
441 "name": "body"
442 }
443 ]
444 }
445 },
446 "/node/{id}/facet": {
447 "get": {
448 "responses": {
449 "404": {
450 "description": "`id` not found"
451 },
452 "400": {
453 "description": "Invalid `limit` or `offset` or `type`"
454 },
455 "200": {
456 "schema": {
457 "items": {
458 "$ref": "#/definitions/Facet"
459 },
460 "type": "array"
461 },
462 "description": ""
463 }
464 },
465 "produces": [
466 "application/json;charset=utf-8"
467 ],
468 "parameters": [
469 {
470 "maximum": 9223372036854775807,
471 "minimum": -9223372036854775808,
472 "required": true,
473 "in": "path",
474 "name": "id",
475 "type": "integer"
476 },
477 {
478 "in": "query",
479 "name": "type",
480 "type": "string",
481 "enum": [
482 "NodeUser",
483 "Project",
484 "Corpus",
485 "Document",
486 "DocumentCopy",
487 "Classification",
488 "Lists",
489 "Metrics",
490 "Occurrences"
491 ]
492 },
493 {
494 "maximum": 9223372036854775807,
495 "minimum": -9223372036854775808,
496 "in": "query",
497 "name": "offset",
498 "type": "integer"
499 },
500 {
501 "maximum": 9223372036854775807,
502 "minimum": -9223372036854775808,
503 "in": "query",
504 "name": "limit",
505 "type": "integer"
506 }
507 ]
508 }
509 }
510 }
511 }