]> Git — Sourcephile - gargantext.git/blob - swagger.json
[FEAT] Full Text Search query Doc facet.
[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": "Gargantext API specifications"
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 "summary": "First cat endpoint",
337 "responses": {
338 "200": {
339 "schema": {
340 "items": {
341 "$ref": "#/definitions/NodePoly"
342 },
343 "type": "array"
344 },
345 "description": ""
346 }
347 },
348 "produces": [
349 "application/json;charset=utf-8"
350 ]
351 }
352 },
353 "/node/{id}": {
354 "get": {
355 "responses": {
356 "404": {
357 "description": "`id` not found"
358 },
359 "200": {
360 "schema": {
361 "$ref": "#/definitions/NodePoly"
362 },
363 "description": ""
364 }
365 },
366 "produces": [
367 "application/json;charset=utf-8"
368 ],
369 "parameters": [
370 {
371 "maximum": 9223372036854775807,
372 "minimum": -9223372036854775808,
373 "required": true,
374 "in": "path",
375 "name": "id",
376 "type": "integer"
377 }
378 ]
379 },
380 "delete": {
381 "responses": {
382 "404": {
383 "description": "`id` not found"
384 },
385 "200": {
386 "schema": {
387 "maximum": 9223372036854775807,
388 "minimum": -9223372036854775808,
389 "type": "integer"
390 },
391 "description": ""
392 }
393 },
394 "produces": [
395 "application/json;charset=utf-8"
396 ],
397 "parameters": [
398 {
399 "maximum": 9223372036854775807,
400 "minimum": -9223372036854775808,
401 "required": true,
402 "in": "path",
403 "name": "id",
404 "type": "integer"
405 }
406 ]
407 }
408 },
409 "/nodes": {
410 "delete": {
411 "consumes": [
412 "application/json;charset=utf-8"
413 ],
414 "responses": {
415 "400": {
416 "description": "Invalid `body`"
417 },
418 "200": {
419 "schema": {
420 "maximum": 9223372036854775807,
421 "minimum": -9223372036854775808,
422 "type": "integer"
423 },
424 "description": ""
425 }
426 },
427 "produces": [
428 "application/json;charset=utf-8"
429 ],
430 "parameters": [
431 {
432 "required": true,
433 "schema": {
434 "items": {
435 "maximum": 9223372036854775807,
436 "minimum": -9223372036854775808,
437 "type": "integer"
438 },
439 "type": "array"
440 },
441 "in": "body",
442 "name": "body"
443 }
444 ]
445 }
446 },
447 "/node/{id}/facet": {
448 "get": {
449 "responses": {
450 "404": {
451 "description": "`id` not found"
452 },
453 "400": {
454 "description": "Invalid `limit` or `offset` or `type`"
455 },
456 "200": {
457 "schema": {
458 "items": {
459 "$ref": "#/definitions/Facet"
460 },
461 "type": "array"
462 },
463 "description": ""
464 }
465 },
466 "produces": [
467 "application/json;charset=utf-8"
468 ],
469 "parameters": [
470 {
471 "maximum": 9223372036854775807,
472 "minimum": -9223372036854775808,
473 "required": true,
474 "in": "path",
475 "name": "id",
476 "type": "integer"
477 },
478 {
479 "in": "query",
480 "name": "type",
481 "type": "string",
482 "enum": [
483 "NodeUser",
484 "Project",
485 "Corpus",
486 "Document",
487 "DocumentCopy",
488 "Classification",
489 "Lists",
490 "Metrics",
491 "Occurrences"
492 ]
493 },
494 {
495 "maximum": 9223372036854775807,
496 "minimum": -9223372036854775808,
497 "in": "query",
498 "name": "offset",
499 "type": "integer"
500 },
501 {
502 "maximum": 9223372036854775807,
503 "minimum": -9223372036854775808,
504 "in": "query",
505 "name": "limit",
506 "type": "integer"
507 }
508 ]
509 }
510 }
511 }
512 }