@malloydata/db-publisher 0.0.314 → 0.0.316
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/api.d.ts +1594 -528
- package/dist/client/api.js +1820 -553
- package/dist/client/api.js.map +1 -1
- package/dist/client/base.d.ts +1 -1
- package/dist/client/base.js +1 -1
- package/dist/client/common.d.ts +1 -1
- package/dist/client/common.js +1 -1
- package/dist/client/configuration.d.ts +1 -1
- package/dist/client/configuration.js +1 -1
- package/dist/client/index.d.ts +1 -1
- package/dist/client/index.js +1 -1
- package/dist/publisher_connection.d.ts +4 -1
- package/dist/publisher_connection.integration.spec.js +208 -0
- package/dist/publisher_connection.integration.spec.js.map +1 -0
- package/dist/publisher_connection.js +42 -11
- package/dist/publisher_connection.js.map +1 -1
- package/dist/publisher_connection.unit.spec.d.ts +1 -0
- package/dist/{publisher_connection.spec.js → publisher_connection.unit.spec.js} +214 -175
- package/dist/publisher_connection.unit.spec.js.map +1 -0
- package/package.json +2 -2
- package/publisher-api-doc.yaml +1434 -449
- package/src/client/.openapi-generator/FILES +0 -1
- package/src/client/api.ts +2513 -754
- package/src/client/base.ts +1 -1
- package/src/client/common.ts +1 -1
- package/src/client/configuration.ts +1 -1
- package/src/client/index.ts +1 -1
- package/src/publisher_connection.integration.spec.ts +200 -0
- package/src/publisher_connection.ts +67 -19
- package/src/{publisher_connection.spec.ts → publisher_connection.unit.spec.ts} +260 -175
- package/dist/publisher_connection.spec.js.map +0 -1
- /package/dist/{publisher_connection.spec.d.ts → publisher_connection.integration.spec.d.ts} +0 -0
package/publisher-api-doc.yaml
CHANGED
|
@@ -1,179 +1,454 @@
|
|
|
1
1
|
openapi: 3.1.0
|
|
2
2
|
info:
|
|
3
3
|
title: Malloy Publisher - Semantic Model Serving API
|
|
4
|
-
description:
|
|
5
|
-
The Malloy Publisher - Semantic Model Serving API
|
|
6
|
-
Malloy
|
|
7
|
-
|
|
4
|
+
description: |
|
|
5
|
+
The Malloy Publisher - Semantic Model Serving API provides comprehensive access to Malloy packages and their associated resources.
|
|
6
|
+
A Malloy package is a directory containing Malloy models (.malloy files), Malloy notebooks (.malloynb files), and embedded databases
|
|
7
|
+
(.parquet files) with a malloy-publisher.json manifest at the package's root directory.
|
|
8
|
+
|
|
9
|
+
## Key Features
|
|
10
|
+
|
|
11
|
+
- **Project Management**: Create and manage projects with their associated packages and connections
|
|
12
|
+
- **Package Lifecycle**: Full CRUD operations for Malloy packages and their versions
|
|
13
|
+
- **Model & Notebook Access**: Retrieve and execute Malloy models and notebooks
|
|
14
|
+
- **Connection Management**: Secure database connection configuration and testing
|
|
15
|
+
- **Query Execution**: Execute queries against models and retrieve results
|
|
16
|
+
- **Watch Mode**: Real-time file watching for development workflows
|
|
17
|
+
|
|
18
|
+
## Resource Hierarchy
|
|
19
|
+
|
|
20
|
+
The API follows a hierarchical resource structure:
|
|
21
|
+
```
|
|
22
|
+
Projects
|
|
23
|
+
├── Connections
|
|
24
|
+
└── Packages
|
|
25
|
+
├── Models
|
|
26
|
+
├── Notebooks
|
|
27
|
+
└── Databases
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
For examples, see the Malloy samples packages (https://github.com/malloydata/malloy-samples) repository.
|
|
8
31
|
version: v0
|
|
32
|
+
|
|
9
33
|
servers:
|
|
10
34
|
- url: /api/v0/
|
|
35
|
+
description: PublisherAPI server
|
|
36
|
+
|
|
37
|
+
tags:
|
|
38
|
+
- name: publisher
|
|
39
|
+
description: Publisher status and health check operations
|
|
40
|
+
- name: projects
|
|
41
|
+
description: Project lifecycle management including creation, configuration, and deletion of data modeling projects
|
|
42
|
+
- name: connections
|
|
43
|
+
description: Database connection management for secure data source configuration and access
|
|
44
|
+
- name: packages
|
|
45
|
+
description: Package management for Malloy data models, including versioning and distribution
|
|
46
|
+
- name: models
|
|
47
|
+
description: Malloy model access and compilation operations
|
|
48
|
+
- name: notebooks
|
|
49
|
+
description: Malloy notebook access and execution operations
|
|
50
|
+
- name: databases
|
|
51
|
+
description: Embedded database management and access
|
|
52
|
+
- name: watch-mode
|
|
53
|
+
description: Real-time file watching for development workflows
|
|
11
54
|
|
|
12
55
|
paths:
|
|
56
|
+
/status:
|
|
57
|
+
get:
|
|
58
|
+
tags:
|
|
59
|
+
- publisher
|
|
60
|
+
operationId: get-status
|
|
61
|
+
summary: Get server status and health information
|
|
62
|
+
description: |
|
|
63
|
+
Returns the current status of the Malloy Publisher server, including initialization state,
|
|
64
|
+
available projects, and server timestamp. This endpoint is useful for health checks and
|
|
65
|
+
monitoring server availability.
|
|
66
|
+
responses:
|
|
67
|
+
"200":
|
|
68
|
+
description: Returns server status
|
|
69
|
+
content:
|
|
70
|
+
application/json:
|
|
71
|
+
schema:
|
|
72
|
+
$ref: "#/components/schemas/ServerStatus"
|
|
73
|
+
|
|
13
74
|
/projects:
|
|
14
75
|
get:
|
|
15
76
|
tags:
|
|
16
|
-
|
|
77
|
+
- projects
|
|
17
78
|
operationId: list-projects
|
|
18
|
-
summary:
|
|
19
|
-
|
|
79
|
+
summary: List all available projects
|
|
80
|
+
description: |
|
|
81
|
+
Retrieves a list of all projects currently hosted on this Malloy Publisher server.
|
|
82
|
+
Each project contains metadata about its packages, connections, and configuration.
|
|
83
|
+
This endpoint is typically used to discover available projects and their basic information.
|
|
20
84
|
responses:
|
|
21
|
-
200:
|
|
22
|
-
description:
|
|
23
|
-
A list of the Projects names.
|
|
85
|
+
"200":
|
|
86
|
+
description: A list of all available projects
|
|
24
87
|
content:
|
|
25
88
|
application/json:
|
|
26
89
|
schema:
|
|
27
90
|
type: array
|
|
28
91
|
items:
|
|
29
92
|
$ref: "#/components/schemas/Project"
|
|
30
|
-
401:
|
|
31
|
-
$ref: "#/components/responses/
|
|
32
|
-
500:
|
|
93
|
+
"401":
|
|
94
|
+
$ref: "#/components/responses/Unauthorized"
|
|
95
|
+
"500":
|
|
96
|
+
$ref: "#/components/responses/InternalServerError"
|
|
97
|
+
post:
|
|
98
|
+
tags:
|
|
99
|
+
- projects
|
|
100
|
+
operationId: create-project
|
|
101
|
+
summary: Create a new project
|
|
102
|
+
description: |
|
|
103
|
+
Creates a new Malloy project with the specified configuration. A project serves as a
|
|
104
|
+
container for packages, connections, and other resources. The project will be initialized
|
|
105
|
+
with the provided metadata and can immediately accept packages and connections.
|
|
106
|
+
requestBody:
|
|
107
|
+
required: true
|
|
108
|
+
content:
|
|
109
|
+
application/json:
|
|
110
|
+
schema:
|
|
111
|
+
$ref: "#/components/schemas/Project"
|
|
112
|
+
responses:
|
|
113
|
+
"200":
|
|
114
|
+
description: Returns the project created
|
|
115
|
+
content:
|
|
116
|
+
application/json:
|
|
117
|
+
schema:
|
|
118
|
+
$ref: "#/components/schemas/Project"
|
|
119
|
+
"401":
|
|
120
|
+
$ref: "#/components/responses/Unauthorized"
|
|
121
|
+
"500":
|
|
33
122
|
$ref: "#/components/responses/InternalServerError"
|
|
34
123
|
|
|
35
|
-
/projects/{projectName}
|
|
124
|
+
/projects/{projectName}:
|
|
36
125
|
get:
|
|
37
126
|
tags:
|
|
38
|
-
|
|
39
|
-
operationId:
|
|
40
|
-
summary:
|
|
41
|
-
|
|
127
|
+
- projects
|
|
128
|
+
operationId: get-project
|
|
129
|
+
summary: Get project details and metadata
|
|
130
|
+
description: |
|
|
131
|
+
Retrieves detailed information about a specific project, including its packages,
|
|
132
|
+
connections, configuration, and metadata. The reload parameter can be used to
|
|
133
|
+
refresh the project state from disk before returning the information.
|
|
42
134
|
parameters:
|
|
43
135
|
- name: projectName
|
|
44
136
|
in: path
|
|
45
|
-
description: Name of project
|
|
137
|
+
description: Name of the project
|
|
46
138
|
required: true
|
|
47
139
|
schema:
|
|
48
|
-
|
|
140
|
+
$ref: "#/components/schemas/IdentifierPattern"
|
|
141
|
+
- name: reload
|
|
142
|
+
in: query
|
|
143
|
+
description: Load / reload the project before returning result
|
|
144
|
+
required: false
|
|
145
|
+
schema:
|
|
146
|
+
type: boolean
|
|
49
147
|
responses:
|
|
50
|
-
200:
|
|
51
|
-
description:
|
|
52
|
-
Metadata about the publisher service.
|
|
148
|
+
"200":
|
|
149
|
+
description: Project details and metadata
|
|
53
150
|
content:
|
|
54
151
|
application/json:
|
|
55
152
|
schema:
|
|
56
|
-
$ref: "#/components/schemas/
|
|
57
|
-
401:
|
|
58
|
-
$ref: "#/components/responses/
|
|
59
|
-
|
|
153
|
+
$ref: "#/components/schemas/Project"
|
|
154
|
+
"401":
|
|
155
|
+
$ref: "#/components/responses/Unauthorized"
|
|
156
|
+
"404":
|
|
157
|
+
$ref: "#/components/responses/NotFound"
|
|
158
|
+
"500":
|
|
159
|
+
$ref: "#/components/responses/InternalServerError"
|
|
160
|
+
patch:
|
|
161
|
+
tags:
|
|
162
|
+
- projects
|
|
163
|
+
operationId: update-project
|
|
164
|
+
summary: Update project configuration
|
|
165
|
+
description: |
|
|
166
|
+
Updates the configuration and metadata of an existing project. This allows you to
|
|
167
|
+
modify project settings, update the README, change the location, or update other
|
|
168
|
+
project-level properties. The project must exist and be accessible.
|
|
169
|
+
parameters:
|
|
170
|
+
- name: projectName
|
|
171
|
+
in: path
|
|
172
|
+
description: Name of the project
|
|
173
|
+
required: true
|
|
174
|
+
schema:
|
|
175
|
+
$ref: "#/components/schemas/IdentifierPattern"
|
|
176
|
+
requestBody:
|
|
177
|
+
required: true
|
|
178
|
+
content:
|
|
179
|
+
application/json:
|
|
180
|
+
schema:
|
|
181
|
+
$ref: "#/components/schemas/Project"
|
|
182
|
+
responses:
|
|
183
|
+
"200":
|
|
184
|
+
description: Returns the project updated
|
|
185
|
+
content:
|
|
186
|
+
application/json:
|
|
187
|
+
schema:
|
|
188
|
+
$ref: "#/components/schemas/Project"
|
|
189
|
+
"401":
|
|
190
|
+
$ref: "#/components/responses/Unauthorized"
|
|
191
|
+
"500":
|
|
192
|
+
$ref: "#/components/responses/InternalServerError"
|
|
193
|
+
delete:
|
|
194
|
+
tags:
|
|
195
|
+
- projects
|
|
196
|
+
operationId: delete-project
|
|
197
|
+
summary: Delete a project
|
|
198
|
+
description: |
|
|
199
|
+
Permanently deletes a project and all its associated resources including packages,
|
|
200
|
+
connections, and metadata. This operation cannot be undone, so use with caution.
|
|
201
|
+
The project must exist and be accessible for deletion.
|
|
202
|
+
parameters:
|
|
203
|
+
- name: projectName
|
|
204
|
+
in: path
|
|
205
|
+
description: Name of the project
|
|
206
|
+
required: true
|
|
207
|
+
schema:
|
|
208
|
+
$ref: "#/components/schemas/IdentifierPattern"
|
|
209
|
+
responses:
|
|
210
|
+
"200":
|
|
211
|
+
description: Returns the project deleted
|
|
212
|
+
content:
|
|
213
|
+
application/json:
|
|
214
|
+
schema:
|
|
215
|
+
$ref: "#/components/schemas/Project"
|
|
216
|
+
"401":
|
|
217
|
+
$ref: "#/components/responses/Unauthorized"
|
|
218
|
+
"404":
|
|
219
|
+
$ref: "#/components/responses/NotFound"
|
|
220
|
+
"500":
|
|
60
221
|
$ref: "#/components/responses/InternalServerError"
|
|
61
222
|
|
|
62
223
|
/projects/{projectName}/connections:
|
|
63
224
|
get:
|
|
64
225
|
tags:
|
|
65
|
-
|
|
226
|
+
- connections
|
|
66
227
|
operationId: list-connections
|
|
67
|
-
summary:
|
|
68
|
-
|
|
228
|
+
summary: List project database connections
|
|
229
|
+
description: |
|
|
230
|
+
Retrieves a list of all database connections configured for the specified project.
|
|
231
|
+
Each connection includes its configuration, type, and status information. This endpoint
|
|
232
|
+
is useful for discovering available data sources within a project.
|
|
69
233
|
parameters:
|
|
70
234
|
- name: projectName
|
|
71
235
|
in: path
|
|
72
|
-
description: Name of project
|
|
236
|
+
description: Name of the project
|
|
73
237
|
required: true
|
|
74
238
|
schema:
|
|
75
|
-
|
|
239
|
+
$ref: "#/components/schemas/IdentifierPattern"
|
|
76
240
|
responses:
|
|
77
|
-
200:
|
|
78
|
-
description:
|
|
79
|
-
A list of the connections in the project.
|
|
241
|
+
"200":
|
|
242
|
+
description: A list of database connections in the project
|
|
80
243
|
content:
|
|
81
244
|
application/json:
|
|
82
245
|
schema:
|
|
83
246
|
type: array
|
|
84
247
|
items:
|
|
85
248
|
$ref: "#/components/schemas/Connection"
|
|
86
|
-
401:
|
|
87
|
-
$ref: "#/components/responses/
|
|
88
|
-
500:
|
|
249
|
+
"401":
|
|
250
|
+
$ref: "#/components/responses/Unauthorized"
|
|
251
|
+
"500":
|
|
89
252
|
$ref: "#/components/responses/InternalServerError"
|
|
90
|
-
|
|
253
|
+
|
|
91
254
|
/projects/{projectName}/connections/{connectionName}:
|
|
92
255
|
get:
|
|
93
256
|
tags:
|
|
94
|
-
|
|
257
|
+
- connections
|
|
95
258
|
operationId: get-connection
|
|
96
|
-
summary:
|
|
97
|
-
|
|
259
|
+
summary: Get connection details
|
|
260
|
+
description: |
|
|
261
|
+
Retrieves detailed information about a specific database connection within a project.
|
|
262
|
+
This includes connection configuration, credentials (if accessible), and metadata.
|
|
263
|
+
Useful for inspecting connection settings and troubleshooting connectivity issues.
|
|
98
264
|
parameters:
|
|
99
265
|
- name: projectName
|
|
100
266
|
in: path
|
|
101
|
-
description: Name of project
|
|
267
|
+
description: Name of the project
|
|
102
268
|
required: true
|
|
103
269
|
schema:
|
|
104
|
-
|
|
270
|
+
$ref: "#/components/schemas/IdentifierPattern"
|
|
105
271
|
- name: connectionName
|
|
106
272
|
in: path
|
|
107
|
-
description: Name of connection
|
|
273
|
+
description: Name of the connection
|
|
108
274
|
required: true
|
|
109
275
|
schema:
|
|
110
|
-
|
|
276
|
+
$ref: "#/components/schemas/IdentifierPattern"
|
|
111
277
|
responses:
|
|
112
|
-
200:
|
|
113
|
-
description:
|
|
114
|
-
A connection.
|
|
278
|
+
"200":
|
|
279
|
+
description: Connection details and configuration
|
|
115
280
|
content:
|
|
116
281
|
application/json:
|
|
117
282
|
schema:
|
|
118
283
|
$ref: "#/components/schemas/Connection"
|
|
119
|
-
401:
|
|
120
|
-
$ref: "#/components/responses/
|
|
121
|
-
404:
|
|
122
|
-
$ref: "#/components/responses/
|
|
123
|
-
500:
|
|
284
|
+
"401":
|
|
285
|
+
$ref: "#/components/responses/Unauthorized"
|
|
286
|
+
"404":
|
|
287
|
+
$ref: "#/components/responses/NotFound"
|
|
288
|
+
"500":
|
|
124
289
|
$ref: "#/components/responses/InternalServerError"
|
|
125
290
|
|
|
126
|
-
/projects/{projectName}/connections/{connectionName}/
|
|
291
|
+
/projects/{projectName}/connections/{connectionName}/schemas:
|
|
127
292
|
get:
|
|
128
293
|
tags:
|
|
129
|
-
|
|
130
|
-
operationId:
|
|
131
|
-
summary:
|
|
132
|
-
|
|
294
|
+
- connections
|
|
295
|
+
operationId: list-schemas
|
|
296
|
+
summary: List database schemas
|
|
297
|
+
description: |
|
|
298
|
+
Retrieves a list of all schemas (databases) available in the specified connection.
|
|
299
|
+
Each schema includes metadata such as name, description, and whether it's the default schema.
|
|
300
|
+
This endpoint is useful for exploring the database structure and discovering available data sources.
|
|
133
301
|
parameters:
|
|
134
302
|
- name: projectName
|
|
135
303
|
in: path
|
|
136
|
-
description: Name of project
|
|
304
|
+
description: Name of the project
|
|
137
305
|
required: true
|
|
138
306
|
schema:
|
|
139
|
-
|
|
307
|
+
$ref: "#/components/schemas/IdentifierPattern"
|
|
140
308
|
- name: connectionName
|
|
141
309
|
in: path
|
|
142
|
-
description: Name of connection
|
|
310
|
+
description: Name of the connection
|
|
143
311
|
required: true
|
|
144
312
|
schema:
|
|
145
|
-
|
|
313
|
+
$ref: "#/components/schemas/IdentifierPattern"
|
|
314
|
+
responses:
|
|
315
|
+
"200":
|
|
316
|
+
description: A list of schemas available in the connection with metadata
|
|
317
|
+
content:
|
|
318
|
+
application/json:
|
|
319
|
+
schema:
|
|
320
|
+
type: array
|
|
321
|
+
items:
|
|
322
|
+
$ref: "#/components/schemas/Schema"
|
|
323
|
+
"401":
|
|
324
|
+
$ref: "#/components/responses/Unauthorized"
|
|
325
|
+
"404":
|
|
326
|
+
$ref: "#/components/responses/NotFound"
|
|
327
|
+
"500":
|
|
328
|
+
$ref: "#/components/responses/InternalServerError"
|
|
329
|
+
|
|
330
|
+
/projects/{projectName}/connections/{connectionName}/schemas/{schemaName}/tables:
|
|
331
|
+
get:
|
|
332
|
+
tags:
|
|
333
|
+
- connections
|
|
334
|
+
operationId: list-tables
|
|
335
|
+
summary: List tables in database
|
|
336
|
+
description: |
|
|
337
|
+
Retrieves a list of all tables and views available in the specified database schema.
|
|
338
|
+
This endpoint is useful for discovering available data sources and exploring the database
|
|
339
|
+
structure. The schema must exist in the connection for this operation to succeed.
|
|
340
|
+
parameters:
|
|
341
|
+
- name: projectName
|
|
342
|
+
in: path
|
|
343
|
+
description: Name of the project
|
|
344
|
+
required: true
|
|
345
|
+
schema:
|
|
346
|
+
$ref: "#/components/schemas/IdentifierPattern"
|
|
347
|
+
- name: connectionName
|
|
348
|
+
in: path
|
|
349
|
+
description: Name of the connection
|
|
350
|
+
required: true
|
|
351
|
+
schema:
|
|
352
|
+
$ref: "#/components/schemas/IdentifierPattern"
|
|
353
|
+
- name: schemaName
|
|
354
|
+
in: path
|
|
355
|
+
description: Name of the schema
|
|
356
|
+
required: true
|
|
357
|
+
schema:
|
|
358
|
+
$ref: "#/components/schemas/IdentifierPattern"
|
|
359
|
+
responses:
|
|
360
|
+
"200":
|
|
361
|
+
description: A list of table names available in the specified schema
|
|
362
|
+
content:
|
|
363
|
+
application/json:
|
|
364
|
+
schema:
|
|
365
|
+
type: array
|
|
366
|
+
items:
|
|
367
|
+
$ref: "#/components/schemas/Table"
|
|
368
|
+
"401":
|
|
369
|
+
$ref: "#/components/responses/Unauthorized"
|
|
370
|
+
"404":
|
|
371
|
+
$ref: "#/components/responses/NotFound"
|
|
372
|
+
"500":
|
|
373
|
+
$ref: "#/components/responses/InternalServerError"
|
|
374
|
+
|
|
375
|
+
/projects/{projectName}/connections/{connectionName}/schemas/{schemaName}/tables/{tablePath}:
|
|
376
|
+
get:
|
|
377
|
+
tags:
|
|
378
|
+
- connections
|
|
379
|
+
operationId: get-table
|
|
380
|
+
summary: Get table details from database
|
|
381
|
+
description: |
|
|
382
|
+
Retrieves a table from the specified database schema.
|
|
383
|
+
This endpoint is useful for discovering available data sources and exploring the database
|
|
384
|
+
structure. The schema must exist in the connection for this operation to succeed.
|
|
385
|
+
The tablePath is the full path to the table, including the schema name.
|
|
386
|
+
parameters:
|
|
387
|
+
- name: projectName
|
|
388
|
+
in: path
|
|
389
|
+
description: Name of the project
|
|
390
|
+
required: true
|
|
391
|
+
schema:
|
|
392
|
+
$ref: "#/components/schemas/IdentifierPattern"
|
|
393
|
+
- name: connectionName
|
|
394
|
+
in: path
|
|
395
|
+
description: Name of the connection
|
|
396
|
+
required: true
|
|
397
|
+
schema:
|
|
398
|
+
$ref: "#/components/schemas/IdentifierPattern"
|
|
399
|
+
- name: schemaName
|
|
400
|
+
in: path
|
|
401
|
+
description: Name of the schema
|
|
402
|
+
required: true
|
|
403
|
+
schema:
|
|
404
|
+
$ref: "#/components/schemas/IdentifierPattern"
|
|
405
|
+
- name: tablePath
|
|
406
|
+
in: path
|
|
407
|
+
description: Full path to the table
|
|
408
|
+
required: true
|
|
409
|
+
schema:
|
|
410
|
+
$ref: "#/components/schemas/PathPattern"
|
|
146
411
|
responses:
|
|
147
|
-
200:
|
|
148
|
-
description:
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
412
|
+
"200":
|
|
413
|
+
description: Table information
|
|
414
|
+
content:
|
|
415
|
+
application/json:
|
|
416
|
+
schema:
|
|
417
|
+
$ref: "#/components/schemas/Table"
|
|
418
|
+
"401":
|
|
419
|
+
$ref: "#/components/responses/Unauthorized"
|
|
420
|
+
"404":
|
|
421
|
+
$ref: "#/components/responses/NotFound"
|
|
422
|
+
"500":
|
|
155
423
|
$ref: "#/components/responses/InternalServerError"
|
|
156
424
|
|
|
425
|
+
# TODO: Remove this endpoint.
|
|
157
426
|
/projects/{projectName}/connections/{connectionName}/sqlSource:
|
|
158
427
|
get:
|
|
159
428
|
tags:
|
|
160
|
-
|
|
429
|
+
- connections
|
|
161
430
|
operationId: get-sqlsource
|
|
162
|
-
|
|
163
|
-
|
|
431
|
+
deprecated: true
|
|
432
|
+
summary: Get SQL source (deprecated)
|
|
433
|
+
description: |
|
|
434
|
+
**DEPRECATED**: This endpoint is deprecated and may be removed in future versions.
|
|
435
|
+
Use the POST version instead for better security and functionality.
|
|
436
|
+
|
|
437
|
+
Creates a Malloy source from a SQL statement using the specified connection.
|
|
438
|
+
The SQL statement is executed to generate a source definition that can be used in Malloy models.
|
|
164
439
|
parameters:
|
|
165
440
|
- name: projectName
|
|
166
441
|
in: path
|
|
167
|
-
description: Name of project
|
|
442
|
+
description: Name of the project
|
|
168
443
|
required: true
|
|
169
444
|
schema:
|
|
170
|
-
|
|
445
|
+
$ref: "#/components/schemas/IdentifierPattern"
|
|
171
446
|
- name: connectionName
|
|
172
447
|
in: path
|
|
173
|
-
description: Name of connection
|
|
448
|
+
description: Name of the connection
|
|
174
449
|
required: true
|
|
175
450
|
schema:
|
|
176
|
-
|
|
451
|
+
$ref: "#/components/schemas/IdentifierPattern"
|
|
177
452
|
- name: sqlStatement
|
|
178
453
|
in: query
|
|
179
454
|
description: SQL statement
|
|
@@ -181,201 +456,398 @@ paths:
|
|
|
181
456
|
schema:
|
|
182
457
|
type: string
|
|
183
458
|
responses:
|
|
184
|
-
200:
|
|
185
|
-
description:
|
|
186
|
-
A SQL source.
|
|
459
|
+
"200":
|
|
460
|
+
description: SQL source information
|
|
187
461
|
content:
|
|
188
462
|
application/json:
|
|
189
463
|
schema:
|
|
190
464
|
$ref: "#/components/schemas/SqlSource"
|
|
191
|
-
401:
|
|
192
|
-
$ref: "#/components/responses/
|
|
193
|
-
404:
|
|
194
|
-
$ref: "#/components/responses/
|
|
195
|
-
500:
|
|
465
|
+
"401":
|
|
466
|
+
$ref: "#/components/responses/Unauthorized"
|
|
467
|
+
"404":
|
|
468
|
+
$ref: "#/components/responses/NotFound"
|
|
469
|
+
"500":
|
|
196
470
|
$ref: "#/components/responses/InternalServerError"
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
get:
|
|
471
|
+
|
|
472
|
+
post:
|
|
200
473
|
tags:
|
|
201
|
-
|
|
202
|
-
operationId:
|
|
203
|
-
summary:
|
|
204
|
-
|
|
474
|
+
- connections
|
|
475
|
+
operationId: post-sqlsource
|
|
476
|
+
summary: Create SQL source from statement
|
|
477
|
+
description: |
|
|
478
|
+
Creates a Malloy source from a SQL statement using the specified database connection.
|
|
479
|
+
The SQL statement is executed to generate a source definition that can be used in Malloy models.
|
|
205
480
|
parameters:
|
|
206
481
|
- name: projectName
|
|
207
482
|
in: path
|
|
208
|
-
description: Name of project
|
|
483
|
+
description: Name of the project
|
|
209
484
|
required: true
|
|
210
485
|
schema:
|
|
211
|
-
|
|
486
|
+
$ref: "#/components/schemas/IdentifierPattern"
|
|
212
487
|
- name: connectionName
|
|
213
488
|
in: path
|
|
214
|
-
description: Name of connection
|
|
489
|
+
description: Name of the connection
|
|
215
490
|
required: true
|
|
216
491
|
schema:
|
|
217
|
-
|
|
218
|
-
|
|
492
|
+
$ref: "#/components/schemas/IdentifierPattern"
|
|
493
|
+
requestBody:
|
|
494
|
+
description: SQL statement to fetch the SQL source
|
|
495
|
+
required: true
|
|
496
|
+
content:
|
|
497
|
+
application/json:
|
|
498
|
+
schema:
|
|
499
|
+
type: object
|
|
500
|
+
properties:
|
|
501
|
+
sqlStatement:
|
|
502
|
+
type: string
|
|
503
|
+
responses:
|
|
504
|
+
"200":
|
|
505
|
+
description: SQL source information
|
|
506
|
+
content:
|
|
507
|
+
application/json:
|
|
508
|
+
schema:
|
|
509
|
+
$ref: "#/components/schemas/SqlSource"
|
|
510
|
+
"401":
|
|
511
|
+
$ref: "#/components/responses/Unauthorized"
|
|
512
|
+
"404":
|
|
513
|
+
$ref: "#/components/responses/NotFound"
|
|
514
|
+
"500":
|
|
515
|
+
$ref: "#/components/responses/InternalServerError"
|
|
516
|
+
|
|
517
|
+
/projects/{projectName}/connections/{connectionName}/sqlQuery:
|
|
518
|
+
post:
|
|
519
|
+
tags:
|
|
520
|
+
- connections
|
|
521
|
+
operationId: post-querydata
|
|
522
|
+
summary: Execute SQL query
|
|
523
|
+
description: |
|
|
524
|
+
Executes a SQL statement against the specified database connection and returns the results.
|
|
525
|
+
The results include data, metadata, and execution information.
|
|
526
|
+
parameters:
|
|
527
|
+
- name: projectName
|
|
528
|
+
in: path
|
|
529
|
+
description: Name of the project
|
|
530
|
+
required: true
|
|
531
|
+
schema:
|
|
532
|
+
$ref: "#/components/schemas/IdentifierPattern"
|
|
533
|
+
- name: connectionName
|
|
534
|
+
in: path
|
|
535
|
+
description: Name of the connection
|
|
536
|
+
required: true
|
|
537
|
+
schema:
|
|
538
|
+
$ref: "#/components/schemas/IdentifierPattern"
|
|
539
|
+
- name: options
|
|
219
540
|
in: query
|
|
220
|
-
description:
|
|
541
|
+
description: Options
|
|
221
542
|
required: false
|
|
222
543
|
schema:
|
|
223
544
|
type: string
|
|
224
|
-
|
|
545
|
+
requestBody:
|
|
546
|
+
description: SQL statement to execute
|
|
547
|
+
required: true
|
|
548
|
+
content:
|
|
549
|
+
application/json:
|
|
550
|
+
schema:
|
|
551
|
+
type: object
|
|
552
|
+
properties:
|
|
553
|
+
sqlStatement:
|
|
554
|
+
type: string
|
|
555
|
+
responses:
|
|
556
|
+
"200":
|
|
557
|
+
description: Query execution results
|
|
558
|
+
content:
|
|
559
|
+
application/json:
|
|
560
|
+
schema:
|
|
561
|
+
$ref: "#/components/schemas/QueryData"
|
|
562
|
+
"401":
|
|
563
|
+
$ref: "#/components/responses/Unauthorized"
|
|
564
|
+
"404":
|
|
565
|
+
$ref: "#/components/responses/NotFound"
|
|
566
|
+
"500":
|
|
567
|
+
$ref: "#/components/responses/InternalServerError"
|
|
568
|
+
/projects/{projectName}/connections/{connectionName}/sqlTemporaryTable:
|
|
569
|
+
post:
|
|
570
|
+
tags:
|
|
571
|
+
- connections
|
|
572
|
+
operationId: post-temporarytable
|
|
573
|
+
summary: Create temporary table
|
|
574
|
+
description: |
|
|
575
|
+
Creates a temporary table from a SQL statement using the specified database connection.
|
|
576
|
+
Temporary tables are useful for storing intermediate results during complex queries and data processing workflows.
|
|
577
|
+
parameters:
|
|
578
|
+
- name: projectName
|
|
579
|
+
in: path
|
|
580
|
+
description: Name of the project
|
|
581
|
+
required: true
|
|
582
|
+
schema:
|
|
583
|
+
$ref: "#/components/schemas/IdentifierPattern"
|
|
584
|
+
- name: connectionName
|
|
585
|
+
in: path
|
|
586
|
+
description: Name of the connection
|
|
587
|
+
required: true
|
|
588
|
+
schema:
|
|
589
|
+
$ref: "#/components/schemas/IdentifierPattern"
|
|
590
|
+
requestBody:
|
|
591
|
+
description: SQL statement to create the temporary table
|
|
592
|
+
required: true
|
|
593
|
+
content:
|
|
594
|
+
application/json:
|
|
595
|
+
schema:
|
|
596
|
+
type: object
|
|
597
|
+
properties:
|
|
598
|
+
sqlStatement:
|
|
599
|
+
type: string
|
|
600
|
+
responses:
|
|
601
|
+
"200":
|
|
602
|
+
description: Temporary table information
|
|
603
|
+
content:
|
|
604
|
+
application/json:
|
|
605
|
+
schema:
|
|
606
|
+
$ref: "#/components/schemas/TemporaryTable"
|
|
607
|
+
"401":
|
|
608
|
+
$ref: "#/components/responses/Unauthorized"
|
|
609
|
+
"404":
|
|
610
|
+
$ref: "#/components/responses/NotFound"
|
|
611
|
+
"500":
|
|
612
|
+
$ref: "#/components/responses/InternalServerError"
|
|
613
|
+
|
|
614
|
+
# TODO: Remove this endpoint.
|
|
615
|
+
/projects/{projectName}/connections/{connectionName}/temporaryTable:
|
|
616
|
+
get:
|
|
617
|
+
tags:
|
|
618
|
+
- connections
|
|
619
|
+
operationId: get-temporarytable
|
|
620
|
+
deprecated: true
|
|
621
|
+
summary: Create temporary table (deprecated)
|
|
622
|
+
description: |
|
|
623
|
+
**DEPRECATED**: This endpoint is deprecated and may be removed in future versions.
|
|
624
|
+
Use the POST version instead for better security and functionality.
|
|
625
|
+
|
|
626
|
+
Creates a temporary table from a SQL statement using the specified connection.
|
|
627
|
+
Temporary tables are useful for storing intermediate results during complex queries.
|
|
628
|
+
parameters:
|
|
629
|
+
- name: projectName
|
|
630
|
+
in: path
|
|
631
|
+
description: Name of the project
|
|
632
|
+
required: true
|
|
633
|
+
schema:
|
|
634
|
+
$ref: "#/components/schemas/IdentifierPattern"
|
|
635
|
+
- name: connectionName
|
|
636
|
+
in: path
|
|
637
|
+
description: Name of the connection
|
|
638
|
+
required: true
|
|
639
|
+
schema:
|
|
640
|
+
$ref: "#/components/schemas/IdentifierPattern"
|
|
641
|
+
- name: sqlStatement
|
|
225
642
|
in: query
|
|
226
|
-
description:
|
|
643
|
+
description: SQL statement
|
|
227
644
|
required: false
|
|
228
645
|
schema:
|
|
229
646
|
type: string
|
|
230
647
|
responses:
|
|
231
|
-
200:
|
|
232
|
-
description:
|
|
233
|
-
A table source.
|
|
648
|
+
"200":
|
|
649
|
+
description: Temporary table information
|
|
234
650
|
content:
|
|
235
651
|
application/json:
|
|
236
652
|
schema:
|
|
237
|
-
$ref: "#/components/schemas/
|
|
238
|
-
401:
|
|
239
|
-
$ref: "#/components/responses/
|
|
240
|
-
404:
|
|
241
|
-
$ref: "#/components/responses/
|
|
242
|
-
500:
|
|
653
|
+
$ref: "#/components/schemas/TemporaryTable"
|
|
654
|
+
"401":
|
|
655
|
+
$ref: "#/components/responses/Unauthorized"
|
|
656
|
+
"404":
|
|
657
|
+
$ref: "#/components/responses/NotFound"
|
|
658
|
+
"500":
|
|
243
659
|
$ref: "#/components/responses/InternalServerError"
|
|
244
660
|
|
|
245
|
-
/projects/{projectName}/connections/{connectionName}/
|
|
661
|
+
# TODO: Remove this endpoint. This is deprecated and replaced by /projects/{projectName}/connections/{connectionName}/table resource.
|
|
662
|
+
/projects/{projectName}/connections/{connectionName}/tableSource:
|
|
246
663
|
get:
|
|
247
664
|
tags:
|
|
248
|
-
|
|
249
|
-
operationId: get-
|
|
250
|
-
summary:
|
|
251
|
-
|
|
665
|
+
- connections
|
|
666
|
+
operationId: get-tablesource
|
|
667
|
+
summary: Get table source information
|
|
668
|
+
deprecated: true
|
|
669
|
+
description: |
|
|
670
|
+
Retrieves information about a specific table or view from the database connection.
|
|
671
|
+
This includes table schema, column definitions, and metadata. The table can be specified
|
|
672
|
+
by either tableKey or tablePath parameters, depending on the database type.
|
|
252
673
|
parameters:
|
|
253
674
|
- name: projectName
|
|
254
675
|
in: path
|
|
255
|
-
description: Name of project
|
|
676
|
+
description: Name of the project
|
|
256
677
|
required: true
|
|
257
678
|
schema:
|
|
258
|
-
|
|
679
|
+
$ref: "#/components/schemas/IdentifierPattern"
|
|
259
680
|
- name: connectionName
|
|
260
681
|
in: path
|
|
261
|
-
description: Name of connection
|
|
682
|
+
description: Name of the connection
|
|
262
683
|
required: true
|
|
263
684
|
schema:
|
|
264
|
-
|
|
265
|
-
- name:
|
|
685
|
+
$ref: "#/components/schemas/IdentifierPattern"
|
|
686
|
+
- name: tableKey
|
|
266
687
|
in: query
|
|
267
|
-
description:
|
|
688
|
+
description: Table key
|
|
268
689
|
required: false
|
|
269
690
|
schema:
|
|
270
691
|
type: string
|
|
271
|
-
- name:
|
|
692
|
+
- name: tablePath
|
|
272
693
|
in: query
|
|
273
|
-
description:
|
|
694
|
+
description: Table path
|
|
274
695
|
required: false
|
|
275
696
|
schema:
|
|
276
697
|
type: string
|
|
277
698
|
responses:
|
|
278
|
-
200:
|
|
279
|
-
description:
|
|
280
|
-
A query and its results.
|
|
699
|
+
"200":
|
|
700
|
+
description: Table source information
|
|
281
701
|
content:
|
|
282
702
|
application/json:
|
|
283
703
|
schema:
|
|
284
|
-
$ref: "#/components/schemas/
|
|
285
|
-
401:
|
|
286
|
-
$ref: "#/components/responses/
|
|
287
|
-
404:
|
|
288
|
-
$ref: "#/components/responses/
|
|
289
|
-
500:
|
|
704
|
+
$ref: "#/components/schemas/TableSource"
|
|
705
|
+
"401":
|
|
706
|
+
$ref: "#/components/responses/Unauthorized"
|
|
707
|
+
"404":
|
|
708
|
+
$ref: "#/components/responses/NotFound"
|
|
709
|
+
"500":
|
|
290
710
|
$ref: "#/components/responses/InternalServerError"
|
|
291
711
|
|
|
292
|
-
|
|
712
|
+
# TODO: Remove this endpoint.
|
|
713
|
+
/projects/{projectName}/connections/{connectionName}/queryData:
|
|
293
714
|
get:
|
|
294
715
|
tags:
|
|
295
|
-
|
|
296
|
-
operationId: get-
|
|
297
|
-
|
|
298
|
-
|
|
716
|
+
- connections
|
|
717
|
+
operationId: get-querydata
|
|
718
|
+
deprecated: true
|
|
719
|
+
summary: Execute SQL query (deprecated)
|
|
720
|
+
description: |
|
|
721
|
+
**DEPRECATED**: This endpoint is deprecated and may be removed in future versions.
|
|
722
|
+
Use the POST version instead for better security and functionality.
|
|
723
|
+
|
|
724
|
+
Executes a SQL statement against the specified database connection and returns the results.
|
|
725
|
+
The query results include data, metadata, and execution information.
|
|
299
726
|
parameters:
|
|
300
727
|
- name: projectName
|
|
301
728
|
in: path
|
|
302
|
-
description: Name of project
|
|
729
|
+
description: Name of the project
|
|
303
730
|
required: true
|
|
304
731
|
schema:
|
|
305
|
-
|
|
732
|
+
$ref: "#/components/schemas/IdentifierPattern"
|
|
306
733
|
- name: connectionName
|
|
307
734
|
in: path
|
|
308
|
-
description: Name of connection
|
|
735
|
+
description: Name of the connection
|
|
309
736
|
required: true
|
|
310
737
|
schema:
|
|
311
|
-
|
|
738
|
+
$ref: "#/components/schemas/IdentifierPattern"
|
|
312
739
|
- name: sqlStatement
|
|
313
740
|
in: query
|
|
314
741
|
description: SQL statement
|
|
315
742
|
required: false
|
|
316
743
|
schema:
|
|
317
744
|
type: string
|
|
745
|
+
- name: options
|
|
746
|
+
in: query
|
|
747
|
+
description: Options
|
|
748
|
+
required: false
|
|
749
|
+
schema:
|
|
750
|
+
type: string
|
|
318
751
|
responses:
|
|
319
|
-
200:
|
|
320
|
-
description:
|
|
321
|
-
A temporary table.
|
|
752
|
+
"200":
|
|
753
|
+
description: Query execution results
|
|
322
754
|
content:
|
|
323
755
|
application/json:
|
|
324
756
|
schema:
|
|
325
|
-
$ref: "#/components/schemas/
|
|
326
|
-
401:
|
|
327
|
-
$ref: "#/components/responses/
|
|
328
|
-
404:
|
|
329
|
-
$ref: "#/components/responses/
|
|
330
|
-
500:
|
|
757
|
+
$ref: "#/components/schemas/QueryData"
|
|
758
|
+
"401":
|
|
759
|
+
$ref: "#/components/responses/Unauthorized"
|
|
760
|
+
"404":
|
|
761
|
+
$ref: "#/components/responses/NotFound"
|
|
762
|
+
"500":
|
|
331
763
|
$ref: "#/components/responses/InternalServerError"
|
|
332
|
-
|
|
333
764
|
|
|
334
765
|
/projects/{projectName}/packages:
|
|
335
766
|
get:
|
|
336
767
|
tags:
|
|
337
|
-
|
|
768
|
+
- packages
|
|
338
769
|
operationId: list-packages
|
|
339
|
-
summary:
|
|
340
|
-
|
|
770
|
+
summary: List project packages
|
|
771
|
+
description: |
|
|
772
|
+
Retrieves a list of all Malloy packages within the specified project. Each package
|
|
773
|
+
contains models, notebooks, databases, and other resources. This endpoint is useful
|
|
774
|
+
for discovering available packages and their basic metadata.
|
|
341
775
|
parameters:
|
|
342
776
|
- name: projectName
|
|
343
777
|
in: path
|
|
344
|
-
description: Name of project
|
|
778
|
+
description: Name of the project
|
|
345
779
|
required: true
|
|
346
780
|
schema:
|
|
347
|
-
|
|
781
|
+
$ref: "#/components/schemas/IdentifierPattern"
|
|
348
782
|
responses:
|
|
349
|
-
200:
|
|
350
|
-
description:
|
|
351
|
-
A list of the Packages names.
|
|
783
|
+
"200":
|
|
784
|
+
description: A list of all packages in the project
|
|
352
785
|
content:
|
|
353
786
|
application/json:
|
|
354
787
|
schema:
|
|
355
788
|
type: array
|
|
356
789
|
items:
|
|
357
790
|
$ref: "#/components/schemas/Package"
|
|
358
|
-
401:
|
|
359
|
-
$ref: "#/components/responses/
|
|
360
|
-
500:
|
|
791
|
+
"401":
|
|
792
|
+
$ref: "#/components/responses/Unauthorized"
|
|
793
|
+
"500":
|
|
794
|
+
$ref: "#/components/responses/InternalServerError"
|
|
795
|
+
"501":
|
|
796
|
+
$ref: "#/components/responses/NotImplemented"
|
|
797
|
+
post:
|
|
798
|
+
tags:
|
|
799
|
+
- packages
|
|
800
|
+
operationId: create-package
|
|
801
|
+
summary: Create a new package
|
|
802
|
+
description: |
|
|
803
|
+
Creates a new Malloy package within the specified project. A package serves as a
|
|
804
|
+
container for models, notebooks, embedded databases, and other resources. The package
|
|
805
|
+
will be initialized with the provided metadata and can immediately accept content.
|
|
806
|
+
parameters:
|
|
807
|
+
- name: projectName
|
|
808
|
+
in: path
|
|
809
|
+
description: Name of the project
|
|
810
|
+
required: true
|
|
811
|
+
schema:
|
|
812
|
+
$ref: "#/components/schemas/IdentifierPattern"
|
|
813
|
+
requestBody:
|
|
814
|
+
required: true
|
|
815
|
+
content:
|
|
816
|
+
application/json:
|
|
817
|
+
schema:
|
|
818
|
+
$ref: "#/components/schemas/Package"
|
|
819
|
+
responses:
|
|
820
|
+
"200":
|
|
821
|
+
description: Returns the package created
|
|
822
|
+
content:
|
|
823
|
+
application/json:
|
|
824
|
+
schema:
|
|
825
|
+
$ref: "#/components/schemas/Package"
|
|
826
|
+
"401":
|
|
827
|
+
$ref: "#/components/responses/Unauthorized"
|
|
828
|
+
"500":
|
|
361
829
|
$ref: "#/components/responses/InternalServerError"
|
|
362
|
-
501:
|
|
363
|
-
$ref: "#/components/responses/
|
|
830
|
+
"501":
|
|
831
|
+
$ref: "#/components/responses/NotImplemented"
|
|
364
832
|
|
|
365
833
|
/projects/{projectName}/packages/{packageName}:
|
|
366
834
|
get:
|
|
367
835
|
tags:
|
|
368
|
-
|
|
836
|
+
- packages
|
|
369
837
|
operationId: get-package
|
|
370
|
-
summary:
|
|
371
|
-
|
|
838
|
+
summary: Get package details and metadata
|
|
839
|
+
description: |
|
|
840
|
+
Retrieves detailed information about a specific package, including its models, notebooks,
|
|
841
|
+
databases, and metadata. The reload parameter can be used to refresh the package state
|
|
842
|
+
from disk before returning the information. The versionId parameter allows access to
|
|
843
|
+
specific package versions.
|
|
372
844
|
parameters:
|
|
373
845
|
- name: projectName
|
|
374
846
|
in: path
|
|
375
|
-
description: Name of project
|
|
847
|
+
description: Name of the project
|
|
376
848
|
required: true
|
|
377
849
|
schema:
|
|
378
|
-
|
|
850
|
+
$ref: "#/components/schemas/IdentifierPattern"
|
|
379
851
|
- name: packageName
|
|
380
852
|
in: path
|
|
381
853
|
description: Package name
|
|
@@ -384,521 +856,843 @@ paths:
|
|
|
384
856
|
type: string
|
|
385
857
|
- name: versionId
|
|
386
858
|
in: query
|
|
387
|
-
description: Version
|
|
859
|
+
description: Version identifier for the package
|
|
388
860
|
required: false
|
|
389
861
|
schema:
|
|
390
|
-
|
|
862
|
+
$ref: "#/components/schemas/VersionIdPattern"
|
|
863
|
+
- name: reload
|
|
864
|
+
in: query
|
|
865
|
+
description: Load / reload the package before returning result
|
|
866
|
+
required: false
|
|
867
|
+
schema:
|
|
868
|
+
type: boolean
|
|
869
|
+
responses:
|
|
870
|
+
"200":
|
|
871
|
+
description: Package details and metadata
|
|
872
|
+
content:
|
|
873
|
+
application/json:
|
|
874
|
+
schema:
|
|
875
|
+
$ref: "#/components/schemas/Package"
|
|
876
|
+
"401":
|
|
877
|
+
$ref: "#/components/responses/Unauthorized"
|
|
878
|
+
"404":
|
|
879
|
+
$ref: "#/components/responses/NotFound"
|
|
880
|
+
"500":
|
|
881
|
+
$ref: "#/components/responses/InternalServerError"
|
|
882
|
+
"501":
|
|
883
|
+
$ref: "#/components/responses/NotImplemented"
|
|
884
|
+
patch:
|
|
885
|
+
tags:
|
|
886
|
+
- packages
|
|
887
|
+
operationId: update-package
|
|
888
|
+
summary: Update package configuration
|
|
889
|
+
description: |
|
|
890
|
+
Updates the configuration and metadata of an existing package. This allows you to
|
|
891
|
+
modify package settings, update the description, change the location, or update other
|
|
892
|
+
package-level properties. The package must exist and be accessible.
|
|
893
|
+
parameters:
|
|
894
|
+
- name: projectName
|
|
895
|
+
in: path
|
|
896
|
+
description: Name of the project
|
|
897
|
+
required: true
|
|
898
|
+
schema:
|
|
899
|
+
$ref: "#/components/schemas/IdentifierPattern"
|
|
900
|
+
- name: packageName
|
|
901
|
+
in: path
|
|
902
|
+
description: Name of the package
|
|
903
|
+
required: true
|
|
904
|
+
schema:
|
|
905
|
+
$ref: "#/components/schemas/IdentifierPattern"
|
|
906
|
+
requestBody:
|
|
907
|
+
required: true
|
|
908
|
+
content:
|
|
909
|
+
application/json:
|
|
910
|
+
schema:
|
|
911
|
+
$ref: "#/components/schemas/Package"
|
|
391
912
|
responses:
|
|
392
|
-
200:
|
|
393
|
-
description:
|
|
394
|
-
Package metadata.
|
|
913
|
+
"200":
|
|
914
|
+
description: Returns the package updated
|
|
395
915
|
content:
|
|
396
916
|
application/json:
|
|
397
917
|
schema:
|
|
398
918
|
$ref: "#/components/schemas/Package"
|
|
399
|
-
401:
|
|
400
|
-
$ref: "#/components/responses/
|
|
401
|
-
404:
|
|
402
|
-
$ref: "#/components/responses/
|
|
403
|
-
500:
|
|
919
|
+
"401":
|
|
920
|
+
$ref: "#/components/responses/Unauthorized"
|
|
921
|
+
"404":
|
|
922
|
+
$ref: "#/components/responses/NotFound"
|
|
923
|
+
"500":
|
|
404
924
|
$ref: "#/components/responses/InternalServerError"
|
|
405
|
-
501:
|
|
406
|
-
$ref: "#/components/responses/
|
|
925
|
+
"501":
|
|
926
|
+
$ref: "#/components/responses/NotImplemented"
|
|
927
|
+
delete:
|
|
928
|
+
tags:
|
|
929
|
+
- packages
|
|
930
|
+
operationId: delete-package
|
|
931
|
+
summary: Delete a package
|
|
932
|
+
description: |
|
|
933
|
+
Permanently deletes a package and all its associated resources including models,
|
|
934
|
+
notebooks, databases, and metadata. This operation cannot be undone, so use with caution.
|
|
935
|
+
The package must exist and be accessible for deletion.
|
|
936
|
+
parameters:
|
|
937
|
+
- name: projectName
|
|
938
|
+
in: path
|
|
939
|
+
description: Name of the project
|
|
940
|
+
required: true
|
|
941
|
+
schema:
|
|
942
|
+
$ref: "#/components/schemas/IdentifierPattern"
|
|
943
|
+
- name: packageName
|
|
944
|
+
in: path
|
|
945
|
+
description: Name of the package
|
|
946
|
+
required: true
|
|
947
|
+
schema:
|
|
948
|
+
$ref: "#/components/schemas/IdentifierPattern"
|
|
949
|
+
responses:
|
|
950
|
+
"200":
|
|
951
|
+
description: Returns the package deleted
|
|
952
|
+
content:
|
|
953
|
+
application/json:
|
|
954
|
+
schema:
|
|
955
|
+
$ref: "#/components/schemas/Package"
|
|
956
|
+
"401":
|
|
957
|
+
$ref: "#/components/responses/Unauthorized"
|
|
958
|
+
"404":
|
|
959
|
+
$ref: "#/components/responses/NotFound"
|
|
960
|
+
"500":
|
|
961
|
+
$ref: "#/components/responses/InternalServerError"
|
|
962
|
+
"501":
|
|
963
|
+
$ref: "#/components/responses/NotImplemented"
|
|
407
964
|
|
|
408
965
|
/projects/{projectName}/packages/{packageName}/models:
|
|
409
966
|
get:
|
|
410
967
|
tags:
|
|
411
|
-
|
|
968
|
+
- models
|
|
412
969
|
operationId: list-models
|
|
413
|
-
summary:
|
|
414
|
-
|
|
970
|
+
summary: List package models
|
|
971
|
+
description: |
|
|
972
|
+
Retrieves a list of all Malloy models within the specified package. Each model entry
|
|
973
|
+
includes the relative path, package name, and any compilation errors. This endpoint
|
|
974
|
+
is useful for discovering available models and checking their status.
|
|
415
975
|
parameters:
|
|
416
976
|
- name: projectName
|
|
417
977
|
in: path
|
|
418
|
-
description: Name of project
|
|
978
|
+
description: Name of the project
|
|
419
979
|
required: true
|
|
420
980
|
schema:
|
|
421
|
-
|
|
981
|
+
$ref: "#/components/schemas/IdentifierPattern"
|
|
422
982
|
- name: packageName
|
|
423
983
|
in: path
|
|
424
|
-
description: Name of package
|
|
984
|
+
description: Name of the package
|
|
425
985
|
required: true
|
|
426
986
|
schema:
|
|
427
|
-
|
|
987
|
+
$ref: "#/components/schemas/IdentifierPattern"
|
|
428
988
|
- name: versionId
|
|
429
989
|
in: query
|
|
430
|
-
description: Version
|
|
990
|
+
description: Version identifier for the package
|
|
431
991
|
required: false
|
|
432
992
|
schema:
|
|
433
|
-
|
|
993
|
+
$ref: "#/components/schemas/VersionIdPattern"
|
|
434
994
|
responses:
|
|
435
|
-
200:
|
|
436
|
-
description:
|
|
437
|
-
A list of relative paths to the models in the package.
|
|
995
|
+
"200":
|
|
996
|
+
description: A list of models in the package
|
|
438
997
|
content:
|
|
439
998
|
application/json:
|
|
440
999
|
schema:
|
|
441
1000
|
type: array
|
|
442
|
-
items:
|
|
1001
|
+
items:
|
|
443
1002
|
$ref: "#/components/schemas/Model"
|
|
444
|
-
401:
|
|
445
|
-
$ref: "#/components/responses/
|
|
446
|
-
404:
|
|
447
|
-
$ref: "#/components/responses/
|
|
448
|
-
500:
|
|
1003
|
+
"401":
|
|
1004
|
+
$ref: "#/components/responses/Unauthorized"
|
|
1005
|
+
"404":
|
|
1006
|
+
$ref: "#/components/responses/NotFound"
|
|
1007
|
+
"500":
|
|
449
1008
|
$ref: "#/components/responses/InternalServerError"
|
|
450
|
-
501:
|
|
451
|
-
$ref: "#/components/responses/
|
|
1009
|
+
"501":
|
|
1010
|
+
$ref: "#/components/responses/NotImplemented"
|
|
452
1011
|
|
|
453
1012
|
/projects/{projectName}/packages/{packageName}/models/{path}:
|
|
454
1013
|
get:
|
|
455
1014
|
tags:
|
|
456
|
-
|
|
1015
|
+
- models
|
|
457
1016
|
operationId: get-model
|
|
458
|
-
summary:
|
|
459
|
-
|
|
1017
|
+
summary: Get compiled Malloy model
|
|
1018
|
+
description: |
|
|
1019
|
+
Retrieves a compiled Malloy model with its source information, queries, and metadata.
|
|
1020
|
+
The model is compiled using the specified version of the Malloy compiler. This endpoint
|
|
1021
|
+
provides access to the model's structure, sources, and named queries for use in applications.
|
|
460
1022
|
parameters:
|
|
461
1023
|
- name: projectName
|
|
462
1024
|
in: path
|
|
463
|
-
description: Name of project
|
|
1025
|
+
description: Name of the project
|
|
464
1026
|
required: true
|
|
465
1027
|
schema:
|
|
466
|
-
|
|
1028
|
+
$ref: "#/components/schemas/IdentifierPattern"
|
|
467
1029
|
- name: packageName
|
|
468
1030
|
in: path
|
|
469
|
-
description: Name of package
|
|
1031
|
+
description: Name of the package
|
|
470
1032
|
required: true
|
|
471
1033
|
schema:
|
|
472
1034
|
type: string
|
|
473
1035
|
- name: path
|
|
474
1036
|
in: path
|
|
475
|
-
description: Path to model
|
|
1037
|
+
description: Path to the model within the package
|
|
476
1038
|
required: true
|
|
477
1039
|
schema:
|
|
478
|
-
|
|
1040
|
+
$ref: "#/components/schemas/PathPattern"
|
|
1041
|
+
- name: versionId
|
|
1042
|
+
in: query
|
|
1043
|
+
description: Version identifier for the package
|
|
1044
|
+
required: false
|
|
1045
|
+
schema:
|
|
1046
|
+
$ref: "#/components/schemas/VersionIdPattern"
|
|
1047
|
+
responses:
|
|
1048
|
+
"200":
|
|
1049
|
+
description: Compiled Malloy model
|
|
1050
|
+
content:
|
|
1051
|
+
"application/json":
|
|
1052
|
+
schema:
|
|
1053
|
+
$ref: "#/components/schemas/CompiledModel"
|
|
1054
|
+
"401":
|
|
1055
|
+
$ref: "#/components/responses/Unauthorized"
|
|
1056
|
+
"404":
|
|
1057
|
+
$ref: "#/components/responses/NotFound"
|
|
1058
|
+
"424":
|
|
1059
|
+
$ref: "#/components/responses/ModelCompilationError"
|
|
1060
|
+
"500":
|
|
1061
|
+
$ref: "#/components/responses/InternalServerError"
|
|
1062
|
+
"501":
|
|
1063
|
+
$ref: "#/components/responses/NotImplemented"
|
|
1064
|
+
|
|
1065
|
+
/projects/{projectName}/packages/{packageName}/models/{path}/query:
|
|
1066
|
+
post:
|
|
1067
|
+
tags:
|
|
1068
|
+
- models
|
|
1069
|
+
operationId: execute-query-model
|
|
1070
|
+
summary: Execute Malloy query
|
|
1071
|
+
description: |
|
|
1072
|
+
Executes a Malloy query against a model and returns the results. The query can be specified
|
|
1073
|
+
as a raw Malloy query string or by referencing a named query within the model. This endpoint
|
|
1074
|
+
supports both ad-hoc queries and predefined model queries, making it flexible for various
|
|
1075
|
+
use cases including data exploration, reporting, and application integration.
|
|
1076
|
+
parameters:
|
|
1077
|
+
- name: projectName
|
|
1078
|
+
in: path
|
|
1079
|
+
description: Name of the project
|
|
1080
|
+
required: true
|
|
1081
|
+
schema:
|
|
1082
|
+
$ref: "#/components/schemas/IdentifierPattern"
|
|
1083
|
+
- name: packageName
|
|
1084
|
+
in: path
|
|
1085
|
+
description: Name of the package
|
|
1086
|
+
required: true
|
|
1087
|
+
schema:
|
|
1088
|
+
$ref: "#/components/schemas/IdentifierPattern"
|
|
1089
|
+
- name: path
|
|
1090
|
+
in: path
|
|
1091
|
+
description: Path to the model within the package
|
|
1092
|
+
required: true
|
|
1093
|
+
schema:
|
|
1094
|
+
$ref: "#/components/schemas/PathPattern"
|
|
1095
|
+
requestBody:
|
|
1096
|
+
required: true
|
|
1097
|
+
content:
|
|
1098
|
+
application/json:
|
|
1099
|
+
schema:
|
|
1100
|
+
$ref: "#/components/schemas/QueryRequest"
|
|
1101
|
+
responses:
|
|
1102
|
+
"200":
|
|
1103
|
+
description: Query execution results
|
|
1104
|
+
content:
|
|
1105
|
+
"application/json":
|
|
1106
|
+
schema:
|
|
1107
|
+
$ref: "#/components/schemas/QueryResult"
|
|
1108
|
+
"400":
|
|
1109
|
+
$ref: "#/components/responses/BadRequest"
|
|
1110
|
+
"401":
|
|
1111
|
+
$ref: "#/components/responses/Unauthorized"
|
|
1112
|
+
"404":
|
|
1113
|
+
$ref: "#/components/responses/NotFound"
|
|
1114
|
+
"500":
|
|
1115
|
+
$ref: "#/components/responses/InternalServerError"
|
|
1116
|
+
"501":
|
|
1117
|
+
$ref: "#/components/responses/NotImplemented"
|
|
1118
|
+
|
|
1119
|
+
/projects/{projectName}/packages/{packageName}/notebooks:
|
|
1120
|
+
get:
|
|
1121
|
+
tags:
|
|
1122
|
+
- notebooks
|
|
1123
|
+
operationId: list-notebooks
|
|
1124
|
+
summary: List package notebooks
|
|
1125
|
+
description: |
|
|
1126
|
+
Retrieves a list of all Malloy notebooks within the specified package. Each notebook entry
|
|
1127
|
+
includes the relative path, package name, and any compilation errors. This endpoint
|
|
1128
|
+
is useful for discovering available notebooks and checking their status.
|
|
1129
|
+
parameters:
|
|
1130
|
+
- name: projectName
|
|
1131
|
+
in: path
|
|
1132
|
+
description: Name of the project
|
|
1133
|
+
required: true
|
|
1134
|
+
schema:
|
|
1135
|
+
$ref: "#/components/schemas/IdentifierPattern"
|
|
1136
|
+
- name: packageName
|
|
1137
|
+
in: path
|
|
1138
|
+
description: Name of the package
|
|
1139
|
+
required: true
|
|
1140
|
+
schema:
|
|
1141
|
+
$ref: "#/components/schemas/IdentifierPattern"
|
|
479
1142
|
- name: versionId
|
|
480
1143
|
in: query
|
|
481
|
-
description: Version
|
|
1144
|
+
description: Version identifier for the package
|
|
482
1145
|
required: false
|
|
483
1146
|
schema:
|
|
484
|
-
|
|
1147
|
+
$ref: "#/components/schemas/VersionIdPattern"
|
|
485
1148
|
responses:
|
|
486
|
-
200:
|
|
487
|
-
description:
|
|
488
|
-
A Malloy model.
|
|
1149
|
+
"200":
|
|
1150
|
+
description: A list of models in the package
|
|
489
1151
|
content:
|
|
490
|
-
|
|
1152
|
+
application/json:
|
|
491
1153
|
schema:
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
$ref: "#/components/responses/
|
|
497
|
-
|
|
1154
|
+
type: array
|
|
1155
|
+
items:
|
|
1156
|
+
$ref: "#/components/schemas/Notebook"
|
|
1157
|
+
"401":
|
|
1158
|
+
$ref: "#/components/responses/Unauthorized"
|
|
1159
|
+
"404":
|
|
1160
|
+
$ref: "#/components/responses/NotFound"
|
|
1161
|
+
"500":
|
|
498
1162
|
$ref: "#/components/responses/InternalServerError"
|
|
499
|
-
501:
|
|
500
|
-
$ref: "#/components/responses/
|
|
1163
|
+
"501":
|
|
1164
|
+
$ref: "#/components/responses/NotImplemented"
|
|
501
1165
|
|
|
502
|
-
|
|
1166
|
+
# TODO: Notebooks should return the notebook file content, not the compiled notebook. The front end shoould
|
|
1167
|
+
# run the individual notebook cells against the backend.
|
|
1168
|
+
/projects/{projectName}/packages/{packageName}/notebooks/{path}:
|
|
503
1169
|
get:
|
|
504
1170
|
tags:
|
|
505
|
-
|
|
506
|
-
operationId:
|
|
507
|
-
summary:
|
|
508
|
-
|
|
1171
|
+
- notebooks
|
|
1172
|
+
operationId: get-notebook
|
|
1173
|
+
summary: Get compiled Malloy notebook
|
|
1174
|
+
description: |
|
|
1175
|
+
Retrieves a compiled Malloy notebook with its cells, results, and metadata. The notebook
|
|
1176
|
+
is compiled using the specified version of the Malloy compiler. This endpoint provides
|
|
1177
|
+
access to the notebook's structure, cells, and execution results for use in applications.
|
|
509
1178
|
parameters:
|
|
510
1179
|
- name: projectName
|
|
511
1180
|
in: path
|
|
512
|
-
description: Name of project
|
|
1181
|
+
description: Name of the project
|
|
513
1182
|
required: true
|
|
514
1183
|
schema:
|
|
515
|
-
|
|
1184
|
+
$ref: "#/components/schemas/IdentifierPattern"
|
|
516
1185
|
- name: packageName
|
|
517
1186
|
in: path
|
|
518
|
-
description: Name of package
|
|
1187
|
+
description: Name of the package
|
|
519
1188
|
required: true
|
|
520
1189
|
schema:
|
|
521
1190
|
type: string
|
|
522
1191
|
- name: path
|
|
523
1192
|
in: path
|
|
524
|
-
description: Path to
|
|
1193
|
+
description: Path to notebook within the package.
|
|
525
1194
|
required: true
|
|
526
1195
|
schema:
|
|
527
1196
|
type: string
|
|
528
|
-
-
|
|
529
|
-
|
|
530
|
-
description:
|
|
531
|
-
Query string to execute on the model. If the query is paramter is set, the queryName parameter must be empty.
|
|
532
|
-
required: false
|
|
533
|
-
schema:
|
|
534
|
-
type: string
|
|
535
|
-
- in: query
|
|
536
|
-
name: sourceName
|
|
537
|
-
description: Name of the source in the model to use for queryName, search, and topValue requests.
|
|
538
|
-
required: false
|
|
539
|
-
schema:
|
|
540
|
-
type: string
|
|
541
|
-
- in: query
|
|
542
|
-
name: queryName
|
|
543
|
-
description: Name of a query to execute on a source in the model. Requires the sourceName parameter is set. If the queryName is paramter is set, the query parameter must be empty.
|
|
544
|
-
required: false
|
|
545
|
-
schema:
|
|
546
|
-
type: string
|
|
547
|
-
- in: query
|
|
548
|
-
name: versionId
|
|
549
|
-
description: Version ID
|
|
1197
|
+
- name: versionId
|
|
1198
|
+
in: query
|
|
1199
|
+
description: Version identifier for the package
|
|
550
1200
|
required: false
|
|
551
1201
|
schema:
|
|
552
|
-
|
|
1202
|
+
$ref: "#/components/schemas/VersionIdPattern"
|
|
553
1203
|
responses:
|
|
554
|
-
200:
|
|
555
|
-
description:
|
|
556
|
-
A query and its results.
|
|
1204
|
+
"200":
|
|
1205
|
+
description: A Malloy notebook.
|
|
557
1206
|
content:
|
|
558
1207
|
"application/json":
|
|
559
1208
|
schema:
|
|
560
|
-
$ref: "#/components/schemas/
|
|
561
|
-
|
|
562
|
-
$ref: "#/components/responses/
|
|
563
|
-
|
|
564
|
-
$ref: "#/components/responses/
|
|
565
|
-
|
|
566
|
-
$ref: "#/components/responses/NotFoundError"
|
|
567
|
-
500:
|
|
1209
|
+
$ref: "#/components/schemas/CompiledNotebook"
|
|
1210
|
+
"401":
|
|
1211
|
+
$ref: "#/components/responses/Unauthorized"
|
|
1212
|
+
"404":
|
|
1213
|
+
$ref: "#/components/responses/NotFound"
|
|
1214
|
+
"500":
|
|
568
1215
|
$ref: "#/components/responses/InternalServerError"
|
|
569
|
-
501:
|
|
570
|
-
$ref: "#/components/responses/
|
|
1216
|
+
"501":
|
|
1217
|
+
$ref: "#/components/responses/NotImplemented"
|
|
1218
|
+
|
|
571
1219
|
|
|
572
1220
|
/projects/{projectName}/packages/{packageName}/databases:
|
|
573
1221
|
get:
|
|
574
1222
|
tags:
|
|
575
|
-
|
|
1223
|
+
- databases
|
|
576
1224
|
operationId: list-databases
|
|
577
|
-
summary:
|
|
578
|
-
|
|
1225
|
+
summary: List embedded databases
|
|
1226
|
+
description: |
|
|
1227
|
+
Retrieves a list of all embedded databases within the specified package. These are typically
|
|
1228
|
+
DuckDB databases stored as .parquet files that provide local data storage for the package.
|
|
1229
|
+
Each database entry includes metadata about the database structure and content.
|
|
579
1230
|
parameters:
|
|
580
1231
|
- name: projectName
|
|
581
1232
|
in: path
|
|
582
|
-
description: Name of project
|
|
1233
|
+
description: Name of the project
|
|
583
1234
|
required: true
|
|
584
1235
|
schema:
|
|
585
|
-
|
|
1236
|
+
$ref: "#/components/schemas/IdentifierPattern"
|
|
586
1237
|
- name: packageName
|
|
587
1238
|
in: path
|
|
588
|
-
description: Name of package
|
|
1239
|
+
description: Name of the package
|
|
589
1240
|
required: true
|
|
590
1241
|
schema:
|
|
591
|
-
|
|
1242
|
+
$ref: "#/components/schemas/IdentifierPattern"
|
|
592
1243
|
- name: versionId
|
|
593
1244
|
in: query
|
|
594
|
-
description: Version
|
|
1245
|
+
description: Version identifier for the package
|
|
595
1246
|
required: false
|
|
596
1247
|
schema:
|
|
597
|
-
|
|
1248
|
+
$ref: "#/components/schemas/VersionIdPattern"
|
|
598
1249
|
responses:
|
|
599
|
-
200:
|
|
600
|
-
description:
|
|
601
|
-
A list of relative paths to the databases embedded in the package.
|
|
1250
|
+
"200":
|
|
1251
|
+
description: A list of embedded databases in the package
|
|
602
1252
|
content:
|
|
603
1253
|
application/json:
|
|
604
1254
|
schema:
|
|
605
1255
|
type: array
|
|
606
|
-
items:
|
|
1256
|
+
items:
|
|
607
1257
|
$ref: "#/components/schemas/Database"
|
|
608
|
-
401:
|
|
609
|
-
$ref: "#/components/responses/
|
|
610
|
-
404:
|
|
611
|
-
$ref: "#/components/responses/
|
|
612
|
-
500:
|
|
1258
|
+
"401":
|
|
1259
|
+
$ref: "#/components/responses/Unauthorized"
|
|
1260
|
+
"404":
|
|
1261
|
+
$ref: "#/components/responses/NotFound"
|
|
1262
|
+
"500":
|
|
1263
|
+
$ref: "#/components/responses/InternalServerError"
|
|
1264
|
+
"501":
|
|
1265
|
+
$ref: "#/components/responses/NotImplemented"
|
|
1266
|
+
|
|
1267
|
+
/connections/test:
|
|
1268
|
+
post:
|
|
1269
|
+
tags:
|
|
1270
|
+
- connectionsTest
|
|
1271
|
+
operationId: test-connection-configuration
|
|
1272
|
+
summary: Test database connection configuration
|
|
1273
|
+
description: |
|
|
1274
|
+
Validates a database connection configuration without adding it to any project.
|
|
1275
|
+
This endpoint allows you to test connection parameters, credentials, and network
|
|
1276
|
+
connectivity before committing the connection to a project. Useful for troubleshooting
|
|
1277
|
+
connection issues and validating configurations during setup.
|
|
1278
|
+
requestBody:
|
|
1279
|
+
required: true
|
|
1280
|
+
content:
|
|
1281
|
+
application/json:
|
|
1282
|
+
schema:
|
|
1283
|
+
$ref: '#/components/schemas/Connection'
|
|
1284
|
+
responses:
|
|
1285
|
+
"200":
|
|
1286
|
+
description: Connection test result
|
|
1287
|
+
content:
|
|
1288
|
+
application/json:
|
|
1289
|
+
schema:
|
|
1290
|
+
$ref: '#/components/schemas/ConnectionStatus'
|
|
1291
|
+
"400":
|
|
1292
|
+
$ref: "#/components/responses/BadRequest"
|
|
1293
|
+
"401":
|
|
1294
|
+
$ref: "#/components/responses/Unauthorized"
|
|
1295
|
+
"404":
|
|
1296
|
+
$ref: "#/components/responses/NotFound"
|
|
1297
|
+
"500":
|
|
613
1298
|
$ref: "#/components/responses/InternalServerError"
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
/projects/{projectName}/packages/{packageName}/schedules:
|
|
1299
|
+
|
|
1300
|
+
/watch-mode/status:
|
|
618
1301
|
get:
|
|
619
1302
|
tags:
|
|
620
|
-
|
|
621
|
-
operationId:
|
|
622
|
-
summary:
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
description: Name of project
|
|
628
|
-
required: true
|
|
629
|
-
schema:
|
|
630
|
-
type: string
|
|
631
|
-
- name: packageName
|
|
632
|
-
in: path
|
|
633
|
-
description: Name of package
|
|
634
|
-
required: true
|
|
635
|
-
schema:
|
|
636
|
-
type: string
|
|
637
|
-
- name: versionId
|
|
638
|
-
in: query
|
|
639
|
-
description: Version ID
|
|
640
|
-
required: false
|
|
641
|
-
schema:
|
|
642
|
-
type: string
|
|
1303
|
+
- watch-mode
|
|
1304
|
+
operationId: get-watch-status
|
|
1305
|
+
summary: Get watch mode status
|
|
1306
|
+
description: |
|
|
1307
|
+
Retrieves the current status of the file watching system. This includes whether watch mode
|
|
1308
|
+
is enabled, which project is being watched, and the path being monitored. Useful for
|
|
1309
|
+
monitoring the development workflow and ensuring file changes are being detected.
|
|
643
1310
|
responses:
|
|
644
|
-
200:
|
|
645
|
-
description:
|
|
646
|
-
A list of running schedules.
|
|
1311
|
+
"200":
|
|
1312
|
+
description: The current watch mode status.
|
|
647
1313
|
content:
|
|
648
1314
|
application/json:
|
|
649
1315
|
schema:
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
$ref: "#/components/responses/
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
1316
|
+
$ref: "#/components/schemas/WatchStatus"
|
|
1317
|
+
"401":
|
|
1318
|
+
$ref: "#/components/responses/Unauthorized"
|
|
1319
|
+
"500":
|
|
1320
|
+
$ref: "#/components/responses/InternalServerError"
|
|
1321
|
+
|
|
1322
|
+
/watch-mode/start:
|
|
1323
|
+
post:
|
|
1324
|
+
tags:
|
|
1325
|
+
- watch-mode
|
|
1326
|
+
operationId: start-watching
|
|
1327
|
+
summary: Start file watching
|
|
1328
|
+
description: |
|
|
1329
|
+
Initiates file watching for the specified project. This enables real-time monitoring of
|
|
1330
|
+
file changes within the project directory, allowing for automatic reloading and updates
|
|
1331
|
+
during development. Only one project can be watched at a time.
|
|
1332
|
+
requestBody:
|
|
1333
|
+
required: true
|
|
1334
|
+
content:
|
|
1335
|
+
application/json:
|
|
1336
|
+
schema:
|
|
1337
|
+
$ref: "#/components/schemas/StartWatchRequest"
|
|
1338
|
+
responses:
|
|
1339
|
+
"200":
|
|
1340
|
+
description: Watch mode started successfully.
|
|
1341
|
+
"401":
|
|
1342
|
+
$ref: "#/components/responses/Unauthorized"
|
|
1343
|
+
"500":
|
|
1344
|
+
$ref: "#/components/responses/InternalServerError"
|
|
1345
|
+
|
|
1346
|
+
/watch-mode/stop:
|
|
1347
|
+
post:
|
|
1348
|
+
tags:
|
|
1349
|
+
- watch-mode
|
|
1350
|
+
operationId: stop-watching
|
|
1351
|
+
summary: Stop file watching
|
|
1352
|
+
description: |
|
|
1353
|
+
Stops the current file watching session. This disables real-time monitoring of file changes
|
|
1354
|
+
and releases system resources. Use this when development is complete or when switching
|
|
1355
|
+
to a different project.
|
|
1356
|
+
responses:
|
|
1357
|
+
"200":
|
|
1358
|
+
description: Watch mode stopped successfully.
|
|
1359
|
+
"401":
|
|
1360
|
+
$ref: "#/components/responses/Unauthorized"
|
|
1361
|
+
"500":
|
|
658
1362
|
$ref: "#/components/responses/InternalServerError"
|
|
659
|
-
501:
|
|
660
|
-
$ref: "#/components/responses/NotImplementedError"
|
|
661
1363
|
|
|
662
1364
|
components:
|
|
663
1365
|
responses:
|
|
664
|
-
|
|
665
|
-
description: The
|
|
1366
|
+
BadRequest:
|
|
1367
|
+
description: The request was malformed or cannot be performed given the current state of the system
|
|
1368
|
+
content:
|
|
1369
|
+
application/json:
|
|
1370
|
+
schema:
|
|
1371
|
+
$ref: "#/components/schemas/Error"
|
|
1372
|
+
Unauthorized:
|
|
1373
|
+
description: Unauthorized - authentication required
|
|
1374
|
+
content:
|
|
1375
|
+
application/json:
|
|
1376
|
+
schema:
|
|
1377
|
+
$ref: "#/components/schemas/Error"
|
|
1378
|
+
Forbidden:
|
|
1379
|
+
description: Forbidden - insufficient permissions to perform the operation
|
|
666
1380
|
content:
|
|
667
1381
|
application/json:
|
|
668
1382
|
schema:
|
|
669
1383
|
$ref: "#/components/schemas/Error"
|
|
670
|
-
|
|
1384
|
+
NotFound:
|
|
671
1385
|
description: The specified resource was not found
|
|
672
1386
|
content:
|
|
673
1387
|
application/json:
|
|
674
1388
|
schema:
|
|
675
1389
|
$ref: "#/components/schemas/Error"
|
|
676
|
-
|
|
677
|
-
description:
|
|
1390
|
+
InternalServerError:
|
|
1391
|
+
description: The server encountered an internal error
|
|
678
1392
|
content:
|
|
679
1393
|
application/json:
|
|
680
1394
|
schema:
|
|
681
1395
|
$ref: "#/components/schemas/Error"
|
|
682
|
-
|
|
683
|
-
description:
|
|
1396
|
+
NotImplemented:
|
|
1397
|
+
description: The requested operation is not implemented
|
|
684
1398
|
content:
|
|
685
1399
|
application/json:
|
|
686
1400
|
schema:
|
|
687
1401
|
$ref: "#/components/schemas/Error"
|
|
688
|
-
|
|
689
|
-
description:
|
|
1402
|
+
ModelCompilationError:
|
|
1403
|
+
description: Model compilation failed due to syntax or semantic errors
|
|
690
1404
|
content:
|
|
691
1405
|
application/json:
|
|
692
1406
|
schema:
|
|
693
1407
|
$ref: "#/components/schemas/Error"
|
|
694
1408
|
|
|
695
1409
|
schemas:
|
|
696
|
-
|
|
1410
|
+
IdentifierPattern:
|
|
1411
|
+
type: string
|
|
1412
|
+
pattern: "^[a-zA-Z0-9_-]+$"
|
|
1413
|
+
description: Standard identifier pattern for resource names
|
|
1414
|
+
|
|
1415
|
+
VersionIdPattern:
|
|
1416
|
+
type: string
|
|
1417
|
+
pattern: "^[a-zA-Z0-9_.-]+$"
|
|
1418
|
+
description: Version identifier pattern supporting dots and dashes
|
|
1419
|
+
|
|
1420
|
+
PathPattern:
|
|
1421
|
+
type: string
|
|
1422
|
+
pattern: "^[a-zA-Z0-9_/.-]+$"
|
|
1423
|
+
description: Path pattern supporting slashes, dots, and dashes
|
|
1424
|
+
|
|
1425
|
+
ServerStatus:
|
|
697
1426
|
type: object
|
|
1427
|
+
description: Current server status and health information
|
|
698
1428
|
properties:
|
|
699
|
-
|
|
700
|
-
type:
|
|
701
|
-
description:
|
|
702
|
-
|
|
1429
|
+
timestamp:
|
|
1430
|
+
type: number
|
|
1431
|
+
description: Unix timestamp of the status check
|
|
1432
|
+
projects:
|
|
1433
|
+
type: array
|
|
1434
|
+
description: List of available projects
|
|
1435
|
+
items:
|
|
1436
|
+
$ref: "#/components/schemas/Project"
|
|
1437
|
+
initialized:
|
|
1438
|
+
type: boolean
|
|
1439
|
+
description: Whether the server is fully initialized and ready to serve requests
|
|
1440
|
+
|
|
703
1441
|
Project:
|
|
704
1442
|
type: object
|
|
1443
|
+
description: Represents a Malloy project containing packages, connections, and other resources
|
|
705
1444
|
properties:
|
|
1445
|
+
resource:
|
|
1446
|
+
type: string
|
|
1447
|
+
description: Resource path to the project
|
|
706
1448
|
name:
|
|
707
1449
|
type: string
|
|
708
|
-
description: Project name
|
|
709
|
-
|
|
1450
|
+
description: Project name
|
|
1451
|
+
readme:
|
|
1452
|
+
type: string
|
|
1453
|
+
description: Project README content
|
|
1454
|
+
location:
|
|
1455
|
+
type: string
|
|
1456
|
+
description: Project location, can be an absolute path or URI (e.g. github, s3, gcs, etc.)
|
|
1457
|
+
connections:
|
|
1458
|
+
type: array
|
|
1459
|
+
description: List of database connections configured for this project
|
|
1460
|
+
items:
|
|
1461
|
+
$ref: "#/components/schemas/Connection"
|
|
1462
|
+
packages:
|
|
1463
|
+
type: array
|
|
1464
|
+
description: List of Malloy packages in this project
|
|
1465
|
+
items:
|
|
1466
|
+
$ref: "#/components/schemas/Package"
|
|
1467
|
+
|
|
710
1468
|
Package:
|
|
711
1469
|
type: object
|
|
1470
|
+
description: Represents a Malloy package containing models, notebooks, and embedded databases
|
|
712
1471
|
properties:
|
|
1472
|
+
resource:
|
|
1473
|
+
type: string
|
|
1474
|
+
description: Resource path to the package
|
|
713
1475
|
name:
|
|
714
1476
|
type: string
|
|
715
|
-
description: Package name
|
|
1477
|
+
description: Package name
|
|
716
1478
|
description:
|
|
717
1479
|
type: string
|
|
718
|
-
description: Package description
|
|
1480
|
+
description: Package description
|
|
1481
|
+
location:
|
|
1482
|
+
type: string
|
|
1483
|
+
description: Package location, can be an absolute path or URI (e.g. github, s3, gcs, etc.)
|
|
719
1484
|
|
|
720
1485
|
Model:
|
|
721
1486
|
type: object
|
|
722
|
-
description: Malloy model
|
|
1487
|
+
description: Malloy model metadata and status information
|
|
723
1488
|
properties:
|
|
1489
|
+
resource:
|
|
1490
|
+
type: string
|
|
1491
|
+
description: Resource path to the model
|
|
724
1492
|
packageName:
|
|
725
1493
|
type: string
|
|
726
|
-
description:
|
|
1494
|
+
description: Name of the package containing this model
|
|
727
1495
|
path:
|
|
728
1496
|
type: string
|
|
729
|
-
description:
|
|
730
|
-
|
|
1497
|
+
description: Relative path to the model file within its package directory
|
|
1498
|
+
error:
|
|
731
1499
|
type: string
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
CompiledModel:
|
|
1500
|
+
description: Error message if the model failed to compile or load
|
|
1501
|
+
|
|
1502
|
+
Notebook:
|
|
736
1503
|
type: object
|
|
737
|
-
description: Malloy
|
|
1504
|
+
description: Malloy notebook metadata and status information
|
|
738
1505
|
properties:
|
|
1506
|
+
resource:
|
|
1507
|
+
type: string
|
|
1508
|
+
description: Resource path to the notebook
|
|
739
1509
|
packageName:
|
|
740
1510
|
type: string
|
|
741
|
-
description:
|
|
1511
|
+
description: Name of the package containing this notebook
|
|
742
1512
|
path:
|
|
743
1513
|
type: string
|
|
744
|
-
description:
|
|
745
|
-
|
|
1514
|
+
description: Relative path to the notebook file within its package directory
|
|
1515
|
+
error:
|
|
746
1516
|
type: string
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
1517
|
+
description: Error message if the notebook failed to compile or load
|
|
1518
|
+
|
|
1519
|
+
CompiledNotebook:
|
|
1520
|
+
type: object
|
|
1521
|
+
description: Compiled Malloy notebook with cells, results, and execution data
|
|
1522
|
+
properties:
|
|
1523
|
+
resource:
|
|
750
1524
|
type: string
|
|
751
|
-
description:
|
|
752
|
-
|
|
753
|
-
dataStyles:
|
|
1525
|
+
description: Resource path to the notebook
|
|
1526
|
+
packageName:
|
|
754
1527
|
type: string
|
|
755
|
-
description:
|
|
756
|
-
|
|
757
|
-
modelDef:
|
|
1528
|
+
description: Name of the package containing this notebook
|
|
1529
|
+
path:
|
|
758
1530
|
type: string
|
|
759
|
-
description:
|
|
760
|
-
|
|
761
|
-
type:
|
|
762
|
-
description:
|
|
763
|
-
items:
|
|
764
|
-
$ref: "#/components/schemas/Source"
|
|
765
|
-
queries:
|
|
766
|
-
type: array
|
|
767
|
-
descript: Array of named queries.
|
|
768
|
-
items:
|
|
769
|
-
$ref: "#/components/schemas/Query"
|
|
1531
|
+
description: Relative path to the notebook file within its package directory
|
|
1532
|
+
malloyVersion:
|
|
1533
|
+
type: string
|
|
1534
|
+
description: Version of the Malloy compiler used to generate the notebook data
|
|
770
1535
|
notebookCells:
|
|
771
1536
|
type: array
|
|
772
|
-
description: Array of notebook cells
|
|
1537
|
+
description: Array of notebook cells containing code, markdown, and execution results
|
|
773
1538
|
items:
|
|
774
1539
|
$ref: "#/components/schemas/NotebookCell"
|
|
775
|
-
|
|
776
|
-
|
|
1540
|
+
|
|
1541
|
+
CompiledModel:
|
|
777
1542
|
type: object
|
|
778
|
-
description:
|
|
1543
|
+
description: Compiled Malloy model with sources, queries, and metadata
|
|
779
1544
|
properties:
|
|
780
|
-
|
|
1545
|
+
resource:
|
|
781
1546
|
type: string
|
|
782
|
-
description:
|
|
783
|
-
|
|
1547
|
+
description: Resource path to the model
|
|
1548
|
+
packageName:
|
|
1549
|
+
type: string
|
|
1550
|
+
description: Name of the package containing this model
|
|
1551
|
+
path:
|
|
1552
|
+
type: string
|
|
1553
|
+
description: Relative path to the model file within its package directory
|
|
1554
|
+
malloyVersion:
|
|
1555
|
+
type: string
|
|
1556
|
+
description: Version of the Malloy compiler used to generate the model data
|
|
1557
|
+
modelInfo:
|
|
1558
|
+
type: string
|
|
1559
|
+
description: JSON string containing model metadata and structure information
|
|
1560
|
+
sourceInfos:
|
|
784
1561
|
type: array
|
|
785
|
-
description:
|
|
1562
|
+
description: Array of JSON strings containing source information for each data source
|
|
786
1563
|
items:
|
|
787
1564
|
type: string
|
|
788
|
-
|
|
1565
|
+
queries:
|
|
789
1566
|
type: array
|
|
790
|
-
description:
|
|
1567
|
+
description: Array of named queries defined in the model
|
|
791
1568
|
items:
|
|
792
|
-
$ref: "#/components/schemas/
|
|
1569
|
+
$ref: "#/components/schemas/Query"
|
|
793
1570
|
|
|
794
1571
|
View:
|
|
795
1572
|
type: object
|
|
796
|
-
description: Named model view
|
|
1573
|
+
description: Named model view definition
|
|
797
1574
|
properties:
|
|
798
1575
|
name:
|
|
799
1576
|
type: string
|
|
800
|
-
description:
|
|
1577
|
+
description: Name of the view
|
|
801
1578
|
annotations:
|
|
802
1579
|
type: array
|
|
803
|
-
description: Annotations attached to view
|
|
1580
|
+
description: Annotations attached to the view
|
|
804
1581
|
items:
|
|
805
1582
|
type: string
|
|
806
1583
|
|
|
807
1584
|
Query:
|
|
808
1585
|
type: object
|
|
809
|
-
description: Named model query
|
|
1586
|
+
description: Named model query definition
|
|
810
1587
|
properties:
|
|
811
1588
|
name:
|
|
812
1589
|
type: string
|
|
813
|
-
description:
|
|
1590
|
+
description: Name of the query
|
|
1591
|
+
sourceName:
|
|
1592
|
+
type: string
|
|
1593
|
+
description: Name of the source this query operates on
|
|
814
1594
|
annotations:
|
|
815
1595
|
type: array
|
|
816
|
-
description: Annotations attached to query
|
|
1596
|
+
description: Annotations attached to the query
|
|
817
1597
|
items:
|
|
818
1598
|
type: string
|
|
819
1599
|
|
|
1600
|
+
QueryRequest:
|
|
1601
|
+
type: object
|
|
1602
|
+
description: Request body for executing a Malloy query
|
|
1603
|
+
properties:
|
|
1604
|
+
query:
|
|
1605
|
+
type: string
|
|
1606
|
+
description: Query string to execute on the model. If the query parameter is set, the queryName parameter must be empty.
|
|
1607
|
+
sourceName:
|
|
1608
|
+
type: string
|
|
1609
|
+
description: Name of the source in the model to use for queryName, search, and topValue requests.
|
|
1610
|
+
queryName:
|
|
1611
|
+
type: string
|
|
1612
|
+
description: Name of a query to execute on a source in the model. Requires the sourceName parameter is set. If the queryName parameter is set, the query parameter must be empty.
|
|
1613
|
+
versionId:
|
|
1614
|
+
type: string
|
|
1615
|
+
description: Version ID
|
|
1616
|
+
|
|
820
1617
|
NotebookCell:
|
|
821
1618
|
type: object
|
|
822
|
-
description:
|
|
1619
|
+
description: Individual cell within a Malloy notebook
|
|
823
1620
|
properties:
|
|
824
1621
|
type:
|
|
825
1622
|
type: string
|
|
826
1623
|
enum: ["markdown", "code"]
|
|
827
|
-
description: Type of notebook cell
|
|
1624
|
+
description: Type of notebook cell
|
|
828
1625
|
text:
|
|
829
1626
|
type: string
|
|
830
|
-
description: Text contents of the notebook cell
|
|
831
|
-
|
|
832
|
-
type: string
|
|
833
|
-
description: Name of query, if this is a named query. Otherwise, empty.
|
|
834
|
-
# Pass data styles as an opaque JSON string that is malloyVersion depdendent.
|
|
835
|
-
queryResult:
|
|
1627
|
+
description: Text contents of the notebook cell
|
|
1628
|
+
result:
|
|
836
1629
|
type: string
|
|
837
|
-
description:
|
|
838
|
-
|
|
1630
|
+
description: JSON string containing the execution result for this cell
|
|
1631
|
+
newSources:
|
|
1632
|
+
type: array
|
|
1633
|
+
description: Array of JSON strings containing SourceInfo objects made available in this cell
|
|
1634
|
+
items:
|
|
1635
|
+
type: string
|
|
1636
|
+
|
|
839
1637
|
QueryResult:
|
|
840
1638
|
type: object
|
|
841
|
-
description:
|
|
1639
|
+
description: Results from executing a Malloy query
|
|
842
1640
|
properties:
|
|
843
|
-
|
|
844
|
-
dataStyles:
|
|
845
|
-
type: string
|
|
846
|
-
description: Data style for rendering query results.
|
|
847
|
-
# Pass model def as an opaque JSON string that is malloyVersion depdendent.
|
|
848
|
-
modelDef:
|
|
1641
|
+
result:
|
|
849
1642
|
type: string
|
|
850
|
-
description:
|
|
851
|
-
|
|
852
|
-
queryResult:
|
|
1643
|
+
description: JSON string containing the query results, metadata, and execution information
|
|
1644
|
+
resource:
|
|
853
1645
|
type: string
|
|
854
|
-
description:
|
|
1646
|
+
description: Resource path to the query result
|
|
855
1647
|
|
|
856
1648
|
Database:
|
|
857
1649
|
type: object
|
|
858
|
-
description:
|
|
1650
|
+
description: Embedded database within a Malloy package
|
|
859
1651
|
properties:
|
|
1652
|
+
resource:
|
|
1653
|
+
type: string
|
|
1654
|
+
description: Resource path to the database
|
|
860
1655
|
path:
|
|
861
1656
|
type: string
|
|
862
|
-
description:
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
description: Size of the embedded database in bytes.
|
|
1657
|
+
description: Relative path to the database file within its package directory
|
|
1658
|
+
info:
|
|
1659
|
+
$ref: "#/components/schemas/TableDescription"
|
|
866
1660
|
type:
|
|
867
1661
|
type: string
|
|
1662
|
+
description: Type of embedded database
|
|
868
1663
|
enum: ["embedded", "materialized"]
|
|
869
|
-
description: Type of database.
|
|
870
1664
|
|
|
871
|
-
|
|
1665
|
+
Schema:
|
|
1666
|
+
description: A schema name in a Connection.
|
|
872
1667
|
type: object
|
|
873
|
-
description: A scheduled task.
|
|
874
1668
|
properties:
|
|
875
|
-
|
|
876
|
-
type: string
|
|
877
|
-
description: Resource in the package that the schedule is attached to.
|
|
878
|
-
schedule:
|
|
879
|
-
type: string
|
|
880
|
-
description: Schedule (cron format) for executing task.
|
|
881
|
-
action:
|
|
882
|
-
type: string
|
|
883
|
-
description: Action to execute.
|
|
884
|
-
connection:
|
|
1669
|
+
name:
|
|
885
1670
|
type: string
|
|
886
|
-
description:
|
|
887
|
-
|
|
888
|
-
type: number
|
|
889
|
-
description: Timestamp in milliseconds of the last run.
|
|
890
|
-
lastRunStatus:
|
|
1671
|
+
description: Name of the schema
|
|
1672
|
+
description:
|
|
891
1673
|
type: string
|
|
892
|
-
description:
|
|
1674
|
+
description: Description of the schema
|
|
1675
|
+
isDefault:
|
|
1676
|
+
type: boolean
|
|
1677
|
+
description: Whether this schema is the default schema
|
|
1678
|
+
isHidden:
|
|
1679
|
+
type: boolean
|
|
1680
|
+
description: Whether this schema is hidden
|
|
893
1681
|
|
|
894
1682
|
Connection:
|
|
895
1683
|
type: object
|
|
1684
|
+
description: Database connection configuration and metadata
|
|
896
1685
|
properties:
|
|
1686
|
+
resource:
|
|
1687
|
+
type: string
|
|
1688
|
+
description: Resource path to the connection
|
|
897
1689
|
name:
|
|
898
1690
|
type: string
|
|
1691
|
+
description: Name of the connection
|
|
899
1692
|
type:
|
|
900
1693
|
type: string
|
|
901
|
-
|
|
1694
|
+
description: Type of database connection
|
|
1695
|
+
enum: [postgres, bigquery, snowflake, trino, mysql, duckdb]
|
|
902
1696
|
attributes:
|
|
903
1697
|
$ref: "#/components/schemas/ConnectionAttributes"
|
|
904
1698
|
postgresConnection:
|
|
@@ -909,118 +1703,309 @@ components:
|
|
|
909
1703
|
$ref: "#/components/schemas/SnowflakeConnection"
|
|
910
1704
|
trinoConnection:
|
|
911
1705
|
$ref: "#/components/schemas/TrinoConnection"
|
|
1706
|
+
mysqlConnection:
|
|
1707
|
+
$ref: "#/components/schemas/MysqlConnection"
|
|
1708
|
+
duckdbConnection:
|
|
1709
|
+
$ref: "#/components/schemas/DuckdbConnection"
|
|
912
1710
|
|
|
913
1711
|
ConnectionAttributes:
|
|
914
1712
|
type: object
|
|
1713
|
+
description: Connection capabilities and configuration attributes
|
|
915
1714
|
properties:
|
|
916
1715
|
dialectName:
|
|
917
1716
|
type: string
|
|
1717
|
+
description: SQL dialect name for the connection
|
|
918
1718
|
isPool:
|
|
919
1719
|
type: boolean
|
|
1720
|
+
description: Whether the connection uses connection pooling
|
|
920
1721
|
canPersist:
|
|
921
1722
|
type: boolean
|
|
1723
|
+
description: Whether the connection supports persistent storage operations
|
|
922
1724
|
canStream:
|
|
923
|
-
type: boolean
|
|
1725
|
+
type: boolean
|
|
1726
|
+
description: Whether the connection supports streaming query results
|
|
924
1727
|
|
|
925
1728
|
PostgresConnection:
|
|
926
1729
|
type: object
|
|
1730
|
+
description: PostgreSQL database connection configuration
|
|
927
1731
|
properties:
|
|
928
1732
|
host:
|
|
929
1733
|
type: string
|
|
1734
|
+
description: PostgreSQL server hostname or IP address
|
|
930
1735
|
port:
|
|
931
1736
|
type: integer
|
|
1737
|
+
description: PostgreSQL server port number
|
|
932
1738
|
databaseName:
|
|
933
1739
|
type: string
|
|
1740
|
+
description: Name of the PostgreSQL database
|
|
934
1741
|
userName:
|
|
935
1742
|
type: string
|
|
1743
|
+
description: PostgreSQL username for authentication
|
|
936
1744
|
password:
|
|
937
1745
|
type: string
|
|
1746
|
+
description: PostgreSQL password for authentication
|
|
938
1747
|
connectionString:
|
|
939
1748
|
type: string
|
|
1749
|
+
description: Complete PostgreSQL connection string (alternative to individual parameters)
|
|
1750
|
+
|
|
1751
|
+
MysqlConnection:
|
|
1752
|
+
type: object
|
|
1753
|
+
description: MySQL database connection configuration
|
|
1754
|
+
properties:
|
|
1755
|
+
host:
|
|
1756
|
+
type: string
|
|
1757
|
+
description: MySQL server hostname or IP address
|
|
1758
|
+
port:
|
|
1759
|
+
type: integer
|
|
1760
|
+
description: MySQL server port number
|
|
1761
|
+
database:
|
|
1762
|
+
type: string
|
|
1763
|
+
description: Name of the MySQL database
|
|
1764
|
+
user:
|
|
1765
|
+
type: string
|
|
1766
|
+
description: MySQL username for authentication
|
|
1767
|
+
password:
|
|
1768
|
+
type: string
|
|
1769
|
+
description: MySQL password for authentication
|
|
940
1770
|
|
|
941
1771
|
BigqueryConnection:
|
|
942
1772
|
type: object
|
|
1773
|
+
description: Google BigQuery database connection configuration
|
|
943
1774
|
properties:
|
|
944
1775
|
defaultProjectId:
|
|
945
1776
|
type: string
|
|
1777
|
+
description: Default BigQuery project ID for queries
|
|
946
1778
|
billingProjectId:
|
|
947
1779
|
type: string
|
|
1780
|
+
description: BigQuery project ID for billing purposes
|
|
948
1781
|
location:
|
|
949
1782
|
type: string
|
|
1783
|
+
description: BigQuery dataset location/region
|
|
950
1784
|
serviceAccountKeyJson:
|
|
951
1785
|
type: string
|
|
1786
|
+
description: JSON string containing Google Cloud service account credentials
|
|
952
1787
|
maximumBytesBilled:
|
|
953
1788
|
type: string
|
|
1789
|
+
description: Maximum bytes to bill for query execution (prevents runaway costs)
|
|
954
1790
|
queryTimeoutMilliseconds:
|
|
955
1791
|
type: string
|
|
956
|
-
|
|
1792
|
+
description: Query timeout in milliseconds
|
|
1793
|
+
|
|
957
1794
|
SnowflakeConnection:
|
|
958
1795
|
type: object
|
|
1796
|
+
description: Snowflake database connection configuration
|
|
959
1797
|
properties:
|
|
960
1798
|
account:
|
|
961
1799
|
type: string
|
|
1800
|
+
description: Snowflake account identifier
|
|
962
1801
|
username:
|
|
963
1802
|
type: string
|
|
1803
|
+
description: Snowflake username for authentication
|
|
964
1804
|
password:
|
|
965
1805
|
type: string
|
|
1806
|
+
description: Snowflake password for authentication
|
|
966
1807
|
warehouse:
|
|
967
1808
|
type: string
|
|
1809
|
+
description: Snowflake warehouse name
|
|
968
1810
|
database:
|
|
969
1811
|
type: string
|
|
1812
|
+
description: Snowflake database name
|
|
970
1813
|
schema:
|
|
971
1814
|
type: string
|
|
1815
|
+
description: Snowflake schema name
|
|
1816
|
+
role:
|
|
1817
|
+
type: string
|
|
1818
|
+
description: Snowflake role name
|
|
972
1819
|
responseTimeoutMilliseconds:
|
|
973
1820
|
type: integer
|
|
1821
|
+
description: Query response timeout in milliseconds
|
|
974
1822
|
|
|
975
1823
|
TrinoConnection:
|
|
976
1824
|
type: object
|
|
1825
|
+
description: Trino database connection configuration
|
|
977
1826
|
properties:
|
|
978
1827
|
server:
|
|
979
1828
|
type: string
|
|
1829
|
+
description: Trino server hostname or IP address
|
|
980
1830
|
port:
|
|
981
1831
|
type: number
|
|
1832
|
+
description: Trino server port number
|
|
982
1833
|
catalog:
|
|
983
1834
|
type: string
|
|
1835
|
+
description: Trino catalog name
|
|
984
1836
|
schema:
|
|
985
1837
|
type: string
|
|
1838
|
+
description: Trino schema name
|
|
986
1839
|
user:
|
|
987
1840
|
type: string
|
|
1841
|
+
description: Trino username for authentication
|
|
988
1842
|
password:
|
|
989
1843
|
type: string
|
|
1844
|
+
description: Trino password for authentication
|
|
1845
|
+
|
|
1846
|
+
DuckdbConnection:
|
|
1847
|
+
type: object
|
|
1848
|
+
description: DuckDB database connection configuration
|
|
1849
|
+
properties:
|
|
1850
|
+
attachedDatabases:
|
|
1851
|
+
array:
|
|
1852
|
+
$ref: "#/components/schemas/AttachedDatabase"
|
|
1853
|
+
|
|
1854
|
+
AttachedDatabase:
|
|
1855
|
+
type: object
|
|
1856
|
+
description: Attached DuckDB database
|
|
1857
|
+
properties:
|
|
1858
|
+
name:
|
|
1859
|
+
type: string
|
|
1860
|
+
description: Name of the connection
|
|
1861
|
+
type:
|
|
1862
|
+
type: string
|
|
1863
|
+
description: Type of database connection
|
|
1864
|
+
enum: [bigquery, snowflake, postgres]
|
|
1865
|
+
attributes:
|
|
1866
|
+
$ref: "#/components/schemas/ConnectionAttributes"
|
|
1867
|
+
bigqueryConnection:
|
|
1868
|
+
$ref: "#/components/schemas/BigqueryConnection"
|
|
1869
|
+
snowflakeConnection:
|
|
1870
|
+
$ref: "#/components/schemas/SnowflakeConnection"
|
|
1871
|
+
postgresConnection:
|
|
1872
|
+
$ref: "#/components/schemas/PostgresConnection"
|
|
1873
|
+
|
|
990
1874
|
|
|
1875
|
+
# TODO: What is this? Can we remove it?
|
|
991
1876
|
SqlSource:
|
|
992
1877
|
type: object
|
|
993
1878
|
properties:
|
|
994
|
-
|
|
1879
|
+
resource:
|
|
1880
|
+
type: string
|
|
1881
|
+
description: Resource path to the sql source.
|
|
1882
|
+
# Pass source as an opaque JSON string that is malloyVersion dependent.
|
|
995
1883
|
source:
|
|
996
1884
|
type: string
|
|
997
|
-
|
|
1885
|
+
|
|
1886
|
+
Table:
|
|
1887
|
+
type: object
|
|
1888
|
+
properties:
|
|
1889
|
+
resource:
|
|
1890
|
+
type: string
|
|
1891
|
+
description: Resource path to the table.
|
|
1892
|
+
columns:
|
|
1893
|
+
description: Table fields
|
|
1894
|
+
type: array
|
|
1895
|
+
items:
|
|
1896
|
+
$ref: "#/components/schemas/Column"
|
|
1897
|
+
|
|
1898
|
+
# TODO: Remove this. Replaced by Table
|
|
998
1899
|
TableSource:
|
|
999
1900
|
type: object
|
|
1901
|
+
deprecated: true
|
|
1000
1902
|
properties:
|
|
1001
|
-
|
|
1903
|
+
resource:
|
|
1904
|
+
type: string
|
|
1905
|
+
description: Resource path to the table source.
|
|
1906
|
+
# Pass source as an opaque JSON string that is malloyVersion dependent.
|
|
1907
|
+
# TODO: Remove this once we update the Malloy Publisher connection.
|
|
1002
1908
|
source:
|
|
1003
1909
|
type: string
|
|
1910
|
+
columns:
|
|
1911
|
+
description: Table fields
|
|
1912
|
+
type: array
|
|
1913
|
+
items:
|
|
1914
|
+
$ref: "#/components/schemas/Column"
|
|
1004
1915
|
|
|
1005
1916
|
TemporaryTable:
|
|
1006
1917
|
type: object
|
|
1007
1918
|
properties:
|
|
1008
|
-
|
|
1919
|
+
resource:
|
|
1920
|
+
type: string
|
|
1921
|
+
description: Resource path to the temporary table.
|
|
1922
|
+
# Pass table as an opaque JSON string that is malloyVersion dependent.
|
|
1009
1923
|
table:
|
|
1010
1924
|
type: string
|
|
1011
1925
|
|
|
1012
1926
|
QueryData:
|
|
1013
1927
|
type: object
|
|
1014
1928
|
properties:
|
|
1015
|
-
|
|
1929
|
+
resource:
|
|
1930
|
+
type: string
|
|
1931
|
+
description: Resource path to the query data.
|
|
1932
|
+
# Pass result as an opaque JSON string that is malloyVersion dependent.
|
|
1016
1933
|
data:
|
|
1017
1934
|
type: string
|
|
1018
1935
|
|
|
1019
1936
|
Error:
|
|
1020
1937
|
type: object
|
|
1938
|
+
description: Standard error response format
|
|
1021
1939
|
properties:
|
|
1022
|
-
code:
|
|
1023
|
-
type: string
|
|
1024
1940
|
message:
|
|
1025
1941
|
type: string
|
|
1026
|
-
|
|
1942
|
+
description: Human-readable error message describing what went wrong
|
|
1943
|
+
details:
|
|
1944
|
+
type: string
|
|
1945
|
+
description: Additional error details or context
|
|
1946
|
+
required:
|
|
1947
|
+
- message
|
|
1948
|
+
|
|
1949
|
+
Column:
|
|
1950
|
+
type: object
|
|
1951
|
+
description: Database column definition
|
|
1952
|
+
properties:
|
|
1953
|
+
name:
|
|
1954
|
+
type: string
|
|
1955
|
+
description: Name of the column
|
|
1956
|
+
type:
|
|
1957
|
+
type: string
|
|
1958
|
+
description: Data type of the column
|
|
1959
|
+
|
|
1960
|
+
TableDescription:
|
|
1961
|
+
type: object
|
|
1962
|
+
description: Database table structure and metadata
|
|
1963
|
+
properties:
|
|
1964
|
+
name:
|
|
1965
|
+
type: string
|
|
1966
|
+
description: Name of the table
|
|
1967
|
+
rowCount:
|
|
1968
|
+
type: integer
|
|
1969
|
+
description: Number of rows in the table
|
|
1970
|
+
columns:
|
|
1971
|
+
type: array
|
|
1972
|
+
description: List of columns in the table
|
|
1973
|
+
items:
|
|
1974
|
+
$ref: "#/components/schemas/Column"
|
|
1975
|
+
|
|
1976
|
+
WatchStatus:
|
|
1977
|
+
type: object
|
|
1978
|
+
description: Current file watching status and configuration
|
|
1979
|
+
properties:
|
|
1980
|
+
enabled:
|
|
1981
|
+
type: boolean
|
|
1982
|
+
description: Whether file watching is currently active
|
|
1983
|
+
projectName:
|
|
1984
|
+
type: string
|
|
1985
|
+
description: Name of the project being watched for file changes
|
|
1986
|
+
watchingPath:
|
|
1987
|
+
type: string
|
|
1988
|
+
nullable: true
|
|
1989
|
+
description: The file system path being monitored for changes, null if not watching
|
|
1990
|
+
|
|
1991
|
+
StartWatchRequest:
|
|
1992
|
+
type: object
|
|
1993
|
+
description: Request to start file watching for a project
|
|
1994
|
+
properties:
|
|
1995
|
+
projectName:
|
|
1996
|
+
type: string
|
|
1997
|
+
description: Name of the project to start watching for file changes
|
|
1998
|
+
required:
|
|
1999
|
+
- projectName
|
|
2000
|
+
|
|
2001
|
+
ConnectionStatus:
|
|
2002
|
+
type: object
|
|
2003
|
+
description: Result of testing a database connection
|
|
2004
|
+
properties:
|
|
2005
|
+
status:
|
|
2006
|
+
type: string
|
|
2007
|
+
description: Connection test result status
|
|
2008
|
+
enum: ["ok", "failed"]
|
|
2009
|
+
errorMessage:
|
|
2010
|
+
type: string
|
|
2011
|
+
description: Error message if the connection test failed, null if successful
|