-
Notifications
You must be signed in to change notification settings - Fork 0
/
new_openapi.yaml
110 lines (107 loc) · 3.13 KB
/
new_openapi.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
openapi: 3.0.0
info:
title: Eurostat Data API
description: This API provides access to Eurostat tables and data based on user queries.
version: 1.0.0
servers:
- url: https://statchat.onrender.com
description: Main API server for custom Eurostat operations.
paths:
/searchForTables:
get:
operationId: searchForTables
summary: Searches for tables in Eurostat that match the user's query.
parameters:
- name: search_query
in: query
required: true
description: The search query to find matching tables.
schema:
type: string
responses:
'200':
description: A list of dicts containing the search results.
content:
application/json:
schema:
type: array
items:
type: object
properties:
code:
type: string
text:
type: string
date_start:
type: integer
date_end:
type: integer
/getVariables/{code}:
get:
operationId: getVariables
summary: Gets the variables for a given table.
parameters:
- name: code
in: path
required: true
description: The code of the table.
schema:
type: string
responses:
'200':
description: An array of objects, each representing a variable with its details and values.
content:
application/json:
schema:
type: array
items:
type: object
properties:
code:
type: string
text:
type: string
values:
type: array
items:
type: object
properties:
code:
type: string
text:
type: string
required:
- code
- text
- values
/getData/{code}:
post:
operationId: getData
summary: Gets the data for a given table and specified query.
parameters:
- name: code
in: path
required: true
description: The code of the table as provided by the searchForTables function.
schema:
type: string
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
queryParameters:
type: object
additionalProperties:
type: array
items:
type: string
responses:
'200':
description: A CSV string containing the data for the table.
content:
text/csv:
schema:
type: string